tem_varSys_module Module

The variable system allows the description of arbitrary quantities and their relations.

Its meant to enable the extraction of most of the data in the solver, but also to describe additional quantities to be used by the solvers.


Uses

  • module~~tem_varsys_module~~UsesGraph module~tem_varsys_module tem_varSys_module aot_out_module aot_out_module module~tem_varsys_module->aot_out_module aot_table_module aot_table_module module~tem_varsys_module->aot_table_module aotus_module aotus_module module~tem_varsys_module->aotus_module iso_c_binding iso_c_binding module~tem_varsys_module->iso_c_binding module~env_module env_module module~tem_varsys_module->module~env_module module~tem_aux_module tem_aux_module module~tem_varsys_module->module~tem_aux_module module~tem_dyn_array_module tem_dyn_array_module module~tem_varsys_module->module~tem_dyn_array_module module~tem_logging_module tem_logging_module module~tem_varsys_module->module~tem_logging_module module~tem_time_module tem_time_module module~tem_varsys_module->module~tem_time_module module~treelmesh_module treelmesh_module module~tem_varsys_module->module~treelmesh_module module~env_module->aotus_module flu_binding flu_binding module~env_module->flu_binding iso_fortran_env iso_fortran_env module~env_module->iso_fortran_env mpi mpi module~env_module->mpi module~tem_aux_module->aot_table_module module~tem_aux_module->aotus_module module~tem_aux_module->module~env_module module~tem_aux_module->module~tem_logging_module module~tem_aux_module->flu_binding module~soi_revision_module soi_revision_module module~tem_aux_module->module~soi_revision_module module~tem_comm_env_module tem_comm_env_module module~tem_aux_module->module~tem_comm_env_module module~tem_lua_requires_module tem_lua_requires_module module~tem_aux_module->module~tem_lua_requires_module module~tem_tools_module tem_tools_module module~tem_aux_module->module~tem_tools_module module~tem_aux_module->mpi module~tem_dyn_array_module->module~env_module module~tem_logging_module->aot_table_module module~tem_logging_module->aotus_module module~tem_logging_module->module~env_module module~tem_time_module->aot_out_module module~tem_time_module->aot_table_module module~tem_time_module->aotus_module module~tem_time_module->module~env_module module~tem_time_module->mpi module~treelmesh_module->aot_table_module module~treelmesh_module->aotus_module module~treelmesh_module->module~env_module module~treelmesh_module->module~tem_aux_module module~treelmesh_module->module~tem_logging_module module~tem_global_module tem_global_module module~treelmesh_module->module~tem_global_module module~tem_property_module tem_property_module module~treelmesh_module->module~tem_property_module module~tem_sparta_module tem_Sparta_module module~treelmesh_module->module~tem_sparta_module module~treelmesh_module->module~tem_tools_module module~tem_topology_module tem_topology_module module~treelmesh_module->module~tem_topology_module module~treelmesh_module->mpi module~tem_comm_env_module->mpi module~tem_global_module->aot_out_module module~tem_global_module->aot_table_module module~tem_global_module->aotus_module module~tem_global_module->module~env_module module~tem_global_module->module~tem_aux_module module~tem_global_module->module~tem_logging_module module~tem_global_module->mpi module~tem_prophead_module tem_prophead_module module~tem_global_module->module~tem_prophead_module module~tem_lua_requires_module->aot_table_module module~tem_lua_requires_module->aotus_module module~tem_lua_requires_module->iso_c_binding module~tem_lua_requires_module->module~env_module module~tem_lua_requires_module->flu_binding module~tem_property_module->module~env_module module~tem_property_module->mpi module~tem_property_module->module~tem_prophead_module module~tem_sparta_module->module~env_module module~tem_sparta_module->module~tem_aux_module module~tem_sparta_module->module~tem_logging_module module~tem_sparta_module->mpi module~tem_float_module tem_float_module module~tem_sparta_module->module~tem_float_module module~tem_tools_module->module~env_module module~tem_topology_module->module~env_module module~tem_float_module->module~env_module module~tem_prophead_module->aot_out_module module~tem_prophead_module->aot_table_module module~tem_prophead_module->aotus_module module~tem_prophead_module->module~env_module module~tem_prophead_module->mpi

