tem_element_module Module

This module provides descriptions for elements

dynamic array of variable types


Uses

  • module~~tem_element_module~~UsesGraph module~tem_element_module tem_element_module module~env_module env_module module~tem_element_module->module~env_module module~tem_grow_array_module tem_grow_array_module module~tem_element_module->module~tem_grow_array_module module~tem_arrayofarrays_module tem_arrayofarrays_module module~tem_element_module->module~tem_arrayofarrays_module module~tem_dyn_array_module tem_dyn_array_module module~tem_element_module->module~tem_dyn_array_module module~tem_stencil_module tem_stencil_module module~tem_element_module->module~tem_stencil_module module~flu_binding flu_binding module~env_module->module~flu_binding iso_fortran_env iso_fortran_env module~env_module->iso_fortran_env module~aotus_module aotus_module module~env_module->module~aotus_module mpi mpi module~env_module->mpi module~tem_grow_array_module->module~env_module module~tem_arrayofarrays_module->module~env_module module~tem_arrayofarrays_module->module~tem_dyn_array_module module~tem_dyn_array_module->module~env_module module~tem_stencil_module->module~env_module module~tem_stencil_module->module~tem_grow_array_module module~tem_stencil_module->module~tem_dyn_array_module module~tem_comm_module tem_comm_module module~tem_stencil_module->module~tem_comm_module module~tem_logging_module tem_logging_module module~tem_stencil_module->module~tem_logging_module module~tem_aux_module tem_aux_module module~tem_stencil_module->module~tem_aux_module module~tem_param_module tem_param_module module~tem_stencil_module->module~tem_param_module module~tem_geometry_module tem_geometry_module module~tem_stencil_module->module~tem_geometry_module module~tem_stencil_module->module~aotus_module module~tem_tools_module tem_tools_module module~tem_stencil_module->module~tem_tools_module module~aot_table_module aot_table_module module~tem_stencil_module->module~aot_table_module module~tem_comm_env_module tem_comm_env_module module~tem_stencil_module->module~tem_comm_env_module module~tem_comm_module->module~env_module module~tem_comm_module->module~tem_grow_array_module module~tem_comm_module->module~tem_dyn_array_module module~tem_comm_module->module~flu_binding module~tem_comm_module->module~tem_logging_module module~tem_comm_module->module~tem_aux_module module~tem_comm_module->module~aotus_module module~tem_comm_module->mpi 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 tem_sparse_comm_module tem_sparse_comm_module module~tem_comm_module->tem_sparse_comm_module mem_for_mpi_module mem_for_mpi_module module~tem_comm_module->mem_for_mpi_module module~tem_logging_module->module~env_module module~tem_logging_module->module~aotus_module module~tem_logging_module->module~aot_table_module module~tem_aux_module->module~env_module module~tem_aux_module->module~flu_binding module~tem_aux_module->module~tem_logging_module module~tem_aux_module->module~aotus_module module~tem_aux_module->mpi module~tem_aux_module->module~tem_tools_module module~tem_aux_module->module~aot_table_module module~tem_aux_module->module~tem_comm_env_module module~tem_lua_requires_module tem_lua_requires_module module~tem_aux_module->module~tem_lua_requires_module module~soi_revision_module soi_revision_module module~tem_aux_module->module~soi_revision_module module~tem_param_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->mpi module~tem_geometry_module->module~tem_tools_module module~tem_float_module tem_float_module module~tem_geometry_module->module~tem_float_module module~tem_topology_module tem_topology_module module~tem_geometry_module->module~tem_topology_module module~tem_debug_module tem_debug_module module~tem_geometry_module->module~tem_debug_module module~treelmesh_module treelmesh_module module~tem_geometry_module->module~treelmesh_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_tools_module->module~env_module module~tem_comm_env_module->mpi

