tem_stencil_module Module

Stencil definitions for the elements

A stencil is basically a set of element-offsets , describing the relative positions of all required elements for a given element.

There is an example in the Documentation named 'Example for the stencil construction'.


Uses

  • module~~tem_stencil_module~~UsesGraph module~tem_stencil_module tem_stencil_module aot_table_module aot_table_module module~tem_stencil_module->aot_table_module aotus_module aotus_module module~tem_stencil_module->aotus_module module~env_module env_module module~tem_stencil_module->module~env_module module~tem_aux_module tem_aux_module module~tem_stencil_module->module~tem_aux_module module~tem_comm_env_module tem_comm_env_module module~tem_stencil_module->module~tem_comm_env_module module~tem_comm_module tem_comm_module module~tem_stencil_module->module~tem_comm_module module~tem_dyn_array_module tem_dyn_array_module module~tem_stencil_module->module~tem_dyn_array_module module~tem_geometry_module tem_geometry_module module~tem_stencil_module->module~tem_geometry_module module~tem_grow_array_module tem_grow_array_module module~tem_stencil_module->module~tem_grow_array_module module~tem_logging_module tem_logging_module module~tem_stencil_module->module~tem_logging_module module~tem_param_module tem_param_module module~tem_stencil_module->module~tem_param_module module~tem_tools_module tem_tools_module module~tem_stencil_module->module~tem_tools_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_comm_env_module module~tem_aux_module->module~tem_logging_module module~tem_aux_module->module~tem_tools_module module~tem_aux_module->flu_binding module~soi_revision_module soi_revision_module module~tem_aux_module->module~soi_revision_module module~tem_lua_requires_module tem_lua_requires_module module~tem_aux_module->module~tem_lua_requires_module module~tem_aux_module->mpi module~tem_comm_env_module->mpi module~tem_comm_module->aotus_module module~tem_comm_module->module~env_module module~tem_comm_module->module~tem_aux_module module~tem_comm_module->module~tem_dyn_array_module module~tem_comm_module->module~tem_grow_array_module module~tem_comm_module->module~tem_logging_module module~tem_comm_module->flu_binding hvs_sizeof_module hvs_sizeof_module module~tem_comm_module->hvs_sizeof_module iso_c_binding iso_c_binding module~tem_comm_module->iso_c_binding mem_for_mpi_module mem_for_mpi_module module~tem_comm_module->mem_for_mpi_module module~tem_comm_module->mpi tem_sparse_comm_module tem_sparse_comm_module module~tem_comm_module->tem_sparse_comm_module module~tem_dyn_array_module->module~env_module module~tem_geometry_module->module~env_module module~tem_geometry_module->module~tem_logging_module module~tem_geometry_module->module~tem_param_module module~tem_geometry_module->module~tem_tools_module module~tem_debug_module tem_debug_module module~tem_geometry_module->module~tem_debug_module module~tem_float_module tem_float_module module~tem_geometry_module->module~tem_float_module module~tem_property_module tem_property_module module~tem_geometry_module->module~tem_property_module module~tem_subtree_type_module tem_subTree_type_module module~tem_geometry_module->module~tem_subtree_type_module module~tem_topology_module tem_topology_module module~tem_geometry_module->module~tem_topology_module module~treelmesh_module treelmesh_module module~tem_geometry_module->module~treelmesh_module module~tem_geometry_module->mpi module~tem_grow_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_param_module->module~env_module module~tem_tools_module->module~env_module module~tem_debug_module->aot_table_module module~tem_debug_module->module~env_module module~tem_debug_module->module~tem_logging_module module~tem_debug_module->module~tem_tools_module module~tem_debug_module->flu_binding module~tem_float_module->module~env_module module~tem_lua_requires_module->aot_table_module module~tem_lua_requires_module->aotus_module module~tem_lua_requires_module->module~env_module module~tem_lua_requires_module->flu_binding module~tem_lua_requires_module->iso_c_binding module~tem_property_module->module~env_module module~tem_property_module->mpi module~tem_prophead_module tem_prophead_module module~tem_property_module->module~tem_prophead_module module~tem_subtree_type_module->module~env_module module~tem_subtree_type_module->module~tem_aux_module module~tem_subtree_type_module->module~tem_logging_module module~tem_subtree_type_module->module~tem_property_module module~tem_subtree_type_module->module~treelmesh_module module~tem_subtree_type_module->mpi module~tem_global_module tem_global_module module~tem_subtree_type_module->module~tem_global_module module~tem_topology_module->module~env_module 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~treelmesh_module->module~tem_tools_module module~treelmesh_module->module~tem_property_module module~treelmesh_module->module~tem_topology_module module~treelmesh_module->mpi module~treelmesh_module->module~tem_global_module module~tem_sparta_module tem_Sparta_module module~treelmesh_module->module~tem_sparta_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_global_module->module~tem_prophead_module aot_out_module aot_out_module module~tem_global_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 module~tem_prophead_module->aot_out_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->module~tem_float_module module~tem_sparta_module->mpi