Used by

  • module~~tem_varsys_module~~UsedByGraph module~tem_varsys_module tem_varSys_module module~hvs_ascii_module hvs_ascii_module module~hvs_ascii_module->module~tem_varsys_module module~tem_reduction_spatial_module tem_reduction_spatial_module module~hvs_ascii_module->module~tem_reduction_spatial_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_varsys_module module~hvs_output_module->module~hvs_ascii_module module~hvs_vtk_module hvs_vtk_module module~hvs_output_module->module~hvs_vtk_module module~tem_restart_module tem_restart_module module~hvs_output_module->module~tem_restart_module module~tem_varmap_module tem_varMap_module module~hvs_output_module->module~tem_varmap_module module~hvs_vtk_module->module~tem_varsys_module module~hvs_vtk_module~2 hvs_vtk_module module~hvs_vtk_module~2->module~tem_varsys_module module~tem_bc_module tem_bc_module module~tem_bc_module->module~tem_varsys_module module~tem_bc_module->module~tem_varmap_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_varsys_module module~tem_convergence_module->module~tem_reduction_spatial_module module~tem_convergence_module->module~tem_varmap_module module~tem_coordinate_module tem_coordinate_module module~tem_coordinate_module->module~tem_varsys_module module~tem_depend_module tem_depend_module module~tem_depend_module->module~tem_varsys_module module~tem_depend_module->module~tem_varmap_module module~tem_derived_module tem_derived_module module~tem_derived_module->module~tem_varsys_module module~tem_operation_var_module tem_operation_var_module module~tem_derived_module->module~tem_operation_var_module module~tem_spacetime_var_module tem_spacetime_var_module module~tem_derived_module->module~tem_spacetime_var_module module~tem_variable_module tem_variable_module module~tem_derived_module->module~tem_variable_module module~tem_logical_operation_var_module tem_logical_operation_var_module module~tem_logical_operation_var_module->module~tem_varsys_module module~tem_meshinfo_module tem_meshInfo_module module~tem_meshinfo_module->module~tem_varsys_module module~tem_operation_var_module->module~tem_varsys_module module~tem_operation_var_module->module~tem_logical_operation_var_module module~tem_operation_var_module->module~tem_variable_module module~tem_operation_var_module->module~tem_varmap_module module~tem_reduction_spatial_module->module~tem_varsys_module module~tem_restart_module->module~tem_varsys_module module~tem_restart_module->module~tem_varmap_module module~tem_spacetime_var_module->module~tem_varsys_module module~tem_spacetime_var_module->module~tem_variable_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_varsys_module module~tem_tracking_module->module~hvs_output_module module~tem_tracking_module->module~tem_reduction_spatial_module module~tem_tracking_module->module~tem_varmap_module module~tem_simcontrol_module tem_simControl_module module~tem_tracking_module->module~tem_simcontrol_module module~tem_variable_module->module~tem_varsys_module module~tem_varmap_module->module~tem_varsys_module module~tem_varmap_module->module~tem_spacetime_var_module module~tem_abortcriteria_module tem_abortCriteria_module module~tem_abortcriteria_module->module~tem_convergence_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

initialize the dynamic array

  • public subroutine init_ga_varop(me, length)

    Arguments

    Type IntentOptional Attributes Name
    type(grw_varoparray_type), intent(out) :: me
    integer, intent(in), optional :: length

public interface truncate

truncate the array, meaning cut off the trailing empty entries

public interface empty

empty the entries without changing arrays

public interface destroy

destroy the dynamic array

public interface placeat

insert an element at a given position

  • public subroutine placeat_ga_varop(me, val, pos, length)

    adds the value to a given position inside the growing array.

    if the requested position is outside the current array bounds, the array will be resized accordingly. if it is inside the current array bounds, the element at the requested position will be replaced.

    Arguments

    Type IntentOptional Attributes Name
    type(grw_varoparray_type) :: me
    type(tem_varSys_op_type), intent(in) :: val
    integer, intent(in) :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

  • public subroutine placeat_ga_varop_vec(me, val, pos, length)

    adds the values starting from a given position inside the growing array.

    if the requested position is outside the current array bounds, the array will be resized accordingly. if it is inside the current array bounds, the elements starting from the requested position will be replaced up to the element at position pos + size(val) - 1.

    Arguments

    Type IntentOptional Attributes Name
    type(grw_varoparray_type) :: me
    type(tem_varSys_op_type), intent(in) :: val(:)
    integer, intent(in) :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

public interface append

append a value to the dynamic array and return its position.

public interface expand

increase the size of the container for the array.

  • public subroutine expand_ga_varop(me, pos, length)

    Arguments

    Type IntentOptional Attributes Name
    type(grw_varoparray_type) :: me
    integer, intent(in), optional :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

public interface tem_varSys_load

  • public subroutine tem_varSys_load_vector(me, conf, parent, key)

    Load variable system(s) from a lua file

    Arguments

    Type IntentOptional Attributes Name
    type(tem_varSys_type), intent(out), allocatable :: me(:)

    The variable system to read in

    type(flu_State) :: conf

    Lua handle connected to the script to read the table from

    integer, intent(in), optional :: parent

    A parent table handle in which to look the current variables up

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

    load from this key

  • public subroutine tem_varSys_load_single(me, conf, parent, key, openTable)

    load varSys from lua file. Required for harvester to load varSys from tracking or restart header file.

    Arguments

    Type IntentOptional Attributes Name
    type(tem_varSys_type), intent(out) :: me

    varSys to read from the Lua script(conf) and fill

    type(flu_State) :: conf

    Lua handle connected to the script to read the table from

    integer, intent(in), optional :: parent

    A parent table handle in which to look the current variable up

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

    load varsys from this key

    logical, intent(in), optional :: openTable

