tem_spacetime_fun_module Module

A module to deal with generic space-time functions.

It allows the definition of arbitrary space-time dependent functions, and the multiplication of a spatial function with a temporal function as a often required special case.

Space-Time functions might be predefined as Fortran functions, simple constants or Lua functions. They might return scalars or one-dimensional arrays. If only a single value is expected from a Lua function, the Lua function is supposed to return a scalar value. Irregardless if the function is invoked by an array valued routine or a plain scalar one. Otherwise, the Lua function has to return a table with the correct number of entries identified by position.

Note, that this makes the interface in the Lua script the same:

  • whenever a single return value is expected, a plain scalar should be returned.
  • otherwise a table should be returned

Uses

Used by

  • module~~tem_spacetime_fun_module~~UsedByGraph module~tem_spacetime_fun_module tem_spacetime_fun_module module~tem_bc_module tem_bc_module module~tem_bc_module->module~tem_spacetime_fun_module module~tem_varmap_module tem_varMap_module module~tem_bc_module->module~tem_varmap_module module~tem_derived_module tem_derived_module module~tem_derived_module->module~tem_spacetime_fun_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_operation_var_module tem_operation_var_module module~tem_derived_module->module~tem_operation_var_module module~tem_face_module tem_face_module module~tem_face_module->module~tem_spacetime_fun_module module~tem_spacetime_var_module->module~tem_spacetime_fun_module module~tem_spacetime_var_module->module~tem_variable_module module~tem_surfacedata_module tem_surfaceData_module module~tem_surfacedata_module->module~tem_spacetime_fun_module module~tem_variable_module->module~tem_spacetime_fun_module module~tem_varmap_module->module~tem_spacetime_fun_module module~tem_varmap_module->module~tem_spacetime_var_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_varmap_module module~tem_restart_module tem_restart_module module~hvs_output_module->module~tem_restart_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_varmap_module module~tem_depend_module tem_depend_module module~tem_depend_module->module~tem_varmap_module module~tem_operation_var_module->module~tem_variable_module module~tem_operation_var_module->module~tem_varmap_module module~tem_restart_module->module~tem_varmap_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_varmap_module module~tem_tracking_module->module~hvs_output_module module~tem_simcontrol_module tem_simControl_module module~tem_tracking_module->module~tem_simcontrol_module module~tem_abortcriteria_module tem_abortCriteria_module module~tem_abortcriteria_module->module~tem_convergence_module module~tem_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

Variables

Type Visibility Attributes Name Initial
integer, private, parameter :: maxveclen = 10

Maximum length for constant vectors to read from the configuration


Interfaces

public interface append

  • private subroutine append_stFunSingle_ToLinkList(me, st_fun, new)

    This routine appends new space time function to linked list of tem_st_fun_linkedList

    Arguments

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

    Linked list to append the spacetime function to.

    type(tem_spacetime_fun_type), intent(in) :: st_fun

    Spacetime fun information to add to the list.

    type(tem_st_fun_listElem_type), intent(out), optional, pointer :: new
  • private subroutine append_stFunArray_ToLinkList(me, st_fun, new)

    This routine appends a new array of space time functions st_fun to the linked list me.

    HK: It might be useful to return a pointer to the appended new stfun entry from this routine.

    Arguments

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

    Linked list to append the array of spacetime functions to.

    type(tem_spacetime_fun_type), intent(in) :: st_fun(:)

    Spacetime fun information to add to the list.

    type(tem_st_fun_listElem_type), intent(out), optional, pointer :: new

