modelbound_data_varlike_procedures Submodule

Contains module procedures associated with the variable-like modelbound data class



Module Functions

module function getDataDimVarlike(this, name) result(dim)

Get data dimensionality (0 if scalar, 1 if fluid, 2 if single harmonic, 3 if distribution)

Arguments

Type IntentOptional Attributes Name
class(ModelboundDataVarlike), intent(in) :: this
character(len=*), intent(in) :: name

Name of data

Return Value integer(kind=ik)


Module Subroutines

pure module subroutine initModelboundDataVarlike(this, dataList, derivationRules, partitionObj, indexingObj, xHaloWidth, varCont, procRank, dataDerivIndices)

Varlike modelbound data initialization routine

Arguments

Type IntentOptional Attributes Name
class(ModelboundDataVarlike), intent(inout) :: this
type(VariableList), intent(in) :: dataList

Variable list object storing names of data

type(CalculationRule), intent(in), dimension(:) :: derivationRules

Calculation rules for each 1D data

type(Partition), intent(in) :: partitionObj

Partition object used to initialize arrays

type(Indexing), intent(in) :: indexingObj

Indexing object used to get numV and numH

integer(kind=ik), intent(in) :: xHaloWidth

Halo width in the x direction

type(VariableContainer), intent(in) :: varCont

Reference variable container for required derivation vars

integer(kind=ik), intent(in) :: procRank

Rank of the current process

integer(kind=ik), intent(in), optional, dimension(:) :: dataDerivIndices

Data indices for which derivations require other modelbound data

module subroutine updateDataVarlike(this, hostModel, inputVars, updatePriority)

Update modelbound data based on input variable container

Arguments

Type IntentOptional Attributes Name
class(ModelboundDataVarlike), intent(inout) :: this
class(ModelSurrogate), intent(in) :: hostModel

Host model - unused

class(VariableContainer), intent(in) :: inputVars

Variable container used to calculate modelbound data

integer(kind=ik), intent(in), optional :: updatePriority

Priority for this update call (determines which variables are updated)

module subroutine copyDataVarlike(this, name, container)

Copy named modelbound data to passed container

Arguments

Type IntentOptional Attributes Name
class(ModelboundDataVarlike), intent(in) :: this
character(len=*), intent(in) :: name

Name of data

real(kind=rk), intent(inout), allocatable, dimension(..) :: container

Container to copy into - must be rank 1