mus_variable_module Module

This module provides all possible 'pure variables' (= no prefixes) for a given kind of simulation.

IMPORTANT NOTE: When you create a new variable, do not forget to add this variable name into mus_append_auxField, mus_store_derVarPos and also in mus_store_bcVarPos routine.


Uses

Used by

  • module~~mus_variable_module~~UsedByGraph module~mus_variable_module mus_variable_module module~mus_scheme_module mus_scheme_module module~mus_scheme_module->module~mus_variable_module module~mus_hvs_config_module mus_hvs_config_module module~mus_hvs_config_module->module~mus_scheme_module module~mus_config_module mus_config_module module~mus_hvs_config_module->module~mus_config_module module~mus_config_module->module~mus_scheme_module module~mus_tools_module mus_tools_module module~mus_config_module->module~mus_tools_module program~mus_harvesting mus_harvesting program~mus_harvesting->module~mus_scheme_module program~mus_harvesting->module~mus_hvs_config_module module~mus_hvs_aux_module mus_hvs_aux_module program~mus_harvesting->module~mus_hvs_aux_module module~mus_dynloadbal_module mus_dynLoadBal_module module~mus_dynloadbal_module->module~mus_scheme_module module~mus_dynloadbal_module->module~mus_tools_module module~mus_tracking_module mus_tracking_module module~mus_dynloadbal_module->module~mus_tracking_module module~mus_program_module mus_program_module module~mus_program_module->module~mus_scheme_module module~mus_program_module->module~mus_dynloadbal_module module~mus_program_module->module~mus_tools_module module~mus_aux_module mus_aux_module module~mus_program_module->module~mus_aux_module module~mus_tools_module->module~mus_scheme_module program~musubi musubi program~musubi->module~mus_config_module program~musubi->module~mus_program_module program~musubi->module~mus_aux_module module~mus_hvs_aux_module->module~mus_tools_module module~mus_hvs_aux_module->module~mus_tracking_module module~mus_tracking_module->module~mus_tools_module module~mus_aux_module->module~mus_tools_module module~mus_aux_module->module~mus_tracking_module module~mus_interpolate_verify_module mus_interpolate_verify_module module~mus_interpolate_verify_module->module~mus_config_module module~mus_control_module mus_control_module module~mus_control_module->module~mus_aux_module module~mus_flow_module mus_flow_module module~mus_flow_module->module~mus_interpolate_verify_module

Contents


Subroutines

public subroutine mus_build_varSys(varSys, solverData, schemeHeader, stencil, nFields, derVarPos, luaVar, field, globSrc, poss_srcVar, st_funList)

Build global variable system for Musubi

Arguments

TypeIntentOptionalAttributesName
type(tem_varSys_type), intent(inout) :: varSys

global variable system

type(mus_varSys_solverData_type), intent(in), target:: solverData

Contains pointer to solver data types

type(mus_scheme_header_type), intent(in) :: schemeHeader

identifier of the scheme

type(tem_stencilHeader_type), intent(in) :: stencil

Compute stencil header

integer, intent(in) :: nFields

number of fields

type(mus_derVarPos_type), intent(out), allocatable:: derVarPos(:)

store position of each variable for each field and mixture size: nFields+1

type(tem_variable_type), intent(in), allocatable:: luaVar(:)

additional variable defined in the lua file. Function pointer for this variables depends on its varType.

type(mus_field_type), intent(inout) :: field(:)

Field contains sources and boundary infos

type(mus_source_type), intent(inout) :: globSrc

global source

type(tem_possible_variable_type), intent(in) :: poss_srcVar

possible source variables

type(tem_st_fun_linkedList_type), intent(out) :: st_funList

contains spacetime functions of all variables

public subroutine mus_append_readVarAsStateVar(varSys, readVarIsPdf, read_varSys, stateVarMap, solverData, nFields, fldLabel)

Append variable read from restart file as state variables

Arguments

TypeIntentOptionalAttributesName
type(tem_varSys_type), intent(inout) :: varSys

global variable system

logical, intent(out) :: readVarIsPdf

Is true if read_varSys has pdf variable

type(tem_varSys_type), intent(in) :: read_varSys

Variable system loaded from restart header file

type(tem_varMap_type), intent(out) :: stateVarMap

Store position of state variable in global varSys

type(mus_varSys_solverData_type), intent(in), target:: solverData