Used by

  • module~~tem_element_module~~UsedByGraph module~tem_element_module tem_element_module module~tem_construction_module tem_construction_module module~tem_construction_module->module~tem_element_module module~tem_face_module tem_face_module module~tem_face_module->module~tem_element_module module~tem_face_module->module~tem_construction_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_spacetime_fun_module tem_spacetime_fun_module module~tem_face_module->module~tem_spacetime_fun_module module~tem_surfacedata_module tem_surfaceData_module module~tem_surfacedata_module->module~tem_element_module module~tem_surfacedata_module->module~tem_construction_module module~tem_surfacedata_module->module~tem_spacetime_fun_module module~tem_adaptation_module tem_adaptation_module module~tem_adaptation_module->module~tem_element_module module~tem_adaptation_module->module~tem_construction_module module~tem_interpolation_module tem_interpolation_module module~tem_interpolation_module->module~tem_construction_module module~tem_facedata_module->module~tem_construction_module module~tem_subtree_module tem_subTree_module module~tem_subtree_module->module~tem_construction_module module~tem_comptefacerules_module->module~tem_facedata_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_subtree_module module~tem_spacetime_fun_module->module~tem_subtree_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_subtree_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_subtree_module module~tem_tracking_module->module~hvs_output_module module~tem_variable_module tem_variable_module module~tem_variable_module->module~tem_spacetime_fun_module module~tem_bc_module tem_bc_module module~tem_bc_module->module~tem_spacetime_fun_module module~tem_abortcriteria_module tem_abortCriteria_module module~tem_abortcriteria_module->module~tem_convergence_module module~tem_spacetime_var_module tem_spacetime_var_module module~tem_spacetime_var_module->module~tem_spacetime_fun_module module~tem_varmap_module tem_varMap_module module~tem_varmap_module->module~tem_spacetime_fun_module module~tem_derived_module tem_derived_module module~tem_derived_module->module~tem_spacetime_fun_module module~tem_simcontrol_module tem_simControl_module module~tem_simcontrol_module->module~tem_convergence_module

Contents


Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: eT_undefined = -1
integer, public, parameter :: eT_nonExisting = 0
integer, public, parameter :: eT_fluid = 1
integer, public, parameter :: eT_ghostFromCoarser = 2
integer, public, parameter :: eT_ghostFromFiner = 3
integer, public, parameter :: eT_halo = 4
integer, public, parameter :: eT_distributedGhostFromFiner = 5
integer, public, parameter :: eT_sacrificed = 6

Element properties which are created while adaptive refinement

integer, public, parameter :: eT_minNumber = -1

eType integer values must be in the range of eT_minNumber <= eT_val <= eT_maxNumber

integer, public, parameter :: eT_maxNumber = 7
integer, public, parameter :: eT_minRelevant = 1

Relevant number of element types. As the distributed ghost from finer are in the assemble list step collapsed with the normal ghosFromFiner, only eType = 1 to 4 needs to be treated afterwards

integer, public, parameter :: eT_maxRelevant = 4
character(len=12), public, parameter :: eT_labels(eT_minNumber:eT_maxNumber) = ['   undefined', ' nonExisting', '       fluid', 'gFromCoarser', '  gFromFiner', '        halo', ' dgFromFiner', '  sacrificed', '    newFluid']

Array of element type labels To use it, one can do the following: write(,) trim(eT_labels(levelDesc( level )%elem%eType%val( tPos )))