Used by

  • module~~tem_stencil_module~~UsedByGraph module~tem_stencil_module tem_stencil_module module~tem_adaptation_module tem_adaptation_module module~tem_adaptation_module->module~tem_stencil_module module~tem_construction_module tem_construction_module module~tem_adaptation_module->module~tem_construction_module module~tem_element_module tem_element_module module~tem_adaptation_module->module~tem_element_module module~tem_construction_module->module~tem_stencil_module module~tem_construction_module->module~tem_element_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_stencil_module module~tem_shape_module tem_shape_module module~tem_convergence_module->module~tem_shape_module module~tem_subtree_module tem_subTree_module module~tem_convergence_module->module~tem_subtree_module module~tem_varmap_module tem_varMap_module module~tem_convergence_module->module~tem_varmap_module module~tem_element_module->module~tem_stencil_module module~tem_face_module tem_face_module module~tem_face_module->module~tem_stencil_module module~tem_face_module->module~tem_construction_module module~tem_face_module->module~tem_element_module module~tem_spacetime_fun_module tem_spacetime_fun_module module~tem_face_module->module~tem_spacetime_fun_module module~tem_facedata_module tem_faceData_module module~tem_face_module->module~tem_facedata_module module~tem_comptefacerules_module tem_compteFaceRules_module module~tem_face_module->module~tem_comptefacerules_module module~tem_shape_module->module~tem_stencil_module module~tem_spacetime_fun_module->module~tem_stencil_module module~tem_spacetime_fun_module->module~tem_shape_module module~tem_spacetime_fun_module->module~tem_subtree_module module~tem_spatial_module tem_spatial_module module~tem_spacetime_fun_module->module~tem_spatial_module module~tem_subtree_module->module~tem_stencil_module module~tem_subtree_module->module~tem_construction_module module~tem_subtree_module->module~tem_shape_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_stencil_module module~tem_tracking_module->module~tem_shape_module module~tem_tracking_module->module~tem_subtree_module module~hvs_output_module hvs_output_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_tracking_module->module~tem_varmap_module module~hvs_ascii_module hvs_ascii_module module~hvs_ascii_module->module~tem_shape_module module~hvs_output_module->module~tem_shape_module module~hvs_output_module->module~tem_subtree_module module~hvs_output_module->module~hvs_ascii_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_abortcriteria_module tem_abortCriteria_module module~tem_abortcriteria_module->module~tem_convergence_module module~tem_bc_module tem_bc_module module~tem_bc_module->module~tem_spacetime_fun_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_facedata_module->module~tem_construction_module module~tem_interpolation_module tem_interpolation_module module~tem_interpolation_module->module~tem_construction_module module~tem_simcontrol_module->module~tem_convergence_module module~tem_simcontrol_module->module~tem_abortcriteria_module module~tem_spacetime_var_module->module~tem_spacetime_fun_module module~tem_spacetime_var_module->module~tem_spatial_module module~tem_spacetime_var_module->module~tem_variable_module module~tem_spatial_module->module~tem_shape_module module~tem_surfacedata_module tem_surfaceData_module module~tem_surfacedata_module->module~tem_construction_module module~tem_surfacedata_module->module~tem_element_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~tem_comptefacerules_module->module~tem_facedata_module module~tem_depend_module tem_depend_module module~tem_depend_module->module~tem_varmap_module module~tem_general_module tem_general_module module~tem_general_module->module~tem_abortcriteria_module module~tem_general_module->module~tem_simcontrol_module module~tem_general_module->module~tem_restart_module module~tem_ini_condition_module tem_ini_condition_module module~tem_ini_condition_module->module~tem_spatial_module module~tem_ini_condition_module->module~tem_depend_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

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: d3q19_cxDir(3,19) = reshape([-1, 0, 0, 0, -1, 0, 0, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, -1, 0, -1, 1, 0, 1, -1, 0, 1, 1, -1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, 1, -1, -1, 0, -1, 1, 0, 1, -1, 0, 1, 1, 0, 0, 0, 0], [3, 19])
integer, public, parameter :: d3q27_cxDir(3,27) = reshape([-1, 0, 0, 0, -1, 0, 0, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, -1, 0, -1, 1, 0, 1, -1, 0, 1, 1, -1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, 1, -1, -1, 0, -1, 1, 0, 1, -1, 0, 1, 1, 0, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, 0, 0], [3, 27])
integer, public, parameter :: d3q7_cxDir(3,7) = reshape([-1, 0, 0, 0, -1, 0, 0, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0], [3, 7])
integer, public, parameter :: d3q6_cxDir(3,6) = reshape([-1, 0, 0, 0, -1, 0, 0, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 1], [3, 6])
integer, public, parameter :: d2q9_cxDir(3,9) = reshape([-1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -1, -1, 0, -1, 1, 0, 1, -1, 0, 1, 1, 0, 0, 0, 0], [3, 9])
integer, public, parameter :: d2q5_cxDir(3,5) = reshape([-1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0], [3, 5])
integer, public, parameter :: d2q4_cxDir(3,4) = reshape([-1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0], [3, 4])
integer, public, parameter :: d1q3_cxDir(3,3) = reshape([-1, 0, 0, 1, 0, 0, 0, 0, 0], [3, 3])
integer, public, parameter :: d1q2_cxDir(3,2) = reshape([-1, 0, 0, 1, 0, 0], [3, 2])
integer, private, parameter :: d3q13_cxDir(3,13) = reshape([0, -1, -1, 0, -1, 1, 0, 1, -1, 0, 1, 1, -1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, 1, -1, -1, 0, -1, 1, 0, 1, -1, 0, 1, 1, 0, 0, 0, 0], [3, 13])

