
Houses all variables, both implicit and derived, as well as relevant support types
Get index of variable with given name
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | name |
Check whether variable with given index is a distribution function
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| integer(kind=ik), | intent(in) | :: | ind |
Check whether variable with given index is a scalar
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| integer(kind=ik), | intent(in) | :: | ind |
Check whether variable with given name is registered in either the implicit or derived list
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | name |
Check whether variable with given name is registered in either the implicit list
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | name |
Check whether variable with given name is on dual grid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | name |
Return variable name at index ind
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| integer(kind=ik), | intent(in) | :: | ind |
Return all variable names in this container
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this |
Return all implicit variable names in this container
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this |
Get depth of variable with given name
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | name |
Get max of derivationDepth
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this |
Check whether variable with given name is stationary
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| character(len=*), | intent(in) | :: | name |
Get lengths of variable data vectors (not including halos) based on a list of names
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(in) | :: | this | |||
| type(StringArray), | intent(in), | dimension(:) | :: | names |
Calculation rule object initialization routine
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CalculationRule), | intent(inout) | :: | this | |||
| class(Derivation), | intent(in), | optional | :: | deriv |
Derivation component |
|
| type(StringArray), | intent(in), | optional, | dimension(:) | :: | names |
Required variable names |
Variable container initialization routine
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(inout) | :: | this | |||
| type(VariableList), | intent(in) | :: | implicitVars |
List of implicit variables |
||
| type(VariableList), | intent(in) | :: | derivedVars |
List of derived variables |
||
| type(CalculationRule), | intent(in), | dimension(:) | :: | derivationRules |
Derivation rules corresponding to derived variables |
|
| type(Indexing), | intent(in) | :: | indexingObj |
Reference indexing object used to map between variables and implicit vectors |
||
| type(Partition), | intent(in) | :: | partitionObj |
Reference partition object |
||
| integer(kind=ik), | intent(in) | :: | xHaloWidth |
Width of halo in x-direction |
||
| integer(kind=ik), | intent(in) | :: | procRank |
Current processor rank |
Calculate derived variables from implicit variables using derivation rules. If derivPriority is supplied only those variables with priority <= derivPriority will be derived. If derivDepth is present only variables at that derivation depth are calculated, otherwise all variables are calculated
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(inout) | :: | this | |||
| integer(kind=ik), | intent(in), | optional | :: | derivPriority | ||
| integer(kind=ik), | intent(in), | optional | :: | derivDepth |
Extract implicit variables from a locally linearly indexed real vector
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(inout) | :: | this | |||
| real(kind=rk), | intent(in), | dimension(:) | :: | vec |
Copy variables into a locally linearly indexed real vector. If ignoreStationary is true copies any stationary variables as 0
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(inout) | :: | this | |||
| real(kind=rk), | intent(inout), | dimension(:) | :: | vec | ||
| logical, | intent(in), | optional | :: | ignoreStationary |
Copy variables into locally indexed vector by name
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(inout) | :: | this | |||
| real(kind=rk), | intent(inout), | allocatable, dimension(:) | :: | vec | ||
| type(StringArray), | intent(in), | dimension(:) | :: | names |
Copy variables from locally indexed vector by name
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(inout) | :: | this | |||
| real(kind=rk), | intent(in), | dimension(:) | :: | vec | ||
| type(StringArray), | intent(in), | dimension(:) | :: | names |
Zero all named variable values - useful for buffer containers
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VariableContainer), | intent(inout) | :: | this | |||
| type(StringArray), | intent(in), | dimension(:) | :: | names |
Object used to calculate derived variables using a derivation object and set of required variable names
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | userDefined | = | .false. |
True only if user explicitly sets it to true |
|
| class(Derivation), | public, | allocatable | :: | derivationMethod |
Derivation object used to calculate derived variables |
||
| type(StringArray), | public, | allocatable, dimension(:) | :: | requiredVarNames |
Names of variables required for the derivation |
| procedure, public :: isDefined => isDefinedObject | |
| procedure, public :: makeDefined => makeDefinedObject | |
| procedure, public :: makeUndefined => makeUndefinedObject | |
| procedure, public :: init => initCalculationRule |
Container for variable data, allows for handling conversion between local data storage and flattened vectors used for PETSc NOTE: Does not support single harmonic variables
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| logical, | public | :: | userDefined | = | .false. |
True only if user explicitly sets it to true |
|
| type(RealArray), | public, | allocatable, dimension(:) | :: | variables |
Value arrays for each stored variable in implicit,derived order |
||
| type(VariableList), | private | :: | implicitVarList |
List of implicit variables in container |
|||
| type(VariableList), | private | :: | derivedVarList |
List of derived variables in container |
|||
| type(CalculationRule), | private, | allocatable, dimension(:) | :: | derivationRules |
List of derivation rules - conforms in size with derived list |
||
| type(IntArray), | private, | allocatable, dimension(:) | :: | requiredDerivationIndices |
Indices of variables required by each derivation rule |
||
| type(IntArray), | private, | allocatable, dimension(:) | :: | implicitVarIndices |
Indices in local implicit vector corresponding to each variabls implicitToLocIndex |
||
| type(IntArray), | private, | allocatable, dimension(:) | :: | implicitToLocIndex |
Indices in each variable corresponding to their indices in the implicit vector |
||
| integer(kind=ik), | private, | allocatable, dimension(:) | :: | derivationDepth |
Numbers of layers of derived variables on which each derivation depends (e.g. 0 if all required variables are implicit, 1 if all required variables have derivation depth 0, etc.) - -1 for implicit variables |
||
| integer(kind=ik), | private | :: | maxDerivPriority |
Highest priority value (lowest priority) among derived variables, used in calculating derived quantities |
|||
| integer(kind=ik), | private, | allocatable, dimension(:) | :: | varLens |
Lengths of variables not including the halos |
| procedure, public :: isDefined => isDefinedObject | |
| procedure, public :: makeDefined => makeDefinedObject | |
| procedure, public :: makeUndefined => makeUndefinedObject | |
| procedure, public :: getVarIndex | |
| procedure, public :: isVarNameRegistered | |
| procedure, public :: calculateDerivedVars | |
| procedure, public :: extractImplicitVars | |
| procedure, public :: copyImplicitVarsToVec | |
| procedure, public :: isVarDist | |
| procedure, public :: isVarScalar | |
| procedure, public :: getVarName | |
| procedure, public :: getAllVarNames | |
| procedure, public :: getImplicitVarNames | |
| procedure, public :: isVarImplicit | |
| procedure, public :: isVarOnDualGrid | |
| procedure, public :: getVarDepth | |
| procedure, public :: getMaxDepth | |
| procedure, public :: copyNamedVarsToVec | |
| procedure, public :: copyNamedVarsFromVec | |
| procedure, public :: getVarLens | |
| procedure, public :: zeroVars | |
| procedure, public :: isStationary | |
| procedure, public :: init => initVarContainer |