tem_varMap_module Module

Contains varMap type definition to store requested variable position in the global varSys and routine to create varMap from given variable labels

This is especially useful wherever a set of variables needs to be provided, for example in tracking objects. There is a routine to read a list of labels, and one routine to look these labels up in a variable system, and store the position of each variable in that system.


Uses

Used by

  • module~~tem_varmap_module~~UsedByGraph module~tem_varmap_module tem_varMap_module module~tem_depend_module tem_depend_module module~tem_depend_module->module~tem_varmap_module module~tem_restart_module tem_restart_module module~tem_restart_module->module~tem_varmap_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_varmap_module module~hvs_output_module->module~tem_restart_module module~tem_bc_module tem_bc_module module~tem_bc_module->module~tem_varmap_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_varmap_module module~tem_tracking_module->module~hvs_output_module module~tem_simcontrol_module tem_simControl_module module~tem_tracking_module->module~tem_simcontrol_module module~tem_operation_var_module tem_operation_var_module module~tem_operation_var_module->module~tem_varmap_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_varmap_module module~tem_derived_module tem_derived_module module~tem_derived_module->module~tem_operation_var_module module~tem_general_module tem_general_module module~tem_general_module->module~tem_restart_module module~tem_general_module->module~tem_simcontrol_module module~tem_abortcriteria_module tem_abortCriteria_module module~tem_general_module->module~tem_abortcriteria_module module~tem_ini_condition_module tem_ini_condition_module module~tem_ini_condition_module->module~tem_depend_module program~tem_tracking_test tem_tracking_test program~tem_tracking_test->module~tem_tracking_module module~tem_simcontrol_module->module~tem_convergence_module module~tem_simcontrol_module->module~tem_abortcriteria_module module~tem_abortcriteria_module->module~tem_convergence_module program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->module~tem_derived_module program~tem_varsys_stfunvar_test->module~tem_general_module module~tem_utestenv_module tem_utestEnv_module program~tem_varsys_stfunvar_test->module~tem_utestenv_module program~tem_sparta_test tem_sparta_test program~tem_sparta_test->module~tem_general_module program~tem_sparta_test->module~tem_utestenv_module program~tem_varsys_derivevar_test tem_varSys_deriveVar_test program~tem_varsys_derivevar_test->module~tem_general_module program~tem_varsys_derivevar_test->module~tem_utestenv_module program~tem_varsys_statevar_test tem_varSys_stateVar_test program~tem_varsys_statevar_test->module~tem_general_module program~tem_varsys_statevar_test->module~tem_utestenv_module program~tem_variable_evaltype_test tem_variable_evaltype_test program~tem_variable_evaltype_test->module~tem_derived_module program~tem_variable_evaltype_test->module~tem_general_module program~tem_variable_evaltype_test->module~tem_utestenv_module program~tem_varsys_test tem_varSys_test program~tem_varsys_test->module~tem_general_module program~tem_varsys_test->module~tem_utestenv_module program~tem_spacetime_fun_test tem_spacetime_fun_test program~tem_spacetime_fun_test->module~tem_general_module program~tem_spacetime_fun_test->module~tem_utestenv_module program~tem_logical_opertor_test tem_logical_opertor_test program~tem_logical_opertor_test->module~tem_derived_module program~tem_logical_opertor_test->module~tem_general_module program~tem_logical_opertor_test->module~tem_utestenv_module program~bin_search_test bin_search_test program~bin_search_test->module~tem_general_module program~tem_variable_extract_test tem_variable_extract_test program~tem_variable_extract_test->module~tem_derived_module program~tem_variable_extract_test->module~tem_general_module program~tem_variable_extract_test->module~tem_utestenv_module program~tem_variable_combine_test tem_variable_combine_Test program~tem_variable_combine_test->module~tem_derived_module program~tem_variable_combine_test->module~tem_general_module program~tem_variable_combine_test->module~tem_utestenv_module program~tem_face_test tem_face_test program~tem_face_test->module~tem_general_module program~tem_face_test->module~tem_utestenv_module program~tem_face_test~2 tem_face_test program~tem_face_test~2->module~tem_general_module program~tem_face_test~2->module~tem_utestenv_module module~tem_utestenv_module->module~tem_general_module program~tem_face_test~3 tem_face_test program~tem_face_test~3->module~tem_general_module program~tem_face_test~3->module~tem_utestenv_module program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->module~tem_derived_module program~tem_varsys_opvar_test->module~tem_general_module program~tem_varsys_opvar_test->module~tem_utestenv_module

Contents


Interfaces

public interface init

public interface append

  • public subroutine append_possible_variable(me, varName, nComponents, pos)

    Arguments

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

    Possible variables

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

    variable name

    integer, intent(in) :: nComponents

    number of components

    integer, intent(out), optional :: pos

public interface truncate