Interfaces

public interface init

initialize the dynamic array

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

  • private subroutine placeat_ga_stencilelement(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_stencilelementarray_type) :: me
    type(tem_stencilElement_type), intent(in) :: val
    integer, intent(in) :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

  • private subroutine placeat_ga_stencilelement_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_stencilelementarray_type) :: me
    type(tem_stencilElement_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.

  • private subroutine expand_ga_stencilelement(me, pos, length)

    Arguments

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

    optional length to expand the array

public interface tem_stencil_dump

  • private subroutine tem_stencilHeader_dump(me, nUnit)

    Write element information to disk

    Arguments

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

    stencil header to be dumped

    integer, intent(in), optional :: nUnit
  • private subroutine tem_stencilElement_dump(me, nUnit, neighID, tIDonly)

    Write element information to disk

    Arguments

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

    stencil element to be dumped

    integer, intent(in) :: nUnit

    unit to dump to

    integer(kind=long_k), intent(in), optional, allocatable :: neighID(:)

    neighbor ID

    logical, intent(in), optional :: tIDonly

    only use tree IDs

private interface init

initialize the dynamic array

private interface truncate

truncate the array, meaning cut off the trailing empty entries

private interface empty

empty the entries without changing arrays

private interface destroy

destroy the dynamic array

private interface placeat

insert an element at a given position

  • private subroutine placeat_ga_stencilheader(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_stencilheaderarray_type) :: me
    type(tem_stencilHeader_type), intent(in) :: val
    integer, intent(in) :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

  • private subroutine placeat_ga_stencilheader_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_stencilheaderarray_type) :: me
    type(tem_stencilHeader_type), intent(in) :: val(:)
    integer, intent(in) :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