public interface tem_spacetime_for

  • private function tem_spacetime_for_treeIDs(me, treeIDs, time, tree, n) result(res)

    This function compute space time function for given list of treeIDs

    Todo

    pass subtree with treeIDs lists instead of treeIds and tree

    Arguments

    Type IntentOptional Attributes Name
    type(tem_spacetime_fun_type) :: me

    Spacetime function to evaluate

    integer(kind=long_k), intent(in) :: treeIDs(n)

    TreeIDs where to evaluate the function

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

    timer object incl. the current time information

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

    Global treelmesh to look for positions in

    integer, intent(in) :: n

    Number of values to return

    Return Value real(kind=rk), (n)

    return value of the function

  • private function tem_spacetime_vector_for_treeIDs(me, treeIDs, time, tree, n, ncomp) result(res)

    This function compute space time function that give bach a table of results for given list of treeIDs

    Todo

    pass subtree with treeIDs lists instead of treeIds and tree

    Arguments

    Type IntentOptional Attributes Name
    type(tem_spacetime_fun_type) :: me

    Spacetime function to evaluate

    integer(kind=long_k), intent(in) :: treeIDs(n)

    TreeIDs where to evaluate the function

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

    timer object incl. the current time information

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

    Global treelmesh to look for positions in

    integer, intent(in) :: n

    Number of tables to return

    integer, intent(in) :: ncomp

    Number of values in a Table

    Return Value real(kind=rk), (n,ncomp)

    return value of the function

  • private function tem_spacetime_for_coord(me, coord, time, n) result(res)

    This function computes the space time function for a given list of coordinates

    Arguments

    Type IntentOptional Attributes Name
    type(tem_spacetime_fun_type) :: me

    Spacetime function to evaluate

    real(kind=rk), intent(in) :: coord(n,3)

    barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

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

    timer object incl. the current time information

    integer, intent(in) :: n

    Number of values to return

    Return Value real(kind=rk), (n)

    return value of the function

  • private function tem_spacetime_vector_for_coord(me, coord, time, n, ncomp) result(res)

    This function computes the space time function that gives back an array for a given list of coordinates

    Arguments

    Type IntentOptional Attributes Name
    type(tem_spacetime_fun_type) :: me

    Spacetime function to evaluate

    real(kind=rk), intent(in) :: coord(n,3)

    barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

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

    timer object incl. the current time information

    integer, intent(in) :: n

    Number of arrays to return

    integer, intent(in) :: ncomp

    Number of entrys in each array

    Return Value real(kind=rk), (n,ncomp)

    return value of the function

  • private function tem_spacetime_for_stcoord(me, stCoord, n) result(res)

    This function computes the space time function for given list of space-time coordinates.

    Todo

    JZ: i added the subroutine for the space-time formulation. Below you see, that we create a tem_time_type variable in each loop. The code can be faster if we implement this routine in a nicer way.

    Arguments

    Type IntentOptional Attributes Name
    type(tem_spacetime_fun_type) :: me

    Spacetime function to evaluate

    real(kind=rk), intent(in) :: stCoord(n,4)

    barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z,t coordinates

    integer, intent(in) :: n

    Number of values to return

    Return Value real(kind=rk), (n)

    return value of the function

  • private function tem_spacetime_scalar_for_index(me, grwPnt, idx, nVals, iLevel, time) result(res)

    This function returns pre-stored value at given idx if spacetime function is predefined apesmate else evaluate a spacetime function for a point at given idx in growing array of points. Return value is a scalar.

    Arguments

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

    spacetime type

    type(tem_grwPoints_type), intent(in) :: grwPnt

    growing array of all spacetime point of a variable

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

    Index position to return a pre-store value or to compute

    integer, intent(in) :: nVals

    number of return values

    integer, intent(in) :: iLevel

    Level to access stored value in aps_coupling

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

    timer object incl. the current time information

    Return Value real(kind=rk), (nVals)

    return value of a function

  • private function tem_spacetime_vector_for_index(me, grwPnt, idx, nVals, iLevel, time, nComps) result(res)

    This function returns pre-stored value at given idx if spacetime function is predefined apesmate else evaluate a spacetime function for a point at given idx in growing array of points. Return value is a vector.

    Arguments

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

    spacetime type

    type(tem_grwPoints_type), intent(in) :: grwPnt

    growing array of all spacetime point of a variable

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

    Index position to return a pre-store value or to compute

    integer, intent(in) :: nVals

    number of return values

    integer, intent(in) :: iLevel

    Level to which the evaluated values to be returned

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

    timer object incl. the current time information

    integer, intent(in) :: nComps

    number of components per returned value

    Return Value real(kind=rk), (nVals,nComps)

    return value of a function

