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~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_varmap_module module~tem_restart_module tem_restart_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_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_varmap_module module~tem_depend_module tem_depend_module module~tem_depend_module->module~tem_varmap_module module~tem_operation_var_module tem_operation_var_module module~tem_operation_var_module->module~tem_varmap_module module~tem_restart_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_abortcriteria_module tem_abortCriteria_module module~tem_abortcriteria_module->module~tem_convergence_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_abortcriteria_module module~tem_general_module->module~tem_simcontrol_module module~tem_ini_condition_module tem_ini_condition_module module~tem_ini_condition_module->module~tem_depend_module module~tem_simcontrol_module->module~tem_convergence_module module~tem_simcontrol_module->module~tem_abortcriteria_module

Interfaces

public interface init

public interface append

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

    Arguments

    Type IntentOptional Attributes Name
    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

    Type IntentOptional Attributes Name
    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

    Type IntentOptional Attributes Name
    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

Type Visibility Attributes Name Initial
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

type, public ::  tem_possible_variable_type

Contains possible variable labels and their nComponents

Components

Type Visibility Attributes Name Initial
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

Type IntentOptional Attributes Name
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

Type IntentOptional Attributes Name
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

Type IntentOptional Attributes Name
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

Type IntentOptional Attributes Name
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

Type IntentOptional Attributes Name
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

Type IntentOptional Attributes Name
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