Commit graph

4954 commits

Author SHA1 Message Date
Ray Speth
4587883d5e Remove try/catch from ReactorNet::evalJacobian
This function isn't actually called by CVODE (which uses its own difference
quotient method for calculating the Jacobian), so the note here isn't correct.
2014-03-28 23:12:17 +00:00
Ray Speth
b2c050e545 [Doc] Add FAQ on debugging compilation issues 2014-03-28 23:12:11 +00:00
Ray Speth
5c99f683df [SCons] Add 'dump' command line target, and update FAQ 2014-03-28 23:12:06 +00:00
Ray Speth
50344cb34f [ck2cti] Improve error messages associated with missing input files 2014-03-27 01:29:50 +00:00
Ray Speth
da63482fea [ck2cti] Add tests calling ck2cti from C++ 2014-03-27 01:29:43 +00:00
Ray Speth
9e8ae80d2d [ctml_writer] Direct error/debug messages to stderr
Since stdout may be used for writing the actual output file, direct all error
and debug messages to stderr, so that they can be shown to the user when
ctml_writer is invoked via ct2ctml_string.
2014-03-27 01:29:39 +00:00
Ray Speth
2468b47ae7 [Thermo] Remove unimplemented overrides of ThermoPhase methods
ThermoPhase already provides an implementation of these methods that raises
an exception to indicate that the method is unimplemented. Therefore,
derived classes which do not implement a method do not need to do this.
2014-03-27 01:29:27 +00:00
Ray Speth
f1066aa072 [Thermo] Remove redundant versions of intEnergy_mole and gibbs_mole 2014-03-27 01:29:13 +00:00
Ray Speth
5b77bbb719 [1D] Add bounds checks to setRefineCriteria 2014-03-24 21:38:22 +00:00
Ray Speth
18c756b499 [1D/Cython] Add flame speed sensitivity analysis example 2014-03-24 04:03:49 +00:00
Ray Speth
aa4dcf393c [1D] Avoid Jacobian update after successful solve
Calling solve() again after a successful solution no longer automatically
triggers a Jacobian update. This enables relatively efficient sensitivity
analysis by sequentially perturbing the reaction multipliers and re-solving
the system. Since the perturbed system is close to the orignal, the solution
can be found after only a few steps, even when using the original Jacobian.
2014-03-24 04:03:44 +00:00
Ray Speth
17500064c2 [Test/Python] Add interface for running individual tests 2014-03-24 04:03:39 +00:00
Ray Speth
1fd98a2f08 [Test] Allow 'runCythonTests' to be called from any working directory 2014-03-24 04:03:35 +00:00
Ray Speth
de8a19ed0f Remove spaces adjacent to '::' in member function definitions 2014-03-24 04:03:30 +00:00
Ray Speth
95eb7ab3ba Remove newline after '::' in member function definitions
This inconsistency makes it hard to directly search the code for a specific
member function definition.
2014-03-24 04:03:09 +00:00
Ray Speth
90c2d58973 [Numerics] move 'm_factored' up to GeneralMatrix 2014-03-24 04:03:01 +00:00
Ray Speth
4467b898a5 [Numerics] Remove unused BandMatrix::err method 2014-03-24 04:02:56 +00:00
Ray Speth
7fef1b0051 [Numerics] BandMatrix does not silently do LU when QR is specified
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.
2014-03-24 04:02:51 +00:00
Ray Speth
1ec72f3171 Add 'NotImplementedError' 2014-03-24 04:02:46 +00:00
Ray Speth
150a7845f8 [Numerics] Simplify solving DenseMatrix with multiple RHS 2014-03-24 04:02:41 +00:00
Ray Speth
e2dc48e45e Remove unnecessary includes of ctlapack.h 2014-03-24 04:02:34 +00:00
Ray Speth
5b6e52b5d1 [Transport] Abstract use of LAPACK in MultiTransport 2014-03-24 04:02:29 +00:00
Ray Speth
4d1622ee96 [Kinetics] Eliminate unnecessary variable solveSP::m_JacCol 2014-03-24 04:02:23 +00:00
Ray Speth
44c53a6f27 [Kinetics] Abstract use of LAPACK in solveSP and solveProb 2014-03-24 04:02:18 +00:00
Ray Speth
8933203a20 [Numerics] Fix invalid dereference in SquareMatrix::factor
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.
2014-03-24 04:02:12 +00:00
Ray Speth
4e72cf0334 [Numerics] BandMatrix and SquareMatrix support solving multiple RHS 2014-03-24 04:02:06 +00:00
Victor Brunini
a641992960 Add validate() functions to CachedValue.
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.
2014-03-19 00:14:18 +00:00
Victor Brunini
935a20fc87 Some HMWSoln optimizations.
Mostly replacing some repeated divisions with 1
division and then multiplication by the inverse.
Saved ~10% on test problem of interest.
2014-03-18 23:29:09 +00:00
Victor Brunini
4c4836fd18 HMWSoln caching fixes.
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.
2014-03-18 21:05:10 +00:00
Victor Brunini
a704df09d8 Convert recent changes to new caching method. 2014-03-18 18:52:29 +00:00
Ray Speth
a92d0ef03e [Test] Fix platform-dependent output in test-IAPWSPres 2014-03-18 01:42:38 +00:00
Ray Speth
6b6ccfaf7f [SCons] Allow 'clean' to be specified along with other targets 2014-03-18 01:42:34 +00:00
Ray Speth
7556b828f9 Introduce a more general method of caching results
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.
2014-03-18 00:48:38 +00:00
Victor Brunini
2b92ad5684 WIP on additional caching.
I'll convert this over to the new caching framework once
Ray adds it.
2014-03-17 16:03:22 +00:00
Ray Speth
3eba9641ab [SCons] Continue running test suite if Python tests crash
If the Python test suite crashes, it won't save a results file, but we can still
run the rest of the tests and report this specific failure.
2014-03-17 02:05:17 +00:00
Ray Speth
d501189ce9 [SCons] Allow boost_thread_lib to specify multiple libraries 2014-03-17 02:05:13 +00:00
Ray Speth
338a54f101 [SCons] Simplify implementation of changes in r2810
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.
2014-03-17 02:05:09 +00:00
Harry Moffat
26750d9af0 Reblessed two tests whose results slightly changed. 2014-03-16 03:00:54 +00:00
Harry Moffat
eb1fc02ba7 Modified License statement slightly to comply with copywrite assertion paperwork. 2014-03-16 02:58:48 +00:00
Harry Moffat
e032e9e56b Took out a print statement that caused crashes on some systems that don't define PYTHONPATH
Thanks Ray for pointing this out.
2014-03-16 02:52:55 +00:00
Harry Moffat
39651964a7 Added back Statmech and PecosTransport.
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.
2014-03-15 02:57:00 +00:00
Harry Moffat
3d5aa42e77 Fixed the LD_LIBRARY_PATH and PYTHONPATH specifications for scons's test suite on multiuser linux boxes.
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.
2014-03-14 23:56:55 +00:00
Victor Brunini
b0ecf96cb6 Trying out a cleaner way knowing when expensive state functions need to be recomputed. 2014-03-13 23:50:31 +00:00
Ray Speth
89eab1bb48 [Thermo] Remove redundant implementations of logStandardConc
For the cases where logStandardConc just calls standardConcentration,
rely on the default implementation in class ThermoPhase.
2014-03-13 21:35:49 +00:00
Ray Speth
d0b3ad3d4b [SCons] Remove deprecated 'legacy_headers' option 2014-03-13 21:35:44 +00:00
Ray Speth
6266986d7b [SCons] Add specific targets for building the docs
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'.
2014-03-13 21:35:39 +00:00
Ray Speth
e09c6ca304 Update compilation instructions 2014-03-13 21:35:32 +00:00
Ray Speth
f46f755057 [SCons] Remove unnecessary include directories 2014-03-13 21:35:24 +00:00
Ray Speth
2fb9ff630d Remove abandoned StatMech and PecosTransport classes 2014-03-13 21:35:11 +00:00
Victor Brunini
48ec4dc65c HMWSoln::s_update_lnMolalityActCoeff() performance improvement.
Only do the expensive update if state has changed.
2014-03-13 18:35:00 +00:00