public interface tem_load_spacetime

  • private recursive subroutine tem_load_spacetime_single(me, conf, parent, key, pos, nComp, errCode, recurred)

    This routine loads the single spacetime function from the given key or position

    If spacetime is defined as block than read block for key word predefined/fun/const and load shape inside a block else define directly as lua function or constant. If predefined is defined inside a block, define other neccessary parameters for predefined. If shape table is not defined, shape is set to "all"

    Valid definitions: - Constant

    st_fun = 1.0
    or
    st_fun = {const = 1.0, shape = {..}}
    
    • lua_function
    st_fun = lua_fun_name
     --or
    st_fun = {fun=lua_fun_name, shape={..}}
    

    Note. Lua function take 4 input arguments (x,y,z,t) i.e barycentric coordinates of an element and time - Predefined Fortran function

     st_fun  = {predefined = "fun_name", fun_parameters}
    

    This definition can itself to be part of tables to define multiple space time functions.

    Arguments

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

    spacetime fun information

    type(flu_State) :: conf

    lua state type

    integer, intent(in), optional :: parent

    aotus parent handle

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

    name of the variable which is defined as spacetime function

    integer, intent(in), optional :: pos

    position of spacetime fun in a table

    integer, intent(in), optional :: nComp

    number of components of the variable

    integer, intent(out), optional :: errCode

    errCode /=0, space time function fails use errCode to abort code outside this routine call

    integer, intent(in), optional :: recurred

    Number of recursion steps done so far (defaults to 0)

  • private subroutine tem_load_spacetime_table(me, conf, parent, key, nComp, errCode)

    This routine loads table of spacetime functions from the given key or pos

    NOTE: If any of the entries in the table can not be interpreted as a space-time function, none will be returne at all, and an error code of -1 will be set. "Me" will be deallocated in this case. The routine first attempts to read the given key as a single space-time function definition, only if that fails, it tries to read it as a table of functions.

    Arguments

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

    spacetime fun information

    type(flu_State) :: conf

    lua state handle

    integer, intent(inout), optional :: parent

    aotus parent handle

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

    name of the variable which is defined as spacetime function

    integer, intent(in), optional :: nComp

    number of components of the variable

    integer, intent(out), optional :: errCode

    errCode /=0, space time function fails use errCode to abort code outside this routine call

private interface tem_spacetime_lua_for

  • private function tem_spacetime_lua_for_treeIds(fun_ref, treeIds, time, tree, n, conf) result(res)

    \brief This function invokes the Lua function for barycentric coordinates of an element specified by treeIds

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: fun_ref

    Reference of the function to open

    integer(kind=long_k), intent(in) :: treeIds(n)

    treeIds of elements in given level

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

    timer object incl. the current time information

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

    global treelm mesh

    integer, intent(in) :: n

    number of return values

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

    lua state

    Return Value real(kind=rk), (n)

    return value

  • private function tem_spacetime_lua_vector_for_treeIds(fun_ref, treeIds, time, tree, n, ncomp, conf) result(res)

    This function invokes the Lua function for barycentric coordinates of an element specified by treeIds and returns an array with the given number of components.

    Note, that the returned object by the Lua function has to be a table, except if there is only one component. For arrays of length 1 the Lua return value has to be a simple scalar, not a table!

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: fun_ref

    Reference of the function to open

    integer(kind=long_k), intent(in) :: treeIds(n)

    treeIds of elements in given level

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

    timer object incl. the current time information

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

    global treelm mesh

    integer, intent(in) :: n

    number of return values

    integer, intent(in) :: ncomp

    number of components per returned value

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

    lua state

    Return Value real(kind=rk), (n,ncomp)

    return value

  • private function tem_spacetime_lua_for_coord(fun_ref, coord, time, n, conf) result(res)

    \brief This function invokes the Lua function for a given coordinate.

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: fun_ref

    Reference of the function to open

    real(kind=rk), intent(in) :: coord(n,3)

    barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

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

    timer object incl. the current time information

    integer, intent(in) :: n

    number of return values

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

    lua state

    Return Value real(kind=rk), (n)

    return value

  • private function tem_spacetime_lua_vector_for_coord(fun_ref, coord, time, n, ncomp, conf) result(res)

    This function invokes the Lua function for a given coordinate and returns an array valued result.

    Note, that the returned object by the Lua function has to be a table, except if there is only one component. For arrays of length 1 the Lua return value has to be a simple scalar, not a table!

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: fun_ref

    Reference of the function to open

    real(kind=rk), intent(in) :: coord(n,3)

    barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

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

    timer object incl. the current time information

    integer, intent(in) :: n

    number of return values

    integer, intent(in) :: ncomp

    number of components returned for each value

    type(flu_State), intent(in), optional :: conf

    lua state

    Return Value real(kind=rk), (n,ncomp)

    return value