public interface tem_varSys_dump

  • public subroutine tem_varSys_dump_vector(me, outUnit, dumpVarPos)

    Dumps array of varSys to given unit

    Arguments

    Type IntentOptional Attributes Name
    type(tem_varSys_type), intent(in) :: me(:)

    variable to write into the lua file

    integer, intent(inout) :: outUnit

    unit to write to

    integer, intent(in), optional :: dumpVarPos(:)

    Position of variables to dump

  • public subroutine tem_varSys_dump_single(me, outUnit, dumpVarPos)

    Dump single varSys to given unit

    Arguments

    Type IntentOptional Attributes Name
    type(tem_varSys_type), intent(in) :: me

    variable to write into the lua file

    integer, intent(inout) :: outUnit

    unit to write to

    integer, intent(in), optional :: dumpVarPos(:)

    Position of variables to dump

public interface tem_varSys_out

  • public subroutine tem_varSys_out_vector(me, conf, dumpVarPos)

    Allows the output of array of varSys to lua out

    Arguments

    Type IntentOptional Attributes Name
    type(tem_varSys_type), intent(in) :: me(:)

    variable to write into the lua file

    type(aot_out_type), intent(inout) :: conf

    aotus type handling the output to the file in lua format

    integer, intent(in), optional :: dumpVarPos(:)

    Position of variables to dump

  • public subroutine tem_varSys_out_single(me, conf, dumpVarPos, level)

    Write the system of variables description into a Lua file. use the aotus_out functions for doing so, in order to obtain a neatly formatted lua file

    Arguments

    Type IntentOptional Attributes Name
    type(tem_varSys_type), intent(in) :: me

    Variable system to write out

    type(aot_out_type), intent(inout) :: conf

    Aotus type handling the output to the file in lua format

    integer, intent(in), optional :: dumpVarPos(:)

    Position of variables to dump

    integer, intent(in), optional :: level

    to dump varSys with key or without key

public interface assignment(=)

  • public subroutine copy_varOp(left, right)

    This function provides the assignment operator of tem_varSys_op_type

    Arguments

    Type IntentOptional Attributes Name
    type(tem_varSys_op_type), intent(out) :: left

    varSys op to copy to

    type(tem_varSys_op_type), intent(in) :: right

    varSys op to copy from


Abstract Interfaces

abstract interface

  • public subroutine tem_varSys_proc_point(fun, varSys, point, time, tree, nPnts, res)

    Interface description for a variable access method (single point).

    To obtain values of a given variable, it is necessary to state the space and time at which the variable should be evaluated. The interface is vectorized and provides n values at n different space locations at the same time. Of course the variable system itself also needs to be passed in, to allow the computation of other derived quantities as needed. The method description itself is passed in automatically, and has not to be provided explicitly.

    Arguments

    Type IntentOptional Attributes Name
    class(tem_varSys_op_type), intent(in) :: fun

    Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

    The variable system to obtain the variable from.

    real(kind=rk), intent(in) :: point(:,:)

    Three-dimensional coordinates at which the variable should be evaluated. Only useful for variables provided as space-time functions.

    type(tem_time_type), intent(in) :: time

    Point in time at which to evaluate the variable.

    type(treelmesh_type), intent(in) :: tree

    global treelm mesh info

    integer, intent(in) :: nPnts

    Number of values to obtain for this variable (vectorized access).

    real(kind=rk), intent(out) :: res(:)

    Resulting values for the requested variable.

    Dimension: n requested entries x nComponents of this variable Access: (iElem-1)*fun%nComponents + iComp

abstract interface

  • public subroutine tem_varSys_proc_element(fun, varSys, elempos, time, tree, nElems, nDofs, res)

    Interface description for a variable access method (complete element).

    To obtain values of a given variable, it is necessary to state the treeID and time at which the variable should be evaluated. The interface is nDofs values to cover the all degrees of freedoms in the element. Of course the variable system itself also needs to be passed in, to allow the computation of other derived quantities as needed. The method description itself is passed in automatically, and has not to be provided explicitly.

    Arguments

    Type IntentOptional Attributes Name
    class(tem_varSys_op_type), intent(in) :: fun

    Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

    The variable system to obtain the variable from.

    integer, intent(in) :: elempos(:)

    Position of element in tree%treeID to get the variable for.

    type(tem_time_type), intent(in) :: time

    Point in time at which to evaluate the variable.

    type(treelmesh_type), intent(in) :: tree

    global treelm mesh info

    integer, intent(in) :: nElems

    Number of elements to obtain for this variable (vectorized access).

    integer, intent(in) :: nDofs

    Number of degrees of freedom within an element.

    real(kind=rk), intent(out) :: res(:)

    Resulting values for the requested variable.

    Linearized array dimension: (nComponents of resulting variable) x (nDegrees of freedom) x (nElems) Access: (iElem-1)fun%nComponentsnDofs + (iDof-1)*fun%nComponents + iComp

