26 #define CT_ELEM_TYPE_TURNEDOFF -1
35 #define CT_ELEM_TYPE_ABSPOS 0
41 #define CT_ELEM_TYPE_ELECTRONCHARGE 1
47 #define CT_ELEM_TYPE_CHARGENEUTRALITY 2
54 #define CT_ELEM_TYPE_LATTICERATIO 3
64 #define CT_ELEM_TYPE_KINETICFROZEN 4
73 #define CT_ELEM_TYPE_SURFACECONSTRAINT 5
79 #define CT_ELEM_TYPE_OTHERCONSTRAINT 6
84 #define ENTROPY298_UNKNOWN -123456789.
282 doublereal weight = -12345.0);
414 friend class Constituents;
std::string elementName(int m) const
Name of the element with index m.
doublereal LookupWtElements(const std::string &ename)
Function to look up an atomic weight This function looks up the argument string in the database above...
void addUniqueElement(const std::string &symbol, doublereal weight=-12345.0, int atomicNumber=0, doublereal entropy298=ENTROPY298_UNKNOWN, int elem_type=CT_ELEM_TYPE_ABSPOS)
Add an element only if the element hasn't been added before.
void clear()
Remove all elements.
int atomicNumber(int m) const
Atomic number of element m.
void addElement(const std::string &symbol, doublereal weight=-12345.0)
Add an element to the current set of elements in the current object.
Elements()
Default constructor for the elements class.
const vector_fp & atomicWeights() const
vector of element atomic weights
Class XML_Node is a tree-based representation of the contents of an XML file.
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
bool elementsFrozen() const
True if freezeElements has been called.
void subscribe()
subscribe to this object
#define CT_ELEM_TYPE_ABSPOS
Normal element constraint consisting of positive coefficients for the formula matrix.
vector_int m_elem_type
Vector of element types.
void freezeElements()
Prohibit addition of more elements, and prepare to add species.
int reportSubscriptions() const
report the number of subscriptions
bool ready() const
True if both elements and species have been frozen.
std::vector< int > vector_int
Vector of ints.
bool m_elementsFrozen
boolean indicating completion of object
vector_fp m_atomicWeights
Vector of element atomic weights:
Object containing the elements that make up species in a phase.
int nElements() const
Inline function that returns the number of elements in the object.
static std::vector< Elements * > Global_Elements_List
Vector of pointers to Elements Objects.
#define ENTROPY298_UNKNOWN
Number indicating we don't know the entropy of the element in its most stable state at 298...
const std::vector< std::string > & elementNames() const
Returns a string vector containing the element names.
doublereal entropyElement298(int m) const
Entropy at 298.15 K and 1 bar of stable state of the element.
Elements & operator=(const Elements &right)
Assignment operator.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
std::vector< std::string > m_elementNames
Vector of strings containing the names of the elements.
static double LookupWtElements(const std::string &ename)
Static function to look up an atomic weight.
void addElementsFromXML(const XML_Node &phase)
Add multiple elements from a XML_Node phase description.
vector_int m_atomicNumbers
Vector of element atomic numbers:
int m_mm
Number of elements.
int changeElementType(int m, int elem_type)
Change the element type of the mth constraint.
vector_fp m_entropy298
Entropy at 298.15 K and 1 bar of stable state.
int elementIndex(const std::string &name) const
Function that returns the index of an element.
~Elements()
Default destructor for the elements class.
doublereal atomicWeight(int m) const
Atomic weight of element m.
int numSubscribers
Number of Constituents Objects that use this object.
int unsubscribe()
unsubscribe to this object
int elementType(int m) const
Return the element constraint type.