Derived Types

type, public ::  tem_spacetime_fun_type

Contains space time function definition

Components

Type Visibility Attributes Name Initial
character(len=labelLen), public :: fun_kind

The function kind

Read more…
type(tem_shape_type), public, allocatable :: geom(:)

spatial restrictions

type(tem_subTree_type), public :: subTree

subTree build from the shapes

integer, public :: nComps

Number of components

real(kind=rk), public, allocatable :: const(:)

constant value for nComponents

type(tem_spatial_type), public :: spatial

Description of composite spatial fun

type(tem_temporal_type), public :: temporal

Composite temporal fun

type(flu_State), public :: conf

Lua state handle to evaluate space time Lua function

integer, public :: lua_fun_ref = 0

Reference to the Lua function, if the st_fun is a Lua function.

type(tem_polygon_material_type), public :: polygon_material

type for the movement of the polygon

type(tem_miescatter_field_type), public :: mie_fun

Space-time function for Mie-series solution of electrodynamic scattering at dielectric sphere.

type(tem_cylindricalWave_type), public :: cylindricalWave

type for a scalar cylindrical wave.

type(tem_acoustic_pulse_type), public :: acoustic_pulse

Description of an acoustic pulse.

type(tem_aps_coupling_type), public :: aps_coupling

Apesmate coupling description

type(tem_precice_coupling_type), public :: precice_coupling

preCICE coupling description

type, public ::  tem_st_fun_listElem_type

An element for a spacetime function within a linked list.

Read more…

Components

Type Visibility Attributes Name Initial
integer, public :: nVals

Number of space time functions

type(tem_spacetime_fun_type), public, dimension(:), pointer :: val => NULL()

Space time function target which C_ptr will point to We maintain a list of spacetime functions here, as each one might be restricted to a subtree, and multiple of those locally different function definitions might be used to define a single variable like a source term.

type(tem_pointData_list_type), public :: pntData

Points data containing space coordinates or evaluated values for time-indepentent functions

type(c_ptr), public :: solver_bundle

A pointer to possibly additional solver data.

Read more…
integer, public :: isSurface = -1

Used to decided whether this spacetime functions are used for surface or volume i.e boundary or source. Boundary is treated as surface and source as volume coupling type can be rather surface or volume. For boundary. isSurface = 0 For volume, isSurface = 1

type(tem_st_fun_listElem_type), public, pointer :: next => NULL()

Pointer to next space time function

type, public ::  tem_st_fun_linkedList_type

Type used to create linked list of space time function (tem_st_fun_listElem_type)

Read more…

Components

Type Visibility Attributes Name Initial
type(tem_st_fun_listElem_type), public, pointer :: head => NULL()

Pointer to the first entry in the linked list


Functions

public function tem_spacetime_hash_id(me, conf) result(id)

This function create unique id to create anonymous variable in tem_variable_loadMapping

Arguments

Type IntentOptional Attributes Name
type(tem_spacetime_fun_type), intent(in) :: me
type(flu_State), intent(in) :: conf

Return Value character(len=labelLen)

private function tem_spacetime_for_treeIDs(me, treeIDs, time, tree, n) result(res)

This function compute space time function for given list of treeIDs

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_spacetime_fun_type) :: me

Spacetime function to evaluate

integer(kind=long_k), intent(in) :: treeIDs(n)

TreeIDs where to evaluate the function

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

timer object incl. the current time information

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

Global treelmesh to look for positions in

integer, intent(in) :: n

Number of values to return

Return Value real(kind=rk), (n)

return value of the function

private function tem_spacetime_vector_for_treeIDs(me, treeIDs, time, tree, n, ncomp) result(res)

This function compute space time function that give bach a table of results for given list of treeIDs

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_spacetime_fun_type) :: me

