State#
State, a container for data.
State is a simple data-manager, allowing PKs to require, read, and write various fields.
Acts as a factory for data through the various require methods.
Provides some data protection by providing both const and non-const data pointers to PKs.
Provides some initialization capability – this is where all independent variables can be initialized (as independent variables are owned by state, not by any PK).
state-spec
“evaluators”
[evaluator-typedinline-spec-list]
A list of evaluators.“initial conditions”
[list]
A list of constant-in-time data. Note that “initial conditions” is not a particularly descriptive name here – PDE initial conditions are generally not here. This list consists of“model parameters”
[list]
A list of shared model parameters that can be used across all evaluators.
evaluator-typedinline-spec
“evaluator type”
[string]
Type of the evaluator Included for convenience in defining data that is not in the dependency graph, constants are things (like gravity, or atmospheric pressure) which are stored in state but never change. Typically they’re limited to scalars and dense, local vectors.
Example:
<ParameterList name="state">
<Parameter name="initialization filename" type="string" value="_CHECK00123.h5"/>
<ParameterList name="evaluators">
<ParameterList name="pressure">
<Parameter name="evaluator type" type="string" value="primary variable" />
</ParameterList>
</ParameterList>
<ParameterList name="initial conditions">
<Parameter name="time" type="double" value="0.0">
<ParameterList name="atmospheric pressure">
<Parameter name="value" type="double" value="101325.0" />
</ParameterList>
<ParameterList name="gravity">
<Parameter name="value" type="Array(double)" value="{0.0,0.0,-9.80665}" />
</ParameterList>
</ParameterList>
</ParameterList>
State consists of two sublists, one for evaluators and the other for atomic constants. The latter is currently called “initial conditions”, which is a terrible name which must be fixed.
Evaluators are individual terms used to build up a PK or MPCs. Each term represents a variable in the equation, and can consist of primary variables (those that are solved for by a PK solver), independent variables (those that have no dependent variables but are provided by the user as data), and secondary variables (those that are functions of other variables). Note that all three may be variable in space and/or time.
Example:
<ParameterList name="state">
<ParameterList name="field evaluators">
...
</ParameterList>
<ParameterList name="initial conditions">
...
</ParameterList>
</ParameterList>
- Primary Variables
- Independent Variables
- Secondary Variables
- Conserved quantities
- Subsurface flow evaluators
- Surface flow evaluators
- Thermodynamic evaluators
- Equations of State
- Surface energy balance evaluators
- Snow evaluators
- Canopy evaluators
- Carbon and Biogeochemistry Models
- Multiscale Models
- Geometric evaluators
- Generic evaluators