private interface append

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

private interface expand

increase the size of the container for the array.

  • private subroutine expand_ga_stencilheader(me, pos, length)

    Arguments

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

    optional length to expand the array

private interface init

  • private subroutine init_stencilHeader(me, QQN, QQ, nElems, useAll, nDims, label, cxDir)

    initialize stencil

    Arguments

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

    stencil header to be initialized

    integer, intent(in) :: QQN

    number of discrete velocities in the model (without the center one)

    integer, intent(in), optional :: QQ

    number of discrete velocities in the model (incl. the center one)

    integer, intent(in), optional :: nElems

    The number of elements to use this stencil for

    logical, intent(in), optional :: useAll

    use this stencil for all elements?

    integer, intent(in), optional :: nDims
    character(len=*), intent(in), optional :: label
    integer, intent(in), optional :: cxDir(:,:)
  • private subroutine init_stencilElement(me, QQN, headerPos, tIDpos)

    initialize stencil

    Arguments

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

    stencil element type to be initialized

    integer, intent(in) :: QQN

    number of discrete velocities in the model (without the center one)

    integer, intent(in), optional :: headerPos
    integer, intent(in), optional :: tIDpos(:)

private interface destroy

private interface empty

  • private subroutine empty_stencil(me)

    Delete all entries in the stencil

    Arguments

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

    stencil header type to empty

private interface assignment(=)

  • private subroutine copy_stencilElement(left, right)

    This function provides copy assigment for tem_stencilElement_type

    Arguments

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

    tem_stencilElement to copy to

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

    tem_stencilElement to copy from

  • private subroutine copy_stencilHeader(left, right)

    This function provides copy assigment for tem_stencilHeader_type

    Arguments

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

    tem_stencilHeader to copy to

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

    tem_stencilHeader to copy from


Derived Types

type, public ::  tem_stencilHeader_type

Stencil definitions

Read more…

Components

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

a stencil label

integer, public :: QQ

number of directions

integer, public :: QQN

HK: do we really need this? It is mostly confusing, and solver specific!

Read more…
integer, public :: nDims = 0
integer, public, allocatable :: cxDir(:,:)

cartesian directions of discrete velocities. Integer number version. Size is (3,nDir)

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

Cartesian directions of discrete velocities. Real number version. Size is (3,nDir)

integer, public, allocatable :: cxDirInv(:)

inverted cartesian direction indices. this is well defined for symmetric stencils only.

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

2nd order tensor of discrete velocities Size is (6,QQ) for 3D: xx, yy, zz, xy, yz, xz (3,QQ) for 2D: xx, yy, xy (1,QQ) for 1D: xx

integer, public, allocatable :: map(:)

mapping of stencil entries to treelm definition, if possible entry is zero if nothing defined,

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

mapping of treelm definition to stencil entries, if possible entry is zero if nothing defined

integer, public :: restPosition

Rest-density position in stencil

integer, public :: depStencil

the stencil on which the current one depends this is required for boundary stencils which elements actually require the neighbors of the compute stencil

logical, public :: useAll

use this stencil for all elements

logical, public :: requireNeighNeigh = .false.

requires valid neighbors of the stencil neighbors

logical, public :: requireAll = .false.

requires valid neighbors of the stencil neighbors

integer, public :: nElems

the number of elements using this stencil

type(grw_intarray_type), public, allocatable :: elemLvl(:)

list of elements on which this stencil should be applied Both elemLvl and elem array are used for stencil other than fluid stencil

type(grw_intarray_type), public :: elem

list of elements on which this stencil should be applied In build_BCstencil they point to original treeID list and used in tem_initelemLevels. Later this position is updated such that they point to the level wise total list in update_elemPosToTotalPos.

type, public ::  tem_stencilElement_type

Element stencil definition

Components

Type Visibility Attributes Name Initial
integer, public :: QQN

number of entries in pos

integer, public, allocatable :: tIDpos(:)