abstract interface

  • public subroutine tem_varSys_proc_setParams(fun, varSys, instring)

    Interface description for a variable to set parameter in data type stored in method_data.

    To set the parameter, provide a string (recommended in lua format). Depends on variable procedure, input string will be processed and information will be store in method_data. For operation variable, pass the information down to its input_variable.

    Arguments

    Type IntentOptional Attributes Name
    class(tem_varSys_op_type), intent(in) :: fun

    Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

    The variable system to obtain the variable from.

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

    Input string with parameter to set in method_data

abstract interface

  • public subroutine tem_varSys_proc_getParams(fun, varSys, instring, outstring)

    Interface description for a variable to get parameter in data type stored in method_data.

    To get the parameter, provide requested parameter via instring (recommended in lua format) and routine returns the parameter via outstring in lua format. For operation variable, pass the information down to its input_variable.

    Arguments

    Type IntentOptional Attributes Name
    class(tem_varSys_op_type), intent(in) :: fun

    Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

    The variable system to obtain the variable from.

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

    Input string with parameter to set in method_data

    character(len=*), intent(out) :: outstring

    Output string with requested parameter value from method_data

abstract interface

  • public subroutine tem_varSys_proc_setupIndices(fun, varSys, point, offset_bit, iLevel, tree, nPnts, idx)

    Interface description for a variable to setup point sets and return indices of points in the 1D growing array.

    Before setupIndices, use setParams to set information about boundary or sources in the spacetime function type. Points are stored in the 1D growing array for each dimension in the level wise list in the method_data. offset_bit is required for each point on boundaries so the remote domain can use this offset to identify rank for the point. If offset_bit is not present then default is set to element center i.e offset_bit = achar(1+4+16).

    For state variable, this routine will also compute elemPos in the given level and local_coord for every point. Elempos and local_coord are stored in same place as growing array of points.

    For spacetime function variable, if function is time independent then values are computed and stored level wise after all points are added to spacetime function.

    Arguments

    Type IntentOptional Attributes Name
    class(tem_varSys_op_type), intent(in) :: fun

    Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

    The variable system to obtain the variable from.

    real(kind=rk), intent(in) :: point(:,:)

    List of space coordinate points to store as growing array in method_data

    character(len=1), intent(in), optional :: offset_bit(:)

    Offset bit encoded as character for every point.

    Offset integer coord(3) is converted into a character with offset_bit = achar( (coord(1)+1) + (coord(2)+1)4 + (coord(3)+1)16 ) Backward transformation form character to 3 integer: coord(1) = mod(ichar(offset_bit),4) - 1 coord(2) = mod(ichar(offset_bit),16)/4 - 1 coord(3) = ichar(offset_bit)/16 - 1

    If not present default is to center i.e offset_bit = achar(1+4+16)

    integer, intent(in) :: iLevel

    Level to which input points belong to

    type(treelmesh_type), intent(in) :: tree

    global treelm mesh info

    integer, intent(in) :: nPnts

    Number of points to add in method_data of this variable

    integer, intent(out) :: idx(:)

    Index of points in the growing array and variable val array. Size: n

    This must be stored in boundary or source depends on who calls this routine. This index is required to return a value using getValOfIndex.

abstract interface

  • public subroutine tem_varSys_proc_getValOfIndex(fun, varSys, time, iLevel, idx, idxLen, nVals, res)

    Interface description for a variable to return a value at the given index position in the growing array points set stored in method_data.

    For spacetime function, if value is pre-stored, it will return a value at given index else if will evaluate a variable at index of a point for a given time and return a value.

    If index is not present and first is present then index is computed from first and number of return value (n).

    Arguments

    Type IntentOptional Attributes Name
    class(tem_varSys_op_type), intent(in) :: fun

    Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

    The variable system to obtain the variable from.

    type(tem_time_type), intent(in) :: time

    Point in time at which to evaluate the variable.

    integer, intent(in) :: iLevel

    Level on which values are requested

    integer, intent(in) :: idx(:)

    Index of points in the growing array and variable val array to return. Size: most times nVals, if contiguous arrays are used it depends on the number of first indices

    integer, intent(in), optional :: idxLen(:)

    With idx as start index in contiguous memory, idxLength defines length of each contiguous memory Size: dependes on number of first index for contiguous array, but the sum of all idxLen is equal to nVals

    integer, intent(in) :: nVals

    Number of values to obtain for this variable (vectorized access).

    real(kind=rk), intent(out) :: res(:)

    Resulting values for the requested variable.

    Dimension: n requested entries x nComponents of this variable Access: (iElem-1)*fun%nComponents + iComp

