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 module~tem_dyn_array_module tem_dyn_array_module module~tem_varsys_module->module~tem_dyn_array_module module~tem_aux_module tem_aux_module module~tem_varsys_module->module~tem_aux_module iso_c_binding iso_c_binding module~tem_varsys_module->iso_c_binding module~treelmesh_module treelmesh_module module~tem_varsys_module->module~treelmesh_module module~env_module env_module module~tem_varsys_module->module~env_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~aot_table_module aot_table_module module~tem_varsys_module->module~aot_table_module module~aotus_module aotus_module module~tem_varsys_module->module~aotus_module module~aot_out_module aot_out_module module~tem_varsys_module->module~aot_out_module module~tem_dyn_array_module->module~env_module module~tem_aux_module->module~env_module module~tem_aux_module->module~tem_logging_module module~tem_aux_module->module~aot_table_module module~tem_aux_module->module~aotus_module module~tem_revision_module tem_revision_module module~tem_aux_module->module~tem_revision_module module~tem_comm_env_module tem_comm_env_module module~tem_aux_module->module~tem_comm_env_module module~flu_binding flu_binding module~tem_aux_module->module~flu_binding module~tem_tools_module tem_tools_module module~tem_aux_module->module~tem_tools_module module~tem_lua_requires_module tem_lua_requires_module module~tem_aux_module->module~tem_lua_requires_module mpi mpi module~tem_aux_module->mpi module~treelmesh_module->module~tem_aux_module module~treelmesh_module->module~env_module module~treelmesh_module->module~tem_logging_module module~treelmesh_module->module~aot_table_module module~treelmesh_module->module~aotus_module module~tem_global_module tem_global_module module~treelmesh_module->module~tem_global_module module~tem_sparta_module tem_Sparta_module module~treelmesh_module->module~tem_sparta_module module~tem_topology_module tem_topology_module module~treelmesh_module->module~tem_topology_module module~tem_property_module tem_property_module module~treelmesh_module->module~tem_property_module module~treelmesh_module->module~tem_tools_module module~treelmesh_module->mpi module~env_module->module~aotus_module module~env_module->module~flu_binding iso_fortran_env iso_fortran_env module~env_module->iso_fortran_env module~env_module->mpi module~tem_logging_module->module~env_module module~tem_logging_module->module~aot_table_module module~tem_logging_module->module~aotus_module module~tem_time_module->module~env_module module~tem_time_module->module~aot_table_module module~tem_time_module->module~aotus_module module~tem_time_module->module~aot_out_module module~tem_time_module->mpi module~tem_global_module->module~tem_aux_module module~tem_global_module->module~env_module module~tem_global_module->module~tem_logging_module module~tem_global_module->module~aot_table_module module~tem_global_module->module~aotus_module module~tem_global_module->module~aot_out_module module~tem_global_module->mpi module~tem_prophead_module tem_prophead_module module~tem_global_module->module~tem_prophead_module module~tem_sparta_module->module~tem_aux_module module~tem_sparta_module->module~env_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_topology_module->module~env_module module~tem_property_module->module~env_module module~tem_property_module->mpi module~tem_property_module->module~tem_prophead_module module~tem_comm_env_module->mpi module~tem_tools_module->module~env_module module~tem_lua_requires_module->iso_c_binding module~tem_lua_requires_module->module~env_module module~tem_lua_requires_module->module~aot_table_module module~tem_lua_requires_module->module~aotus_module module~tem_lua_requires_module->module~flu_binding module~tem_prophead_module->module~env_module module~tem_prophead_module->module~aot_table_module module~tem_prophead_module->module~aotus_module module~tem_prophead_module->module~aot_out_module module~tem_prophead_module->mpi module~tem_float_module->module~env_module