integer, private, parameter :: eT_newFluid = 7

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_grw_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_grw_stencilelementarray_type) :: me
    type(grw_stencilelementarray_type), intent(in) :: val
    integer, intent(in) :: pos
    integer, intent(in), optional :: length

    optional length to expand the array

  • private subroutine placeat_ga_grw_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_grw_stencilelementarray_type) :: me
    type(grw_stencilelementarray_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 interface getSize

  • private subroutine getSize_element(me, elemSize)

    return the number of total allocated memory (bytes) per element

    Arguments

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

    element object

    integer(kind=long_k), intent(out) :: elemSize

    number of total entries to be returned

public interface getReqSize

  • private subroutine getReqSize_element(me, elemSize)

    return the number of actual used memory (bytes) per element

    Arguments

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

    element object

    integer(kind=long_k), intent(out) :: elemSize

    number of total entries to be returned

public interface changeType

  • private subroutine changeType_element(me, elemPos, new_eType)

    Arguments

    Type IntentOptional Attributes Name
    type(tem_element_type), intent(inout) :: me
    integer, intent(in) :: elemPos
    integer, intent(in) :: new_eType
  • private subroutine changeType_element_vec(me, nElems, elemPos, new_eType)

    Arguments

    Type IntentOptional Attributes Name
    type(tem_element_type), intent(inout) :: me
    integer, intent(in) :: nElems
    integer, intent(in) :: elemPos(:)
    integer, intent(in) :: new_eType

private interface init

  • private subroutine init_element(me, length)

    initialize an element and optionally set contents

    Arguments

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

private interface append

  • private subroutine append_element(me, tID, property, eType, pntTID, sourceProc, nNeighIDs, haloNesting, needsUpdate, stencilElements, pos, wasAdded)

    append an element with its treeID, property, element type, position in Tree, position in boundary_ID, number of neighbors, procID

    Arguments

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

    element object

    integer(kind=long_k), intent(in) :: tID

    element treeID

    integer(kind=long_k), intent(in), optional :: property

    property associated with the treeID

    integer, intent(in), optional :: eType

    element type

    integer, intent(in), optional :: pntTID

    count of this type pointer of the treeID

    integer, intent(in), optional :: sourceProc

    the procID which is adding the element

    integer, intent(in), optional :: nNeighIDs

    number of neighbors

    integer, intent(in), optional :: haloNesting

    nesting level for haloElems

    logical, intent(in), optional :: needsUpdate
    type(tem_stencilElement_type), intent(in), optional :: stencilElements(:)
    integer, intent(out) :: pos

    position of treeID

    logical, intent(out), optional :: wasAdded

private interface truncate

  • private subroutine truncate_element(me)

    truncate all the lists in the element object

    Arguments

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

    element object

private interface destroy

  • private subroutine destroy_element(me)

    destroy all the lists in the element object

    Arguments

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

    element object


Derived Types

type, public ::  tem_element_type

Components

Type Visibility Attributes Name Initial
type(dyn_longarray_type), public :: tID

Tree ID

type(grw_longarray_type), public :: property

Property

type(grw_intarray_type), public :: eType

element type: fluid, ghostFromCoarser, ghostFromFiner, halo

type(grw_intarray_type), public :: pntTID

Pointer to the original treeID list It should have the same size of tree It is destroyed in assemble_lists

type(grw_grw_stencilelementarray_type), public :: stencil

Stencils defined for this element

type(grw_dynlongarray_type), public :: neighID

neighbor treeIDs coming from the stencil definitions each element has a list of neighbors, so this is an array of array

type(grw_intarray_type), public :: sourceProc

source partition (starts at 1)

type(grw_intarray_type), public :: haloNesting

nesting (only relevant for halos, to include their neighborhood)

type(grw_logicalarray_type), public :: needsUpdate

does this element need an update

integer, public :: nElems(eT_minNumber:eT_maxNumber)

number of various types elements

type, private ::  grw_grw_stencilelementarray_type

growing array type for type(grw_stencilelementarray_type)

Components

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

Functions

public function tem_eTypeOfId(tID, me) result(eType)

Return the element type of a treeID .

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(in) :: tID

the element you are looking for

type(tem_element_type), intent(in) :: me

the descriptor you use for searching

Return Value integer

element type

private pure function tem_eTypeIsValid(eT) result(isValid)

Arguments

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

Return Value logical


Subroutines

public subroutine tem_element_dump(me, elemPos, nUnit, compact, header, stencil)

Write element information to disk

Arguments

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

element object

integer, intent(in) :: elemPos
integer, intent(in) :: nUnit
logical, intent(in), optional :: compact
logical, intent(in), optional :: header
logical, intent(in), optional :: stencil

Whether to write stencil information

public subroutine print_nElems(nElems, outUnit)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nElems(eT_minRelevant:eT_maxRelevant)
integer, intent(in) :: outUnit

private subroutine init_ga_grw_stencilelement(me, length)

Include the subroutines for the dynamic array.

Arguments

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

private subroutine destroy_ga_grw_stencilelement(me)

Arguments

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

private subroutine truncate_ga_grw_stencilelement(me)

Arguments

Type IntentOptional Attributes Name
type(grw_grw_stencilelementarray_type) :: me

private subroutine empty_ga_grw_stencilelement(me)

Arguments

Type IntentOptional Attributes Name
type(grw_grw_stencilelementarray_type) :: me

private subroutine placeat_ga_grw_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_grw_stencilelementarray_type) :: me
type(grw_stencilelementarray_type), intent(in) :: val
integer, intent(in) :: pos
integer, intent(in), optional :: length

