Cantera
2.2.1
|
#include <ValueCache.h>
Public Member Functions | |
bool | validate (double state1New) |
Check whether the currently cached value is valid based on a single state variable. More... | |
bool | validate (double state1New, double state2New) |
Check whether the currently cached value is valid based on state1 and state2. More... | |
bool | validate (double state1New, int stateNumNew) |
Check whether the currently cached value is valid based on state1 and stateNum. More... | |
bool | validate (int stateNumNew) |
Check whether the currently cached value is valid based on stateNum. More... | |
bool | validate (double state1New, double state2New, int stateNumNew) |
Check whether the currently cached value is valid based on state1, state2, and stateNum. More... | |
Public Attributes | |
double | state1 |
Value of the first state variable for the state at which value was evaluated, e.g. More... | |
double | state2 |
Value of the second state variable for the state at which value was evaluated, e.g. More... | |
int | stateNum |
A surrogate for the composition. More... | |
T | value |
The value of the cached property. More... | |
A cached property value and the state at which it was evaluated
This struct stores the value of some property evaluated at a particular thermodynamic state. The value can be either a real scalar or an array, depending on the template parameter T
. The exact meaning of state1, state2, and stateNum is determined by the function using the cached value, which can check any combination of these variables before deciding whether to recompute the cached values.
References to CachedValue objects are returned by the "get" methods of ValueCache, e.g. ValueCache::getScalar. Functions accessing cached values should use the typedefs CachedScalar and CachedArray. See ValueCache for details on how these classes should be used together.
Definition at line 29 of file ValueCache.h.
|
inline |
Check whether the currently cached value is valid based on a single state variable.
If it is not valid it updates the stored state to the new state in addition to returning false.
Definition at line 41 of file ValueCache.h.
References CachedValue< T >::state1.
Referenced by MaskellSolidSolnPhase::_updateThermo(), HMWSoln::A_Debye_TP(), HMWSoln::calcDensity(), HMWSoln::dA_DebyedP_TP(), MaskellSolidSolnPhase::getActivityCoefficients(), HMWSoln::s_update_d2lnMolalityActCoeff_dT2(), HMWSoln::s_update_dlnMolalityActCoeff_dP(), and HMWSoln::s_update_dlnMolalityActCoeff_dT().
|
inline |
Check whether the currently cached value is valid based on state1 and state2.
If it is not valid it updates the stored state to the new state in addition to returning false.
Definition at line 53 of file ValueCache.h.
References CachedValue< T >::state1, and CachedValue< T >::state2.
|
inline |
Check whether the currently cached value is valid based on state1 and stateNum.
If it is not valid it updates the stored state to the new state in addition to returning false.
Definition at line 66 of file ValueCache.h.
References CachedValue< T >::state1, and CachedValue< T >::stateNum.
|
inline |
Check whether the currently cached value is valid based on stateNum.
If it is not valid it updates the stored state to the new state in addition to returning false.
Definition at line 79 of file ValueCache.h.
References CachedValue< T >::stateNum.
|
inline |
Check whether the currently cached value is valid based on state1, state2, and stateNum.
If it is not valid it updates the stored state to the new state in addition to returning false.
Definition at line 91 of file ValueCache.h.
References CachedValue< T >::state1, CachedValue< T >::state2, and CachedValue< T >::stateNum.
double state1 |
Value of the first state variable for the state at which value was evaluated, e.g.
temperature.
Definition at line 104 of file ValueCache.h.
Referenced by IdealGasPhase::_updateThermo(), and CachedValue< T >::validate().
double state2 |
Value of the second state variable for the state at which value was evaluated, e.g.
density or pressure.
Definition at line 108 of file ValueCache.h.
Referenced by CachedValue< T >::validate().
int stateNum |
A surrogate for the composition.
For cached properties of Phase, this should be set to Phase::stateMFNumber()
Definition at line 112 of file ValueCache.h.
Referenced by CachedValue< T >::validate().
T value |
The value of the cached property.
Definition at line 115 of file ValueCache.h.
Referenced by HMWSoln::dA_DebyedP_TP(), and MaskellSolidSolnPhase::getActivityCoefficients().