Contains pointer to solver data types

integer, intent(in) :: nFields

number of fields

character(len=*), intent(in) :: fldLabel(:)

array of field label prefix. Size=nFields

public subroutine mus_append_stateVar(varSys, stateVarMap, solverData, schemeHeader, stencil, nFields, fldLabel)

Append state variable depends on the scheme kind

Read more…

Arguments

TypeIntentOptionalAttributesName
type(tem_varSys_type), intent(inout) :: varSys

global variable system

type(tem_varMap_type), intent(out) :: stateVarMap

Store position of state variable in global varSys

type(mus_varSys_solverData_type), intent(in), target:: solverData

Contains pointer to solver data types

type(mus_scheme_header_type), intent(in) :: schemeHeader

identifier of the scheme

type(tem_stencilHeader_type), intent(in) :: stencil

compute stencil defintion

integer, intent(in) :: nFields

number of fields

character(len=*), intent(in) :: fldLabel(:)

array of field label prefix. Size=nFields

public subroutine mus_append_auxField(varSys, solverData, schemeHeader, nFields, fldLabel, derVarName)

Append auxiliary variables which are computed from state and stored in auxField array using calcAuxField function

Arguments

TypeIntentOptionalAttributesName
type(tem_varSys_type), intent(inout) :: varSys

global variable system

type(mus_varSys_solverData_type), intent(in), target:: solverData

Contains pointer to solver data types

type(mus_scheme_header_type), intent(in) :: schemeHeader

identifier of the scheme

integer, intent(in) :: nFields

number of fields

character(len=*), intent(in) :: fldLabel(:)

array of field label prefix. Size=nFields

type(grw_labelarray_type), intent(inout) :: derVarName

array of derive physical variables

public subroutine mus_store_derVarPos(derVarPos, derVarName, varSys, nFields, fldLabel)

Store the position of each variable in the global system in the derVarPos This function is also called in Harvester.

Arguments

TypeIntentOptionalAttributesName
type(mus_derVarPos_type), intent(inout) :: derVarPos(:)

Position of derived variables

type(grw_labelarray_type), intent(in) :: derVarName

array of derive physical variables

type(tem_varSys_type), intent(in) :: varSys

global variable system

integer, intent(in) :: nFields

number of fields

character(len=*), intent(in) :: fldLabel(:)

array of field label prefix. Size=nFields

private subroutine mus_append_sourceVar(me, solverData, schemeHeader, varSys, nFields, stencil, poss_srcVar, fldLabel)

Build a variable system of all possible source terms for the given schemeKind

Arguments

TypeIntentOptionalAttributesName
type(mus_source_type), intent(inout) :: me

Contains source function pointer, source variable definition from lua and mapping of source variable in global varSys

type(mus_varSys_solverData_type), intent(in), target:: solverData

Contains pointer to solver data types

type(mus_scheme_header_type), intent(in) :: schemeHeader

Identifier of the scheme

type(tem_varSys_type), intent(inout) :: varSys

Global variable system

integer, intent(in) :: nFields

number of fields

type(tem_stencilHeader_type), intent(in) :: stencil

compute stencil defintion

type(tem_possible_variable_type), intent(in) :: poss_srcVar

possible source variables

character(len=*), intent(in), optional :: fldLabel

array of field label prefix required only for field source. If not present, it is assumed as global source

private subroutine mus_store_bcVarPos(field, nFields, varSys)

Store the position of each boundary variable in the global varSys in the field%bc%varPos%. This routine also checks if boundary variable defined in config file has same number of components as expected.

Arguments

TypeIntentOptionalAttributesName
type(mus_field_type), intent(inout) :: field(:)

Field containing boundary infos

integer, intent(in) :: nFields

number of fields

type(tem_varSys_type), intent(in) :: varSys

global variable system

private subroutine check_varSys_forPdfVar(readVarIsPdf, varSys, nFields, fldLabel)

This function runs over all variable loaded from restart file check if variables loaded are pdf variable or derive variable

Read more…

Arguments

TypeIntentOptionalAttributesName
logical, intent(out) :: readVarIsPdf

return true if variable read from restart file has pdf

type(tem_varSys_type), intent(in) :: varSys

variable system loaded from restart file

integer, intent(in) :: nFields

number of fields

character(len=*), intent(in) :: fldLabel(:)

array of field label prefix. Size=nFields