optional length to expand the array

private subroutine placeat_ga_grw_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_grw_stencilelementarray_type) :: me
type(grw_stencilelementarray_type), intent(in) :: val(:)
integer, intent(in) :: pos
integer, intent(in), optional :: length

optional length to expand the array

private subroutine append_ga_grw_stencilelement(me, val, length)

Arguments

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

optional length to expand the array

private subroutine append_ga_grw_stencilelement_vec(me, val, length)

Arguments

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

optional length to expand the array

private subroutine expand_ga_grw_stencilelement(me, pos, length)

Arguments

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

optional length to expand the array

private subroutine init_element(me, length)

initialize an element and optionally set contents

Arguments

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

private subroutine truncate_element(me)

truncate all the lists in the element object

Arguments

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

element object

private subroutine getReqSize_element(me, elemSize)

return the number of actual used memory (bytes) per element

Arguments

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

element object

integer(kind=long_k), intent(out) :: elemSize

number of total entries to be returned

private subroutine getSize_element(me, elemSize)

return the number of total allocated memory (bytes) per element

Arguments

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

element object

integer(kind=long_k), intent(out) :: elemSize

number of total entries to be returned

private subroutine destroy_element(me)

destroy all the lists in the element object

Arguments

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

element object

private subroutine append_element(me, tID, property, eType, pntTID, sourceProc, nNeighIDs, haloNesting, needsUpdate, stencilElements, pos, wasAdded)

append an element with its treeID, property, element type, position in Tree, position in boundary_ID, number of neighbors, procID

Arguments

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

element object

integer(kind=long_k), intent(in) :: tID

element treeID

integer(kind=long_k), intent(in), optional :: property

property associated with the treeID

integer, intent(in), optional :: eType

element type

integer, intent(in), optional :: pntTID

count of this type pointer of the treeID

integer, intent(in), optional :: sourceProc

the procID which is adding the element

integer, intent(in), optional :: nNeighIDs

number of neighbors

integer, intent(in), optional :: haloNesting

nesting level for haloElems

logical, intent(in), optional :: needsUpdate
type(tem_stencilElement_type), intent(in), optional :: stencilElements(:)
integer, intent(out) :: pos

position of treeID

logical, intent(out), optional :: wasAdded

private subroutine changeType_element(me, elemPos, new_eType)

Arguments

Type IntentOptional Attributes Name
type(tem_element_type), intent(inout) :: me
integer, intent(in) :: elemPos
integer, intent(in) :: new_eType

private subroutine changeType_element_vec(me, nElems, elemPos, new_eType)

Arguments

Type IntentOptional Attributes Name
type(tem_element_type), intent(inout) :: me
integer, intent(in) :: nElems
integer, intent(in) :: elemPos(:)
integer, intent(in) :: new_eType