public interface tem_variable_loadMapping

  • public subroutine tem_variable_loadMapping_vector(possVars, conf, parent, key, varDict, varSys)

    Loads the variable mapping from a table defined by given key for the variable names defined in possVars list. A variable mapping is used to link a user defined variable to a variable expected from, e.g., an equation system. These mappings are stored in varDict, which basically is a dictionary, whereas the key contains the name of the expected variable and the value contains the name of the user defined variable in the variable table.

    Arguments

    TypeIntentOptionalAttributesName
    type(tem_possible_variable_type), intent(in) :: possVars

    Possible variable names expected by the solver

    type(flu_state), intent(in) :: conf

    lua config file

    integer, intent(in), optional :: parent

    optional parent handle

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

    optional key for the table

    type(grw_stringkeyvaluepairarray_type), intent(inout) :: varDict

    The dictionary that contains the mapping between expected variables and the actual variables defined by the user.

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

    Variable system to append anonymous variables to.

  • public subroutine tem_variable_loadMapping_single(expectedName, conf, thandle, varDict, varSys, nComp, solverData_evalElem, ErrCode)

    Loads the variable mapping from a table for single expected name. A variable mapping is used to link a user defined variable to a variable expected from, e.g., an equation system. These mappings are stored in varDict, which basically is a dictionary, whereas the key contains the name of the expected variable and the value contains the name of the user defined variable in the variable table.

    Arguments

    TypeIntentOptionalAttributesName
    character(len=*), intent(in) :: expectedName

    Expected variable name from config file

    type(flu_state), intent(in) :: conf

    lua config file

    integer, intent(in) :: thandle

    table handle

    type(grw_stringkeyvaluepairarray_type), intent(inout) :: varDict

    The dictionary that contains the mapping between expected variables and the actual variables defined by the user.

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

    Variable system to append anonymous variables to.

    integer, intent(in), optional :: nComp

    Number of components we expect for this variable.

    type(tem_varSys_solverData_evalElem_type), intent(in), optional :: solverData_evalElem

    Routine to convert point information into an element representation.

    integer, intent(out), optional :: ErrCode

    Error code


Derived Types

type, public :: tem_varMap_type

Contains variable labels and their positions in a varSys

Components

TypeVisibilityAttributesNameInitial
type(grw_labelarray_type), public :: varName

Array of active variable labels

type(grw_intarray_type), public :: varPos

Position of appended variable in the global variable system

integer, public :: nScalars

number of scalars of variables in varPos

Contains possible variable labels and their nComponents

Components

TypeVisibilityAttributesNameInitial
type(dyn_labelarray_type), public :: varName

Array of possible variable labels

type(grw_intarray_type), public :: nComponents

Number of components of variable in dynamic array of varName


Subroutines

public subroutine init_possible_variable(me, length)

Arguments

TypeIntentOptionalAttributesName
type(tem_possible_variable_type), intent(out) :: me

Possible variables

integer, intent(in) :: length

Minimum length to expand the array

public subroutine append_possible_variable(me, varName, nComponents, pos)

Arguments

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

Possible variables

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

variable name

integer, intent(in) :: nComponents

number of components

integer, intent(out), optional :: pos

public subroutine truncate_possible_variable(me)

Arguments

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

Possible variables

public subroutine tem_variable_loadMapping_vector(possVars, conf, parent, key, varDict, varSys)

Loads the variable mapping from a table defined by given key for the variable names defined in possVars list. A variable mapping is used to link a user defined variable to a variable expected from, e.g., an equation system. These mappings are stored in varDict, which basically is a dictionary, whereas the key contains the name of the expected variable and the value contains the name of the user defined variable in the variable table.

Arguments

TypeIntentOptionalAttributesName
type(tem_possible_variable_type), intent(in) :: possVars

Possible variable names expected by the solver

type(flu_state), intent(in) :: conf

lua config file

integer, intent(in), optional :: parent

optional parent handle

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

optional key for the table

type(grw_stringkeyvaluepairarray_type), intent(inout) :: varDict

The dictionary that contains the mapping between expected variables and the actual variables defined by the user.

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

Variable system to append anonymous variables to.

public subroutine tem_variable_loadMapping_single(expectedName, conf, thandle, varDict, varSys, nComp, solverData_evalElem, ErrCode)

Loads the variable mapping from a table for single expected name. A variable mapping is used to link a user defined variable to a variable expected from, e.g., an equation system. These mappings are stored in varDict, which basically is a dictionary, whereas the key contains the name of the expected variable and the value contains the name of the user defined variable in the variable table.

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: expectedName

Expected variable name from config file

type(flu_state), intent(in) :: conf

lua config file

integer, intent(in) :: thandle

table handle

type(grw_stringkeyvaluepairarray_type), intent(inout) :: varDict

The dictionary that contains the mapping between expected variables and the actual variables defined by the user.

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

Variable system to append anonymous variables to.

integer, intent(in), optional :: nComp

Number of components we expect for this variable.

type(tem_varSys_solverData_evalElem_type), intent(in), optional :: solverData_evalElem

Routine to convert point information into an element representation.

integer, intent(out), optional :: ErrCode

Error code

public subroutine tem_create_varMap(varName, varSys, varMap)

Creates a variable map. Therefore it looks for the variables stored in varname in the varSys. If found, the name and the corresponding position in the varSys is added to the resultung varMap.

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: varName(:)

array of variable labels

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

variable system to look for varName

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

Contains position of varname in given varSys