Used by

  • module~~tem_varsys_module~~UsedByGraph module~tem_varsys_module tem_varSys_module program~tem_varsys_statevar_test tem_varSys_stateVar_test program~tem_varsys_statevar_test->module~tem_varsys_module program~tem_varsys_derivevar_test tem_varSys_deriveVar_test program~tem_varsys_derivevar_test->module~tem_varsys_module module~tem_spacetime_var_module tem_spacetime_var_module module~tem_spacetime_var_module->module~tem_varsys_module program~tem_variable_evaltype_test tem_variable_evaltype_test program~tem_variable_evaltype_test->module~tem_varsys_module module~hvs_vtk_module hvs_vtk_module module~hvs_vtk_module->module~tem_varsys_module module~tem_reduction_spatial_module tem_reduction_spatial_module module~tem_reduction_spatial_module->module~tem_varsys_module module~tem_bc_module tem_bc_module module~tem_bc_module->module~tem_varsys_module module~tem_logical_operation_var_module tem_logical_operation_var_module module~tem_logical_operation_var_module->module~tem_varsys_module module~tem_derived_module tem_derived_module module~tem_derived_module->module~tem_varsys_module module~hvs_ascii_module hvs_ascii_module module~hvs_ascii_module->module~tem_varsys_module program~tem_varsys_test tem_varSys_test program~tem_varsys_test->module~tem_varsys_module module~tem_depend_module tem_depend_module module~tem_depend_module->module~tem_varsys_module module~tem_restart_module tem_restart_module module~tem_restart_module->module~tem_varsys_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_varsys_module program~tem_logical_opertor_test tem_logical_opertor_test program~tem_logical_opertor_test->module~tem_varsys_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_varsys_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_varsys_module module~tem_meshinfo_module tem_meshInfo_module module~tem_meshinfo_module->module~tem_varsys_module module~tem_varmap_module tem_varMap_module module~tem_varmap_module->module~tem_varsys_module program~tem_variable_combine_test tem_variable_combine_Test program~tem_variable_combine_test->module~tem_varsys_module module~tem_coordinate_module tem_coordinate_module module~tem_coordinate_module->module~tem_varsys_module program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->module~tem_varsys_module module~hvs_vtk_module~2 hvs_vtk_module module~hvs_vtk_module~2->module~tem_varsys_module program~tem_variable_extract_test tem_variable_extract_test program~tem_variable_extract_test->module~tem_varsys_module module~tem_variable_module tem_variable_module module~tem_variable_module->module~tem_varsys_module module~tem_operation_var_module tem_operation_var_module module~tem_operation_var_module->module~tem_varsys_module program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->module~tem_varsys_module

Contents


Interfaces

public interface init

initialize the dynamic array

  • public subroutine init_ga_varop(me, length)

    Arguments

    TypeIntentOptionalAttributesName
    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.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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).

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    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).

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    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.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    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.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    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.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    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, 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.

    Read more…

    Arguments

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

TypeVisibilityAttributesNameInitial
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

TypeVisibilityAttributesNameInitial
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

TypeVisibilityAttributesNameInitial
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

TypeVisibilityAttributesNameInitial
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

TypeIntentOptionalAttributesName
type(grw_varoparray_type), intent(out) :: me
integer, intent(in), optional :: length

public subroutine destroy_ga_varop(me)

Arguments

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

public subroutine truncate_ga_varop(me)

Arguments

TypeIntentOptionalAttributesName
type(grw_varoparray_type) :: me

public subroutine empty_ga_varop(me)

Arguments

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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.

(Might be empty). The variable will only be appended, if all invars are already found in the variable system.

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

Component index to access from input variable nComponents

(Might be empty). The variable will only be appended, if all index are available in input_varname

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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

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

Variable system to empty.

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

Arguments

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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, 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.

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

Arguments

TypeIntentOptionalAttributesName
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

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

Arguments

TypeIntentOptionalAttributesName
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

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

Arguments

TypeIntentOptionalAttributesName
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

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

Arguments

TypeIntentOptionalAttributesName
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