position in the tem_element_type::neighID%val( elemPos ) Array size: QQN

integer, public :: headerPos

the stencil on which the current one depends this is required for boundary stencils which elements actually require the neighbors of the compute stencil

integer, public, allocatable :: totalPos(:)

pointer to tem_element_type::tID( ) For neighbor of an element in every stencil direction. It also inclues neighbor which is either fluid/halo/ghost. Array size: QQN Set in routine: build_levelElements, identify_stencilNeigh, identify_additionalNeigh

type, public ::  grw_stencilelementarray_type

growing array type for type(tem_stencilelement_type)

Components

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

type, public ::  grw_stencilheaderarray_type

growing array type for type(tem_stencilheader_type)

Components

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

Functions

public pure function tem_stencil_findIndexOfDir(findDir, cxDir) result(idx)

Find the index of the given direction in the list of all directions. -1 if not found.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: findDir(3)

vector index to find in cxDir

integer, intent(in) :: cxDir(:,:)

array of vectors

Return Value integer

public pure function d3q125_cxDir() result(cxDir)

Definition of the d3q125 neighborhood

Arguments

None

Return Value integer, (3,125)

public pure function d3q81_cxDir() result(cxDir)

Definition of the d3q81 neighborhood.

Arguments

None

Return Value integer, (3,81)

public function tem_stencil_zeroPos(me) result(pos)

Identify the zero-position in the stencil Return -1 if not found in stencil

Arguments

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

stencil to map

Return Value integer

Position of zero-entry in the stencil

public function tem_stencil_getHeaderPos(me, val) result(headerPos)

find position stencil

Arguments

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

List of element stencil definitions

integer, intent(in) :: val

Stencil to search for

Return Value integer

Position of the header in the list, 0 if not found

public function tem_stencil_getLabelForcxDir(me, prevailDir) result(uLabel)

This function returns a unique label for given stencil cxDir

Arguments

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

stencil

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

prevail directions

Return Value character(len=labelLen)

return unique label


Subroutines

public subroutine tem_loadStencil(stencil, parent_handle, conf)

Load the stencil configuration from the lua file

Arguments

Type IntentOptional Attributes Name
type(tem_stencilHeader_type) :: stencil

stencil type to fill

integer, intent(in) :: parent_handle

handle of the parent table

type(flu_State) :: conf

lua state type

public subroutine tem_identify_inverseDirections(me, cxDir)

This subroutine fills the array of inverse directions according to the given array of directions.

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: me(:)

array of positions of the inverse offsets in cxDir

integer, intent(in) :: cxDir(:,:)

array of given offsets

public subroutine tem_identify_prevailDirections(me, cxDir)

This subroutine fills the array of prevailing directions according to the given array of directions.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(out), allocatable :: me(:,:)

growing array of prevailing directions

integer, intent(in) :: cxDir(:,:)

array of given offsets

public subroutine tem_stencil_map_toTreelmDef(me)

Map the stencil offsets to the internally defined treelm offsets.

Arguments

Type IntentOptional Attributes Name
type(tem_stencilHeader_type) :: me

stencil to map

public subroutine tem_treelmDef_map_toStencil(me)

Map the internally defined treelm offsets to the stencil offsets.

Arguments

Type IntentOptional Attributes Name
type(tem_stencilHeader_type) :: me

stencil to map

public subroutine tem_create_stencil(stencil, stencilKind)

This subroutine creates the required stencil.

Arguments

Type IntentOptional Attributes Name
type(tem_stencilHeader_type), intent(out) :: stencil

stencil type to be defined

character(len=*) :: stencilKind

stencil kind to decide which create function to call

private subroutine init_ga_stencilelement(me, length)

Include the subroutines for the growing array.

Arguments

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

private subroutine destroy_ga_stencilelement(me)

Arguments

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

private subroutine truncate_ga_stencilelement(me)

Arguments

Type IntentOptional Attributes Name
type(grw_stencilelementarray_type) :: me

private subroutine empty_ga_stencilelement(me)

Arguments

Type IntentOptional Attributes Name
type(grw_stencilelementarray_type) :: me