Spacetime function to evaluate

integer(kind=long_k), intent(in) :: treeIDs(n)

TreeIDs where to evaluate the function

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

timer object incl. the current time information

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

Global treelmesh to look for positions in

integer, intent(in) :: n

Number of tables to return

integer, intent(in) :: ncomp

Number of values in a Table

Return Value real(kind=rk), (n,ncomp)

return value of the function

private function tem_spacetime_for_stcoord(me, stCoord, n) result(res)

This function computes the space time function for given list of space-time coordinates.

Read more…

Arguments

Type IntentOptional Attributes Name
type(tem_spacetime_fun_type) :: me

Spacetime function to evaluate

real(kind=rk), intent(in) :: stCoord(n,4)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z,t coordinates

integer, intent(in) :: n

Number of values to return

Return Value real(kind=rk), (n)

return value of the function

private function tem_spacetime_for_coord(me, coord, time, n) result(res)

This function computes the space time function for a given list of coordinates

Arguments

Type IntentOptional Attributes Name
type(tem_spacetime_fun_type) :: me

Spacetime function to evaluate

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

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

timer object incl. the current time information

integer, intent(in) :: n

Number of values to return

Return Value real(kind=rk), (n)

return value of the function

private function tem_spacetime_vector_for_coord(me, coord, time, n, ncomp) result(res)

This function computes the space time function that gives back an array for a given list of coordinates

Arguments

Type IntentOptional Attributes Name
type(tem_spacetime_fun_type) :: me

Spacetime function to evaluate

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

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

timer object incl. the current time information

integer, intent(in) :: n

Number of arrays to return

integer, intent(in) :: ncomp

Number of entrys in each array

Return Value real(kind=rk), (n,ncomp)

return value of the function

private function tem_spacetime_lua_for_treeIds(fun_ref, treeIds, time, tree, n, conf) result(res)

\brief This function invokes the Lua function for barycentric coordinates of an element specified by treeIds

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: fun_ref

Reference of the function to open

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

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

timer object incl. the current time information

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

global treelm mesh

integer, intent(in) :: n

number of return values

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

lua state

Return Value real(kind=rk), (n)

return value

private function tem_spacetime_lua_vector_for_treeIds(fun_ref, treeIds, time, tree, n, ncomp, conf) result(res)

This function invokes the Lua function for barycentric coordinates of an element specified by treeIds and returns an array with the given number of components.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: fun_ref

Reference of the function to open

integer(kind=long_k), intent(in) :: treeIds(n)

treeIds of elements in given level

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

timer object incl. the current time information

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

global treelm mesh

integer, intent(in) :: n

number of return values

integer, intent(in) :: ncomp

number of components per returned value

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

lua state

Return Value real(kind=rk), (n,ncomp)

return value

private function tem_spacetime_lua_for_coord(fun_ref, coord, time, n, conf) result(res)

\brief This function invokes the Lua function for a given coordinate.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: fun_ref

Reference of the function to open

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

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

timer object incl. the current time information

integer, intent(in) :: n

number of return values

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

lua state

Return Value real(kind=rk), (n)

return value

private function tem_spacetime_lua_vector_for_coord(fun_ref, coord, time, n, ncomp, conf) result(res)

This function invokes the Lua function for a given coordinate and returns an array valued result.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: fun_ref

Reference of the function to open

