25 for (
const auto& val : vec) {
28 return std::sqrt(sum / vec.size());
33 switch (speciesStatus) {
35 return "Component Species";
37 return "Major Species";
39 return "Minor Species";
42 return "Set Zeroed-Phase";
44 return "Purposely Zeroed-Phase Species (not in problem)";
48 return "Zeroed-MS Phase";
50 return "Zeroed-MS Phase Species";
54 return "Zeroed-SS Phase";
56 return "Zeroed-SS Phase Species";
60 return "Deleted Species";
61 }
else if (length < 40) {
62 return "Deleted-Small Species";
64 return "Deleted-Small Species in a MS phase";
68 return "Tmp Zeroed in MS";
70 return "Zeroed Species in an active MS phase (tmp)";
74 return "Stoich Zeroed in MS";
76 return "Zeroed Species in an active MS phase (Stoich Constraint)";
80 return "InterfaceVoltage";
82 return "InterfaceVoltage Species";
85 return "unknown species type";
91 double denom = fabs(d1) + fabs(d2) + 1.0;
92 double fac = fabs(d1 - d2) / denom;
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
Namespace for the Cantera kernel.
const char * vcs_speciesType_string(int speciesStatus, int length)
Returns a const char string representing the type of the species given by the first argument.
bool vcs_doubleEqual(double d1, double d2)
Simple routine to check whether two doubles are equal up to roundoff error.
double vcs_l2norm(const vector< double > &vec)
determine the l2 norm of a vector of doubles
Contains declarations for string manipulation functions within Cantera.
Defines and definitions within the vcs package.
#define VCS_SPECIES_INTERFACIALVOLTAGE
Species refers to an electron in the metal.
#define VCS_SPECIES_COMPONENT
Species is a component which can be nonzero.
#define VCS_SPECIES_MAJOR
Species is a major species.
#define VCS_SPECIES_STOICHZERO
Species lies in a multicomponent phase that is active, but species concentration is zero due to stoic...
#define VCS_SPECIES_ZEROEDMS
Species lies in a multicomponent phase with concentration zero.
#define VCS_SPECIES_ZEROEDPHASE
Species lies in a multicomponent phase that is zeroed atm.
#define VCS_SPECIES_ACTIVEBUTZERO
Species lies in a multicomponent phase that is active, but species concentration is zero.
#define VCS_SPECIES_ZEROEDSS
Species is a SS phase, that is currently zeroed out.
#define VCS_SPECIES_DELETED
Species has such a small mole fraction it is deleted even though its phase may possibly exist.
#define VCS_SPECIES_MINOR
Species is a major species.
Internal declarations for the VCSnonideal package.