abstract interface

  • public subroutine tem_varsys_set_evalelem(set_elem_eval, fun)

    Arguments

    Type IntentOptional Attributes Name
    class(tem_varSys_solverData_evalElem_type), intent(in) :: set_elem_eval

    Description on how to set the element retrieval function for stfuns. and solver specific operation variables

    type(tem_varSys_op_type), intent(inout) :: fun

    Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.


Derived Types

type, public ::  tem_varSys_op_type

Description of the method how to obtain a variable

Components

Type Visibility Attributes Name Initial
integer, public :: mypos

Position of this variable in the variable system.

integer, public, allocatable :: state_varPos(:)

Position of state variable in the state array Currently used only in MUSUBI to access one dimensional state array

integer, public, allocatable :: auxField_varPos(:)

Position of auxiliary variable in the auxilied field array Currently used only in MUSUBI to access one dimensional auxiliary array In Musubi, auxField vars are conserved macroscopic quantities computed from PDF state

integer, public :: nComponents

Number of components for this variable.

integer, public :: nInputs

Number of variables, that are needed as input for the operation to obtain the variable.

integer, public, allocatable :: input_varPos(:)

Position of the input variables in the variable system.

Read more…
integer, public, allocatable :: input_varIndex(:)

Component index of the input variable in the variable system. It is used only when there is only one input variable. Index values must not be zero and > nComponents of input variable

type(c_ptr), public :: method_data

Data that is required by the get method.

character(len=labelLen), public :: operType

Operation type

procedure(tem_varSys_proc_point), public, pointer :: get_point => null()

Function to actually obtain the variable at a given point.

Read more…
procedure(tem_varSys_proc_element), public, pointer :: get_element => null()

Function to actually obtain the variable in a given element.

procedure(tem_varSys_proc_setParams), public, pointer :: set_params => null()

Function to set parameter in the data_type stored in method_data.

procedure(tem_varSys_proc_getParams), public, pointer :: get_params => null()

Function to get parameter in the data_type stored in method_data

procedure(tem_varSys_proc_setupIndices), public, pointer :: setup_indices => null()

Function to setup points set for boundaries and sources. Pointe set are stored in method_data level wise 1D growing array for dimension X,Y and Z. * For solver variables, points are stored in solver container. * For spacetime variables, points are stored in spacetime function. * For operation variables, points are passed down to its input_variable.

procedure(tem_varSys_proc_getValOfIndex), public, pointer :: get_valOfIndex => null()

Function to get value for point set stored in method_data for requested index in point set. This function either returns a pre-stored value or compute value depends on variable type and spacetime function. For time-independent spacetime function, values are computed in setupIndices and growing array of points are deleted

type, public ::  grw_varoparray_type

growing array type for type(tem_varsys_op_type)

Components

Type Visibility Attributes Name Initial
integer, public :: nvals = 0
integer, public :: containersize = 0
type(tem_varSys_op_type), public, allocatable :: val(:)

type, public ::  tem_varSys_type

Description of the variable system.

Components

Type Visibility Attributes Name Initial
character(len=LabelLen), public :: SystemName

A descriptive name for this system of variables.

integer, public :: nStateVars = 0

Number of variables in the state.

integer, public :: nScalars = 0

Number of scalars in the state.

Read more…
integer, public :: nAuxVars = 0

Number of auxField variables

integer, public :: nAuxScalars

Number of scalars in the auxField This keeps track of the length of the auxField array

type(grw_varoparray_type), public :: method

Definition of how to obtain a variable.

type(dyn_labelarray_type), public :: varname

List of variables in the system.

A supporting data type to define a solver specific element evaluation for stfuns.

Components

Type Visibility Attributes Name Initial
type(c_ptr), public :: solver_bundle

Data from the solver for the evaluation.

procedure(tem_varsys_set_evalelem), public, pointer :: stFun_setter => null()

Callback function to set the appropriate function for stFun vars.

procedure(tem_varsys_set_evalelem), public, pointer :: opVar_setter => null()

Callback function to set the appropriate function for solver specific operation vars.


Subroutines

public subroutine init_ga_varop(me, length)

Arguments

Type IntentOptional Attributes Name
type(grw_varoparray_type), intent(out) :: me
integer, intent(in), optional :: length

public subroutine destroy_ga_varop(me)

Arguments

Type IntentOptional Attributes Name
type(grw_varoparray_type), intent(inout) :: me

public subroutine truncate_ga_varop(me)

Arguments

Type IntentOptional Attributes Name
type(grw_varoparray_type) :: me

public subroutine empty_ga_varop(me)

Arguments

Type IntentOptional Attributes Name
type(grw_varoparray_type) :: me

public subroutine placeat_ga_varop(me, val, pos, length)

adds the value to a given position inside the growing array.

Read more…

Arguments

Type IntentOptional Attributes Name
type(grw_varoparray_type) :: me
type(tem_varSys_op_type), intent(in) :: val
integer, intent(in) :: pos
integer, intent(in), optional :: length

optional length to expand the array

