8 #ifndef CT_VALUECACHE_H 9 #define CT_VALUECACHE_H 34 state1(std::numeric_limits<double>::quiet_NaN()),
35 state2(std::numeric_limits<double>::quiet_NaN()),
36 stateNum(std::numeric_limits<int>::min()),
56 bool validate(
double state1New,
double state2New) {
69 bool validate(
double state1New,
int stateNumNew) {
94 bool validate(
double state1New,
double state2New,
int stateNumNew) {
int getId()
Get a unique id for a cached value.
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
int stateNum
A surrogate for the composition.
static int m_last_id
The last assigned id. Automatically incremented by the getId() method.
bool validate(int stateNumNew)
Check whether the currently cached value is valid based on stateNum.
bool validate(double state1New, int stateNumNew)
Check whether the currently cached value is valid based on state1 and stateNum.
std::map< int, CachedValue< vector_fp > > m_arrayCache
Cached array values.
CachedScalar getScalar(int id)
Get a reference to a CachedValue object representing a scalar (doublereal) with the given id...
std::map< int, CachedValue< double > > m_scalarCache
Cached scalar values.
void clear()
Clear all cached values.
bool validate(double state1New)
Check whether the currently cached value is valid based on a single state variable.
double state1
Value of the first state variable for the state at which value was evaluated, e.g.
double state2
Value of the second state variable for the state at which value was evaluated, e.g.
CachedArray getArray(int id)
Get a reference to a CachedValue object representing an array (vector_fp) with the given id...
T value
The value of the cached property.
Namespace for the Cantera kernel.
bool validate(double state1New, double state2New)
Check whether the currently cached value is valid based on state1 and state2.
bool validate(double state1New, double state2New, int stateNumNew)
Check whether the currently cached value is valid based on state1, state2, and stateNum.