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~tem_stencil_module tem_stencil_module module~tem_element_module->module~tem_stencil_module module~tem_arrayofarrays_module tem_arrayofarrays_module module~tem_element_module->module~tem_arrayofarrays_module module~env_module env_module module~tem_element_module->module~env_module module~tem_dyn_array_module tem_dyn_array_module module~tem_element_module->module~tem_dyn_array_module module~tem_grow_array_module tem_grow_array_module module~tem_element_module->module~tem_grow_array_module module~tem_stencil_module->module~env_module module~tem_stencil_module->module~tem_dyn_array_module module~tem_stencil_module->module~tem_grow_array_module module~tem_tools_module tem_tools_module module~tem_stencil_module->module~tem_tools_module module~aotus_module aotus_module module~tem_stencil_module->module~aotus_module module~tem_geometry_module tem_geometry_module module~tem_stencil_module->module~tem_geometry_module module~aot_table_module aot_table_module module~tem_stencil_module->module~aot_table_module module~tem_aux_module tem_aux_module module~tem_stencil_module->module~tem_aux_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_param_module tem_param_module module~tem_stencil_module->module~tem_param_module module~tem_comm_env_module tem_comm_env_module module~tem_stencil_module->module~tem_comm_env_module module~tem_arrayofarrays_module->module~env_module module~tem_arrayofarrays_module->module~tem_dyn_array_module iso_fortran_env iso_fortran_env module~env_module->iso_fortran_env module~env_module->module~aotus_module module~flu_binding flu_binding module~env_module->module~flu_binding mpi mpi module~env_module->mpi module~tem_dyn_array_module->module~env_module module~tem_grow_array_module->module~env_module module~tem_tools_module->module~env_module module~tem_geometry_module->module~env_module module~tem_geometry_module->module~tem_tools_module module~tem_geometry_module->mpi module~tem_geometry_module->module~tem_logging_module module~tem_geometry_module->module~tem_param_module module~tem_property_module tem_property_module module~tem_geometry_module->module~tem_property_module module~treelmesh_module treelmesh_module module~tem_geometry_module->module~treelmesh_module module~tem_float_module tem_float_module module~tem_geometry_module->module~tem_float_module module~tem_debug_module tem_debug_module module~tem_geometry_module->module~tem_debug_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~tem_aux_module->module~env_module module~tem_aux_module->module~tem_tools_module module~tem_aux_module->module~aotus_module module~tem_aux_module->module~flu_binding module~tem_aux_module->module~aot_table_module module~tem_aux_module->mpi module~tem_aux_module->module~tem_logging_module module~tem_aux_module->module~tem_comm_env_module module~tem_revision_module tem_revision_module module~tem_aux_module->module~tem_revision_module module~tem_lua_requires_module tem_lua_requires_module module~tem_aux_module->module~tem_lua_requires_module module~tem_comm_module->module~env_module module~tem_comm_module->module~tem_dyn_array_module module~tem_comm_module->module~tem_grow_array_module module~tem_comm_module->module~aotus_module module~tem_comm_module->module~flu_binding module~tem_comm_module->module~tem_aux_module module~tem_comm_module->mpi module~tem_comm_module->module~tem_logging_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 hvs_sizeof_module hvs_sizeof_module module~tem_comm_module->hvs_sizeof_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_param_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_adaptation_module tem_adaptation_module module~tem_adaptation_module->module~tem_element_module module~tem_construction_module tem_construction_module module~tem_adaptation_module->module~tem_construction_module module~tem_surfacedata_module tem_surfaceData_module module~tem_surfacedata_module->module~tem_element_module module~tem_surfacedata_module->module~tem_construction_module program~elem_memalloc elem_memAlloc program~elem_memalloc->module~tem_element_module program~tem_construction_test tem_construction_test program~tem_construction_test->module~tem_element_module program~tem_construction_test->module~tem_construction_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_construction_module->module~tem_element_module module~tem_subtree_module tem_subTree_module module~tem_subtree_module->module~tem_construction_module module~tem_facedata_module->module~tem_construction_module program~tem_face_test~2 tem_face_test program~tem_face_test~2->module~tem_face_module program~tem_face_test~2->module~tem_facedata_module module~tem_interpolation_module tem_interpolation_module module~tem_interpolation_module->module~tem_construction_module program~tem_face_test tem_face_test program~tem_face_test->module~tem_face_module program~tem_face_test->module~tem_facedata_module program~tem_face_test~3 tem_face_test program~tem_face_test~3->module~tem_face_module program~tem_face_test~3->module~tem_facedata_module program~tem_varsys_stfunvar_test tem_varSys_stfunVar_test program~tem_varsys_stfunvar_test->module~tem_subtree_module module~tem_spacetime_fun_module tem_spacetime_fun_module module~tem_spacetime_fun_module->module~tem_subtree_module module~tem_comptefacerules_module tem_compteFaceRules_module module~tem_comptefacerules_module->module~tem_facedata_module program~tem_varsys_opvar_test tem_varSys_opVar_test program~tem_varsys_opvar_test->module~tem_subtree_module module~tem_tracking_module tem_tracking_module module~tem_tracking_module->module~tem_subtree_module module~hvs_output_module hvs_output_module module~hvs_output_module->module~tem_subtree_module module~tem_convergence_module tem_convergence_module module~tem_convergence_module->module~tem_subtree_module program~tem_varsys_test tem_varSys_test program~tem_varsys_test->module~tem_subtree_module

Contents


Variables

TypeVisibilityAttributesNameInitial
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

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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

    TypeIntentOptionalAttributesName
    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

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

    element object


Derived Types

type, public :: tem_element_type

Components

TypeVisibilityAttributesNameInitial
type(dyn_longarray_type), private :: tID

Tree ID

type(grw_longarray_type), private :: property

Property

type(grw_intarray_type), private :: eType

element type: fluid, ghostFromCoarser, ghostFromFiner, halo

type(grw_intarray_type), private :: 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), private :: stencil

Stencils defined for this element

type(grw_dynlongarray_type), private :: 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), private :: sourceProc

source partition (starts at 1)

type(grw_intarray_type), private :: haloNesting

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

type(grw_logicalarray_type), private :: needsUpdate

does this element need an update

integer, private :: nElems(eT_minNumber:eT_maxNumber)

number of various types elements

growing array type for type(grw_stencilelementarray_type)

Components

TypeVisibilityAttributesNameInitial
integer, private :: nvals =0
integer, private :: containersize =0
type(grw_stencilelementarray_type), private, allocatable:: val(:)

Functions

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

Return the element type of a treeID .

Arguments

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

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

private subroutine destroy_ga_grw_stencilelement(me)

Arguments

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

private subroutine truncate_ga_grw_stencilelement(me)

Arguments

TypeIntentOptionalAttributesName
type(grw_grw_stencilelementarray_type) :: me

private subroutine empty_ga_grw_stencilelement(me)

Arguments

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
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

TypeIntentOptionalAttributesName
type(tem_element_type), intent(inout) :: me
integer, intent(in) :: nElems
integer, intent(in) :: elemPos(:)
integer, intent(in) :: new_eType