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