public subroutine placeat_ga_varop_vec(me, val, pos, length)

adds the values starting from a given position inside the growing array.

Read more…

Arguments

Type IntentOptional Attributes Name
type(grw_varoparray_type) :: me
type(tem_varSys_op_type), intent(in) :: val(:)
integer, intent(in) :: pos
integer, intent(in), optional :: length

optional length to expand the array

public subroutine append_ga_varop(me, val, length)

Arguments

Type IntentOptional Attributes Name
type(grw_varoparray_type) :: me
type(tem_varSys_op_type), intent(in) :: val
integer, intent(in), optional :: length

optional length to expand the array

public subroutine append_ga_varop_vec(me, val, length)

Arguments

Type IntentOptional Attributes Name
type(grw_varoparray_type) :: me
type(tem_varSys_op_type), intent(in) :: val(:)
integer, intent(in), optional :: length

optional length to expand the array

public subroutine expand_ga_varop(me, pos, length)

Arguments

Type IntentOptional Attributes Name
type(grw_varoparray_type) :: me
integer, intent(in), optional :: pos
integer, intent(in), optional :: length

optional length to expand the array

public subroutine tem_varSys_init(me, systemName, length)

Initialize a variable system.

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(out) :: me

Variable system to initialize.

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

A descriptive name for this system of variables.

integer, intent(in), optional :: length

Initial length for the arrays used in the variable system.

public subroutine tem_varSys_append_stateVar(me, varname, nComponents, method_data, get_point, get_element, set_params, get_params, setup_indices, get_valOfIndex, pos, wasAdded)

Append a new state variable to the variable system.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(inout) :: me

Variable system to append the state variable to.

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

Variable to append to the state.

integer, intent(in) :: nComponents

Number of components in this variable.

type(c_ptr), intent(in) :: method_data

Data that is required by the methods to obtain the variable.

procedure(tem_varSys_proc_point), pointer :: get_point

Procedure which allows the retrieval of the variable at given points.

procedure(tem_varSys_proc_element), pointer :: get_element

Procedure which allows the retrieval of the variable in an element.

procedure(tem_varSys_proc_setParams), optional, pointer :: set_params

Procedure which allows to set parameter in method_data

procedure(tem_varSys_proc_getParams), optional, pointer :: get_params

Procedure which allows to get parameter in method_data

procedure(tem_varSys_proc_setupIndices), pointer :: setup_indices

Procedure to setup growing array of points, variable value in method_data and return index of points set

procedure(tem_varSys_proc_getValOfIndex), pointer :: get_valOfIndex

Procedure which allows to retrieval of the variable at point or val array index

integer, intent(out), optional :: pos

Position of the variable in the system.

logical, intent(out), optional :: wasAdded

Indicator, if the variable was actually added to the system.

public subroutine tem_varSys_append_auxFieldVar(me, varname, nComponents, method_data, get_point, get_element, set_params, get_params, setup_indices, get_valOfIndex, pos, wasAdded)

Append a new auxiliaryField variable to the variable system.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(inout) :: me

Variable system to append the state variable to.

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

Variable to append to the state.

integer, intent(in) :: nComponents

Number of components in this variable.

type(c_ptr), intent(in) :: method_data

Data that is required by the methods to obtain the variable.

procedure(tem_varSys_proc_point), pointer :: get_point

Procedure which allows the retrieval of the variable at given points.

procedure(tem_varSys_proc_element), pointer :: get_element

Procedure which allows the retrieval of the variable in an element.

procedure(tem_varSys_proc_setParams), optional, pointer :: set_params

Procedure which allows to set parameter in method_data

procedure(tem_varSys_proc_getParams), optional, pointer :: get_params

Procedure which allows to get parameter in method_data

procedure(tem_varSys_proc_setupIndices), pointer :: setup_indices

Procedure to setup growing array of points, variable value in method_data and return index of points set

procedure(tem_varSys_proc_getValOfIndex), pointer :: get_valOfIndex

Procedure which allows to retrieval of the variable at point or val array index

integer, intent(out), optional :: pos

Position of the variable in the system.

logical, intent(out), optional :: wasAdded

Indicator, if the variable was actually added to the system.

public subroutine tem_varSys_append_derVar(me, varname, operType, nComponents, input_varname, input_varIndex, method_data, get_point, get_element, set_params, get_params, setup_indices, get_valOfIndex, pos, wasAdded)

Append a new (non-state) variable to the variable system.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(inout) :: me

Variable system to append the state variable to.

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

Variable to append to the state.

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

Operation type

integer, intent(in) :: nComponents

Number of components in this variable.

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

List of variable names, this variable depends on.

Read more…
integer, intent(in), optional :: input_varIndex(:)

Component index to access from input variable nComponents

Read more…
type(c_ptr), intent(in) :: method_data

Data that is required by the methods to obtain the variable.

procedure(tem_varSys_proc_point), pointer :: get_point

