Commit graph

4974 commits

Author SHA1 Message Date
Ray Speth
197a70aab2 Fix to coverage data collection
Skip all the test_problem subdirectories to avoid generating a command line that
is too long for some versions of lcov to handle properly.
2014-04-14 18:36:50 +00:00
Ray Speth
fcf7edf694 Implement Sub::name and Sub::formula in the base class
Eliminates the need for redundant implementations in all the derived
classes. Also, make the return value a "const char*" to eliminate the dangerous
cast.
2014-04-14 18:36:32 +00:00
Ray Speth
f8ff70ed38 [ck2cti] Make 'PCHEB' and 'TCHEB' keywords case insensitive
Fixes Issue 213.
2014-04-08 19:39:16 +00:00
Ray Speth
c887c1b6fb Remove unnecessary calls to parseCompString 2014-04-08 19:39:06 +00:00
Ray Speth
53820ed4a3 [Test] Remove remnants of the old Python test suite 2014-04-08 16:27:19 +00:00
Ray Speth
8e91a34b82 [Test] Fix reported number of passed tests
The file used to identify the results of the individual Python 3 tests was being
truncated. Updating it incrementally seems to avoid the problem.
2014-04-08 16:27:06 +00:00
Ray Speth
f8ee065368 [Test] Fix test status report if Python test crashes 2014-04-08 16:27:01 +00:00
Ray Speth
051381d862 [Python] Allow setting composition of sliced Solution objects
The following syntax:

    >>> phase['H2','O2'].X = [1.0, 0.5]

Is equivalent to:

    >>> phase.X = 'H2:1.0, O2:0.5'
2014-04-08 16:26:47 +00:00
Ray Speth
d19f975940 [Python] Allow setting composition using a dict
The following syntax makes it easier to set the composition programmatically,
e.g. inside a for loop:

    phase.Y = {'H2':0.1, 'O2':0.4, 'AR':0.5}
2014-04-08 16:26:34 +00:00
Ray Speth
6449415933 [Thermo] Simplify setState specialization of SingleSpeciesTP
We don't need to override every function that sets the mass/mole fractions, just
the ones that would have actually done something.
2014-04-08 16:26:29 +00:00
Ray Speth
14ea7e64c6 [Thermo] make compositonMap a const argument 2014-04-08 16:26:20 +00:00
Ray Speth
d2ff7dbaaa [SCons] 'clean' removes auto-generated .rst files from examples 2014-04-08 16:26:11 +00:00
Ray Speth
beeaa21644 Deprecate unused stringUtils functions 2014-04-02 15:26:42 +00:00
Ray Speth
43546f870f fpValueCheck detects (invalid) decimal ponts in exponents 2014-04-02 15:26:31 +00:00
Ray Speth
4a6dd84f81 [Thermo] Check composition strings for invalid float literals 2014-04-02 15:26:20 +00:00
Ray Speth
14fe11d661 [Thermo] Miscellaneous cleanup of ThermoFactory 2014-03-28 23:13:11 +00:00
Ray Speth
3530050dc4 [Thermo] Remove redundant overrides of ThermoPhase::eosType() 2014-03-28 23:12:53 +00:00
Ray Speth
48042fd4ae [SCons] Workaround SCons dependency bug with Cygwin 2014-03-28 23:12:45 +00:00
Ray Speth
9e4ae0d050 Deprecate unused global 'error' function 2014-03-28 23:12:36 +00:00
Ray Speth
a17085661f [Fortran] Remove unhelpful error handling in _fkin() 2014-03-28 23:12:25 +00:00
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