Change GeneralMatrix to allow derived classes to not implement QR
factorization. BandMatrix does not implement QR because this LAPACK
does not contain a QR algorithm for this matrix type.
The work array hasn't always been allocated, so taking its address isn't
necessarily valid. Also, dlange doesn't use the work array in the '1' norm
case anyway.
To both check and update the cached state values. Reduces
a lot of code duplication in the use of CachedValues.
I'd like to make state1, state2, and stateNum private so
that they can only be accessed with one of the validate functions,
and also add some asserts to the validate functions that do not
use all of the state variables to ensure that the unused ones are
set to their default values to prevent the case where the wrong
validate() function is called and incorrectly determines that the
cached state is valid.
First pass at making the state variables private caused a test failure
for test_problems/statmech. The m_spthermo->update() call in
IdealGasPhase::_updateThermo() throws an exception for this test right
now that gets caught in equilibrate(). When using validate() the cached
state variable is updated before the m_spthermo->update() call and subsequently
it thinks that the thermo does not need to be updated, whereas when
cached.state1 is being set after the m_spthermo->update() call it does not get
set. The current blessed output for that test is just the text of the exception
that gets caught, so I suspect the test may not work as is.
Forgot to update the cached state number in a few places in
my last commit.
Also uncovered a potential bug with m_A_Debye. m_A_Debye is only
set by A_Debye_TP() but is used by s_updatePitzer_lnMolalityActCoeff()
which could end up using an un-updated value for m_A_Debye through the
call chain:
setState_TP() -> calcDensity() -> getPartialMolarVolumes() ->
s_update_lnMolalityActCoeff() -> s_updatePitzer_lnMolalityActCoeff()
I changed both s_updatePitzer_lnMolalityActCoeff() and s_NBS_CLM_lnMolalityActCoeff()
to call A_Debye_TP() rather than using m_A_Debye directly to ensure that they
are always using an up to date value.
The ValueCache class is intended to standardize the method for implementing
value caching in Cantera, and to reduce the need to introduce additional member
variables to store cached variables and the thermodynamic state at which the
cached values were computed.
The initial usage is to replace the use of the m_tlast variable in IdealGasPhase
as an example.
Use the correct platform-independent path separator instead of assuming that it
is ':'.
Determine the PYTHONPATH variable in a single place for each Python version.
Rarefied gas dynamics is an import application area for Sandia, and
it represents a potentially important development direction for Cantera.
These classes provide inroads into that area.
The user's environmental variables are now passed down to the tests. Previously they had been ignored.
All of the python tests (minimal and full) had been failing for over a year or so for any installations which actually use the
LD_LIBRARY_PATH and PYTHONPATH environmental variables, which pretty much consists of all multiuser linux
machines.
Documentation can be built independently of the code by using the 'scons sphinx'
and 'scons doxygen' commands, as an alternative to using the options
'sphinx_docs=y' and 'doxygen_docs=y' to 'scons build'.
When using Python 3, using -1 as the dummy value for density and site_density
causes probems, because the (ordered) comparison between a density specified
with units (as a tuple) and 0 is not allowed. Instead, use None as the
placeholder value.
Try to identify the compiler based on a substring match rather than the
exact string, which will still work when the full path to the compiler
is given, or a version-tagged binary is used.
HMWSoln: avoid recomputing lambdas if ionic strength hasn't changed.
MaskellSolidSolnPhase: Avoid recomputing activity coefficients if
r and T haven't changed.