Procedure which allows the retrieval of the variable at given points.

procedure(tem_varSys_proc_element), pointer :: get_element

Procedure which allows the retrieval of the variable in an element.

procedure(tem_varSys_proc_setParams), optional, pointer :: set_params

Procedure which allows to set parameter in method_data

procedure(tem_varSys_proc_getParams), optional, pointer :: get_params

Procedure which allows to get parameter in method_data

procedure(tem_varSys_proc_setupIndices), pointer :: setup_indices

Procedure to setup growing array of points, variable value in method_data and return index of points set

procedure(tem_varSys_proc_getValOfIndex), pointer :: get_valOfIndex

Procedure which allows to retrieval of the variable at point or val array index

integer, intent(out), optional :: pos

Position of the variable in the system.

logical, intent(out), optional :: wasAdded

Indicator, if the variable was actually added to the system.

public subroutine tem_varSys_load_vector(me, conf, parent, key)

Load variable system(s) from a lua file

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(out), allocatable :: me(:)

The variable system to read in

type(flu_State) :: conf

Lua handle connected to the script to read the table from

integer, intent(in), optional :: parent

A parent table handle in which to look the current variables up

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

load from this key

public subroutine tem_varSys_load_single(me, conf, parent, key, openTable)

load varSys from lua file. Required for harvester to load varSys from tracking or restart header file.

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(out) :: me

varSys to read from the Lua script(conf) and fill

type(flu_State) :: conf

Lua handle connected to the script to read the table from

integer, intent(in), optional :: parent

A parent table handle in which to look the current variable up

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

load varsys from this key

logical, intent(in), optional :: openTable

public subroutine tem_varSys_dump_vector(me, outUnit, dumpVarPos)

Dumps array of varSys to given unit

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(in) :: me(:)

variable to write into the lua file

integer, intent(inout) :: outUnit

unit to write to

integer, intent(in), optional :: dumpVarPos(:)

Position of variables to dump

public subroutine tem_varSys_dump_single(me, outUnit, dumpVarPos)

Dump single varSys to given unit

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(in) :: me

variable to write into the lua file

integer, intent(inout) :: outUnit

unit to write to

integer, intent(in), optional :: dumpVarPos(:)

Position of variables to dump

public subroutine tem_varSys_out_vector(me, conf, dumpVarPos)

Allows the output of array of varSys to lua out

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(in) :: me(:)

variable to write into the lua file

type(aot_out_type), intent(inout) :: conf

aotus type handling the output to the file in lua format

integer, intent(in), optional :: dumpVarPos(:)

Position of variables to dump

public subroutine tem_varSys_out_single(me, conf, dumpVarPos, level)

Write the system of variables description into a Lua file. use the aotus_out functions for doing so, in order to obtain a neatly formatted lua file

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(in) :: me

Variable system to write out

type(aot_out_type), intent(inout) :: conf

Aotus type handling the output to the file in lua format

integer, intent(in), optional :: dumpVarPos(:)

Position of variables to dump

integer, intent(in), optional :: level

to dump varSys with key or without key

public subroutine tem_get_element_chunk(varsys, varPos, elemPos, time, tree, nElems, nDofs, res)

A routine to evaluate chunk of elements for given list of variables

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(in) :: varsys

Variable system describing available data.

integer, intent(in) :: varPos(:)

Position of variables to evaluate in varSys

integer, intent(in) :: elemPos(:)

Position of treeID of the element to get the variable for.

type(tem_time_type), intent(in) :: time

Time information for the current data.

type(treelmesh_type), intent(in) :: tree

Mesh definition of the input data.

integer, intent(in) :: nElems

number of elements to evaluate

integer, intent(in) :: nDofs

Number of degrees of freedom.

real(kind=rk), intent(out) :: res(:)

Output data size: io_buffer_size

public subroutine tem_get_point_chunk(varsys, varPos, point, time, tree, nPnts, res)

A routine to evaluate chunk of points for given list of variables

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(in) :: varsys

Variable system describing available data.

integer, intent(in) :: varPos(:)

Position of variables to evaluate in varSys

real(kind=rk), intent(in) :: point(:,:)

Three-dimensional coordinates at which the variable should be evaluated. Only useful for variables provided as space-time functions.

type(tem_time_type), intent(in) :: time

Time information for the current data.

type(treelmesh_type), intent(in) :: tree

Mesh definition of the input data.

integer, intent(in) :: nPnts

Number of values to obtain for this variable (vectorized access).

real(kind=rk), intent(out) :: res(:)

Output data size: io_buffer_size

public subroutine copy_varOp(left, right)

This function provides the assignment operator of tem_varSys_op_type

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_op_type), intent(out) :: left

varSys op to copy to

type(tem_varSys_op_type), intent(in) :: right

varSys op to copy from

public subroutine tem_free_varOp(fun)

Free a variable description.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_op_type), intent(inout) :: fun

Variable method to free.