private subroutine placeat_ga_stencilelement(me, val, pos, length)

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

Read more…

Arguments

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

optional length to expand the array

private subroutine placeat_ga_stencilelement_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_stencilelementarray_type) :: me
type(tem_stencilElement_type), intent(in) :: val(:)
integer, intent(in) :: pos
integer, intent(in), optional :: length

optional length to expand the array

private subroutine append_ga_stencilelement(me, val, length)

Arguments

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

optional length to expand the array

private subroutine append_ga_stencilelement_vec(me, val, length)

Arguments

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

optional length to expand the array

private subroutine expand_ga_stencilelement(me, pos, length)

Arguments

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

optional length to expand the array

private subroutine init_ga_stencilheader(me, length)

Arguments

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

private subroutine destroy_ga_stencilheader(me)

Arguments

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

private subroutine truncate_ga_stencilheader(me)

Arguments

Type IntentOptional Attributes Name
type(grw_stencilheaderarray_type) :: me

private subroutine empty_ga_stencilheader(me)

Arguments

Type IntentOptional Attributes Name
type(grw_stencilheaderarray_type) :: me

private subroutine placeat_ga_stencilheader(me, val, pos, length)

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

Read more…

Arguments

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

optional length to expand the array

private subroutine placeat_ga_stencilheader_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_stencilheaderarray_type) :: me
type(tem_stencilHeader_type), intent(in) :: val(:)
integer, intent(in) :: pos
integer, intent(in), optional :: length

optional length to expand the array

private subroutine append_ga_stencilheader(me, val, length)

Arguments

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

optional length to expand the array

private subroutine append_ga_stencilheader_vec(me, val, length)

Arguments

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

optional length to expand the array

private subroutine expand_ga_stencilheader(me, pos, length)

Arguments

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

optional length to expand the array

private subroutine empty_stencil(me)

Delete all entries in the stencil

Arguments

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

stencil header type to empty

private subroutine tem_stencilHeader_dump(me, nUnit)

Write element information to disk

Arguments

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

stencil header to be dumped

integer, intent(in), optional :: nUnit

private subroutine tem_stencilElement_dump(me, nUnit, neighID, tIDonly)

Write element information to disk

Arguments

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

stencil element to be dumped

integer, intent(in) :: nUnit

unit to dump to

integer(kind=long_k), intent(in), optional, allocatable :: neighID(:)

neighbor ID

logical, intent(in), optional :: tIDonly

only use tree IDs

private subroutine init_stencilHeader(me, QQN, QQ, nElems, useAll, nDims, label, cxDir)

initialize stencil

Arguments

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

stencil header to be initialized

integer, intent(in) :: QQN

number of discrete velocities in the model (without the center one)

integer, intent(in), optional :: QQ

number of discrete velocities in the model (incl. the center one)

integer, intent(in), optional :: nElems

The number of elements to use this stencil for

logical, intent(in), optional :: useAll

use this stencil for all elements?

integer, intent(in), optional :: nDims
character(len=*), intent(in), optional :: label
integer, intent(in), optional :: cxDir(:,:)

private subroutine init_stencilElement(me, QQN, headerPos, tIDpos)

initialize stencil

Arguments

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

stencil element type to be initialized

integer, intent(in) :: QQN

number of discrete velocities in the model (without the center one)

integer, intent(in), optional :: headerPos
integer, intent(in), optional :: tIDpos(:)

private subroutine destroy_stencilElement(me)

destroy stencil

Arguments

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

stencil element type to be destroyed

private subroutine tem_stencil_createCxcx(me)

Create cxcx for a given stencil

Arguments

Type IntentOptional Attributes Name
type(tem_stencilHeader_type) :: me

stencil

private subroutine copy_stencilHeader(left, right)

This function provides copy assigment for tem_stencilHeader_type

Arguments

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

tem_stencilHeader to copy to

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

tem_stencilHeader to copy from

private subroutine copy_stencilElement(left, right)

This function provides copy assigment for tem_stencilElement_type

Arguments

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

tem_stencilElement to copy to

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

tem_stencilElement to copy from