real(kind=rk), intent(in) :: coord(n,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

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

timer object incl. the current time information

integer, intent(in) :: n

number of return values

integer, intent(in) :: ncomp

number of components returned for each value

type(flu_State), intent(in), optional :: conf

lua state

Return Value real(kind=rk), (n,ncomp)

return value

private function tem_spacetime_scalar_for_index(me, grwPnt, idx, nVals, iLevel, time) result(res)

This function returns pre-stored value at given idx if spacetime function is predefined apesmate else evaluate a spacetime function for a point at given idx in growing array of points. Return value is a scalar.

Arguments

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

spacetime type

type(tem_grwPoints_type), intent(in) :: grwPnt

growing array of all spacetime point of a variable

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

Index position to return a pre-store value or to compute

integer, intent(in) :: nVals

number of return values

integer, intent(in) :: iLevel

Level to access stored value in aps_coupling

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

timer object incl. the current time information

Return Value real(kind=rk), (nVals)

return value of a function

private function tem_spacetime_vector_for_index(me, grwPnt, idx, nVals, iLevel, time, nComps) result(res)

This function returns pre-stored value at given idx if spacetime function is predefined apesmate else evaluate a spacetime function for a point at given idx in growing array of points. Return value is a vector.

Arguments

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

spacetime type

type(tem_grwPoints_type), intent(in) :: grwPnt

growing array of all spacetime point of a variable

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

Index position to return a pre-store value or to compute

integer, intent(in) :: nVals

number of return values

integer, intent(in) :: iLevel

Level to which the evaluated values to be returned

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

timer object incl. the current time information

integer, intent(in) :: nComps

number of components per returned value

Return Value real(kind=rk), (nVals,nComps)

return value of a function


Subroutines

public subroutine tem_create_subTree_of_st_funList(me, tree, bc_prop, stencil)

create subtree for shapes defined in each spacetime functions

Arguments

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

Linked list to append the spacetime function to.

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

Global treelmesh

type(tem_BC_prop_type), intent(in) :: bc_prop

bc property

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

stencil

public subroutine tem_destroy_subTree_of_st_funList(me)

destroy subtree for shapes defined in each spacetime functions for dynamic load balancing

Arguments

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

Linked list to append the spacetime function to.

private subroutine append_stFunArray_ToLinkList(me, st_fun, new)

This routine appends a new array of space time functions st_fun to the linked list me.

Read more…

Arguments

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

Linked list to append the array of spacetime functions to.

type(tem_spacetime_fun_type), intent(in) :: st_fun(:)

Spacetime fun information to add to the list.

type(tem_st_fun_listElem_type), intent(out), optional, pointer :: new

private subroutine append_stFunSingle_ToLinkList(me, st_fun, new)

This routine appends new space time function to linked list of tem_st_fun_linkedList

Arguments

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

Linked list to append the spacetime function to.

type(tem_spacetime_fun_type), intent(in) :: st_fun

Spacetime fun information to add to the list.

type(tem_st_fun_listElem_type), intent(out), optional, pointer :: new

private subroutine tem_load_spacetime_table(me, conf, parent, key, nComp, errCode)

This routine loads table of spacetime functions from the given key or pos

Read more…

Arguments

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

spacetime fun information

type(flu_State) :: conf

lua state handle

integer, intent(inout), optional :: parent

aotus parent handle

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

name of the variable which is defined as spacetime function

integer, intent(in), optional :: nComp

number of components of the variable

integer, intent(out), optional :: errCode

errCode /=0, space time function fails use errCode to abort code outside this routine call

private recursive subroutine tem_load_spacetime_single(me, conf, parent, key, pos, nComp, errCode, recurred)

This routine loads the single spacetime function from the given key or position

Read more…

Arguments

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

spacetime fun information

type(flu_State) :: conf

lua state type

integer, intent(in), optional :: parent

aotus parent handle

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

name of the variable which is defined as spacetime function

integer, intent(in), optional :: pos

position of spacetime fun in a table

integer, intent(in), optional :: nComp

number of components of the variable

integer, intent(out), optional :: errCode

errCode /=0, space time function fails use errCode to abort code outside this routine call

integer, intent(in), optional :: recurred

Number of recursion steps done so far (defaults to 0)

private subroutine load_spacetime_predefined(me, conf, thandle, nComp)

Load predefined space time function

Read more…

Arguments

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

spacetime fun information

type(flu_State) :: conf

lua state type

integer, intent(in) :: thandle

spacetime function handle

integer, intent(in), optional :: nComp

number of components of the variable

private subroutine load_spacetime_asConst(me, conf, errCode, parent, key, pos, nComp)

Load space time function as constant

Arguments

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

spacetime fun information

type(flu_State) :: conf

lua state type

integer, intent(out) :: errCode

errCode = -1, if space time function is not defined as constant

integer, intent(in), optional :: parent

aotus parent handle

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

name of the variable which is defined as spacetime function

integer, intent(in), optional :: pos

position of spacetime fun in a table

integer, intent(in), optional :: nComp

number of components of the variable