public subroutine tem_empty_varsys(varsys)

Empty a variable system.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_varSys_type), intent(inout) :: varsys

Variable system to empty.

public subroutine tem_varSys_getParams_dummy(fun, varSys, instring, outstring)

Arguments

Type IntentOptional Attributes Name
class(tem_varSys_op_type), intent(in) :: fun

Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

The variable system to obtain the variable from.

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

Input string with parameter to set in method_data

character(len=*), intent(out) :: outstring

Output string with requested parameter value from method_data

public subroutine tem_varSys_setParams_dummy(fun, varSys, instring)

Arguments

Type IntentOptional Attributes Name
class(tem_varSys_op_type), intent(in) :: fun

Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

The variable system to obtain the variable from.

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

Input string with parameter to set in method_data

public subroutine tem_varSys_setupIndices_dummy(fun, varSys, point, offset_bit, iLevel, tree, nPnts, idx)

Arguments

Type IntentOptional Attributes Name
class(tem_varSys_op_type), intent(in) :: fun

Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

The variable system to obtain the variable from.

real(kind=rk), intent(in) :: point(:,:)

List of space coordinate points to store as growing array in method_data

character(len=1), intent(in), optional :: offset_bit(:)

Offset bit encoded as character for every point.

Read more…
integer, intent(in) :: iLevel

Level to which input points belong to

type(treelmesh_type), intent(in) :: tree

global treelm mesh info

integer, intent(in) :: nPnts

Number of points to add in method_data of this variable

integer, intent(out) :: idx(:)

Index of points in the growing array and variable val array. Size: n

Read more…

public subroutine tem_varSys_getValOfIndex_dummy(fun, varSys, time, iLevel, idx, idxLen, nVals, res)

Arguments

Type IntentOptional Attributes Name
class(tem_varSys_op_type), intent(in) :: fun

Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

The variable system to obtain the variable from.

type(tem_time_type), intent(in) :: time

Point in time at which to evaluate the variable.

integer, intent(in) :: iLevel

Level on which values are requested

integer, intent(in) :: idx(:)

Index of points in the growing array and variable val array to return. Size: most times nVals, if contiguous arrays are used it depends on the number of first indices

integer, intent(in), optional :: idxLen(:)

With idx as start index in contiguous memory, idxLength defines length of each contiguous memory Size: dependes on number of first index for contiguous array, but the sum of all idxLen is equal to nVals

integer, intent(in) :: nVals

Number of values to obtain for this variable (vectorized access).

real(kind=rk), intent(out) :: res(:)

Resulting values for the requested variable.

Read more…

public subroutine tem_varSys_getPoint_dummy(fun, varSys, point, time, tree, nPnts, res)

Arguments

Type IntentOptional Attributes Name
class(tem_varSys_op_type), intent(in) :: fun

Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

The variable system to obtain the variable from.

real(kind=rk), intent(in) :: point(:,:)

Three-dimensional coordinates at which the variable should be evaluated. Only useful for variables provided as space-time functions.

type(tem_time_type), intent(in) :: time

Point in time at which to evaluate the variable.

type(treelmesh_type), intent(in) :: tree

global treelm mesh info

integer, intent(in) :: nPnts

Number of values to obtain for this variable (vectorized access).

real(kind=rk), intent(out) :: res(:)

Resulting values for the requested variable.

Read more…

public subroutine tem_varSys_getElement_dummy(fun, varSys, elempos, time, tree, nElems, nDofs, res)

Arguments

Type IntentOptional Attributes Name
class(tem_varSys_op_type), intent(in) :: fun

Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

The variable system to obtain the variable from.

integer, intent(in) :: elempos(:)

Position of element in tree%treeID to get the variable for.

type(tem_time_type), intent(in) :: time

Point in time at which to evaluate the variable.

type(treelmesh_type), intent(in) :: tree

global treelm mesh info

integer, intent(in) :: nElems

Number of elements to obtain for this variable (vectorized access).

integer, intent(in) :: nDofs

Number of degrees of freedom within an element.

real(kind=rk), intent(out) :: res(:)

Resulting values for the requested variable.

Read more…

public subroutine tem_varSys_check_inArgs(fun, varSys, time, iLevel, idx, idxLen, nVals, label)

Arguments

Type IntentOptional Attributes Name
class(tem_varSys_op_type), intent(in) :: fun

Description of the method to obtain the variables, here some preset values might be stored, like the space time function to use or the required variables.

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

The variable system to obtain the variable from.

type(tem_time_type), intent(in) :: time

Point in time at which to evaluate the variable.

integer, intent(in) :: iLevel

Level on which values are requested

integer, intent(in) :: idx(:)

Index of points in the growing array and variable val array to return. Size: nVals

integer, intent(in), optional :: idxLen(:)

With idx as start index in contiguous memory, idxLength defines length of each contiguous memory Size: nVals

integer, intent(in) :: nVals
character(len=*), intent(in) :: label