The new class is named MultiSpeciesThermo, so that (eventually) the name
SpeciesThermo can be used for the single-species class SpeciesThermoInterpType.
Currently, trivial wrappers for classes named SpeciesThermo and
GeneralSpeciesThermo to maintain backwards compatibiity for Cantera 2.3.
Using this instead of modifyHf298 to reset the thermo data to its original
state avoids round-off errors that otherwise make modifications to the
species thermo data irreversible.
Where possible, extend arrays as species are added rather than requiring a
later call to initThermo(). For phases that do not require any data except
that which is included in the Species objects themselves (notably, this
includes IdealGasPhase), species can now be added dynamically without
affecting the phase state.
The first argument should be the function name from which the exception was
thrown. Leaving this blank makes it difficult to track down the location of the
exception.
No data from the outer 'species' node is needed to instantiate the
SpeciesThermoInterpType object, so this function can just take the 'thermo' node
directly.
This is a prerequisite to removing the species index as a property of the
SpeciesThermoInterpType object and making it independent of any specific
ThermoPhase object.
The specialized SpeciesThermo derived types offer no performance benefit now
that GeneralSpeciesThermo manages calculation of the temperature terms
efficiently.
Phase::addElements(string name, ...) is the single entry point for adding
elements. It always perform the uniqueness check, and can do the extra
additional work required to add elements to a phase that already has species,
removing the need for "freezing" the phase's elements. Parsing the XML tree for
elements is now handled in "installElements". The variant element-adding methods
are deprecated.
Use "if (DEBUG_MODE_ENABLED)" instead of "#ifdef DEBUG_MODE". This makes
it easier to see the flow control logic, and the compiler will optimize
out the always-false conditionals when DEBUG_MODE_ENABLED is 0, so there
isn't any speed penalty.