27 for (
const auto& val : vec) {
30 return std::sqrt(sum / vec.size());
35 switch (speciesStatus) {
37 return "Component Species";
39 return "Major Species";
41 return "Minor Species";
44 return "Set Zeroed-Phase";
46 return "Purposely Zeroed-Phase Species (not in problem)";
50 return "Zeroed-MS Phase";
52 return "Zeroed-MS Phase Species";
56 return "Zeroed-SS Phase";
58 return "Zeroed-SS Phase Species";
62 return "Deleted Species";
63 }
else if (length < 40) {
64 return "Deleted-Small Species";
66 return "Deleted-Small Species in a MS phase";
70 return "Tmp Zeroed in MS";
72 return "Zeroed Species in an active MS phase (tmp)";
76 return "Stoich Zeroed in MS";
78 return "Zeroed Species in an active MS phase (Stoich Constraint)";
82 return "InterfaceVoltage";
84 return "InterfaceVoltage Species";
87 return "unknown species type";
93 double denom = fabs(d1) + fabs(d2) + 1.0;
94 double fac = fabs(d1 - d2) / denom;
bool vcs_doubleEqual(double d1, double d2)
Simple routine to check whether two doubles are equal up to roundoff error.
#define VCS_SPECIES_ZEROEDMS
Species lies in a multicomponent phase with concentration zero.
#define VCS_SPECIES_MINOR
Species is a major species.
#define VCS_SPECIES_INTERFACIALVOLTAGE
Species refers to an electron in the metal.
#define VCS_SPECIES_ZEROEDSS
Species is a SS phase, that is currently zeroed out.
Defines and definitions within the vcs package.
#define VCS_SPECIES_ZEROEDPHASE
Species lies in a multicomponent phase that is zeroed atm.
Internal declarations for the VCSnonideal package.
#define VCS_SPECIES_ACTIVEBUTZERO
Species lies in a multicomponent phase that is active, but species concentration is zero...
#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...
double vcs_l2norm(const vector_fp &vec)
determine the l2 norm of a vector of doubles
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Contains declarations for string manipulation functions within Cantera.
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...
#define VCS_SPECIES_COMPONENT
Species is a component which can be nonzero.
Namespace for the Cantera kernel.
#define VCS_SPECIES_DELETED
Species has such a small mole fraction it is deleted even though its phase may possibly exist...
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...