tem_faceData_module Module

Datatypes and routines for face descriptions.

Faces complement elements in the mesh. Each element is enclosed by two faces in each direction. (For cubical elements we get 6 faces enclosing the element). We organize the faces by looking at each direction individually. Thus, each face can be identified by its normal direction and an ID. With this approach it is possible to use the same identification numbers as for the elements and also to utilize the level descriptor that is available for the elements, by just using it for each direction separately.

For each face we have two sides (left in negative axis direction and right in positive axis direction): left < | > right. Accordingly we have two adjacent elements. See tem_face_module for some more details about the internals and the construction of the face information.

Faces can have properties attached to them, similar to the properties we have for elements. It is possible to combine the properties by adding the corresponding properties, i.e. tem_fromFinerFace_prp + tem_remoteFace_prp represents a face which is communicated, but at the same time a face from a finer level (i.e. in this situation is is a halo which is refined on the remote partition).


Uses

  • module~~tem_facedata_module~~UsesGraph module~tem_facedata_module tem_faceData_module module~env_module env_module module~tem_facedata_module->module~env_module module~tem_comm_module tem_comm_module module~tem_facedata_module->module~tem_comm_module module~tem_construction_module tem_construction_module module~tem_facedata_module->module~tem_construction_module module~tem_dyn_array_module tem_dyn_array_module module~tem_facedata_module->module~tem_dyn_array_module module~tem_grow_array_module tem_grow_array_module module~tem_facedata_module->module~tem_grow_array_module aotus_module aotus_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_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->aotus_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_aux_module tem_aux_module module~tem_comm_module->module~tem_aux_module module~tem_logging_module tem_logging_module module~tem_comm_module->module~tem_logging_module module~tem_comm_module->mpi tem_sparse_comm_module tem_sparse_comm_module module~tem_comm_module->tem_sparse_comm_module module~tem_construction_module->module~env_module module~tem_construction_module->module~tem_comm_module module~tem_construction_module->module~tem_dyn_array_module module~tem_construction_module->module~tem_grow_array_module module~tem_construction_module->module~tem_aux_module module~tem_bc_prop_module tem_bc_prop_module module~tem_construction_module->module~tem_bc_prop_module module~tem_comm_env_module tem_comm_env_module module~tem_construction_module->module~tem_comm_env_module module~tem_debug_module tem_debug_module module~tem_construction_module->module~tem_debug_module module~tem_element_module tem_element_module module~tem_construction_module->module~tem_element_module module~tem_geometry_module tem_geometry_module module~tem_construction_module->module~tem_geometry_module module~tem_halo_module tem_halo_module module~tem_construction_module->module~tem_halo_module module~tem_construction_module->module~tem_logging_module module~tem_param_module tem_param_module module~tem_construction_module->module~tem_param_module module~tem_property_module tem_property_module module~tem_construction_module->module~tem_property_module module~tem_stencil_module tem_stencil_module module~tem_construction_module->module~tem_stencil_module module~tem_tools_module tem_tools_module module~tem_construction_module->module~tem_tools_module module~tem_topology_module tem_topology_module module~tem_construction_module->module~tem_topology_module module~treelmesh_module treelmesh_module module~tem_construction_module->module~treelmesh_module module~tem_construction_module->mpi module~tem_construction_module->tem_sparse_comm_module module~tem_dyn_array_module->module~env_module module~tem_grow_array_module->module~env_module

Used by

  • module~~tem_facedata_module~~UsedByGraph module~tem_facedata_module tem_faceData_module module~tem_comptefacerules_module tem_compteFaceRules_module module~tem_comptefacerules_module->module~tem_facedata_module module~tem_face_module tem_face_module module~tem_face_module->module~tem_facedata_module module~tem_face_module->module~tem_comptefacerules_module

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: tem_left = 1

Parameter to index left (1)

integer, public, parameter :: tem_right = 2

Parameter to index right (2)

integer, public, parameter, dimension(2) :: tem_invFace_map = [tem_right, tem_left]

Inverse face mapping.

This simply maps 1 to 2 and 2 to 1. So it returns left when right is given, and right when left is given.

integer, public, parameter, dimension(6) :: tem_dirToFace_map = [tem_left, tem_left, tem_left, tem_right, tem_right, tem_right]

Mapping from spatial direction to left and right face.

Each cubic element has 6 faces. In many solvers the different spatial directions are treated similarly, but just rotated. Therefore, in this module, we have left and right faces of an element. The following array provides a mapping from spatial direction to left or right face. In 2D the situation is as follows:

                                      right face in y
                           ------------------------------
                          /             / q__N         /
       y dir             /             /              /
        /               /  q__W       /      q__E    /
       /     left face / <---------elem---------->  /   right face in x
      /               /             /              /
     /               /             /              /
    /               /             / q__S         /
   /               ------------------------------
                            left face in y
  ------------> x dir

In a similar way, we can generalize the upper situation to 3D. To convert direction a face direction, e.g. q__E q__E, to a face direction access the following array by tem_dirToFace_map(q__E).

integer, public, parameter :: tem_notExist_prp = 1

Left/right property of a face if the left/right element does not exist

integer, public, parameter :: tem_fluidFace_prp = 2

Left/right property of a face if the left/right element of the face is a fluid element.

integer, public, parameter :: tem_fromFinerFace_prp = 4

Left/right property of a face if the left/right element of the face is a from finer element.

integer, public, parameter :: tem_fromCoarserFace_prp = 8

Left/right property of a face if the left/right element of the face is a from coarser element.

integer, public, parameter :: tem_remoteFace_prp = 16

Left/right property of a face if the left/right element of the face is a halo element.

integer, public, parameter :: tem_bndFace_prp = 32

Left/right property of a face if the left/right element of the face is a bnd element.


Derived Types

type, public ::  tem_faceList_type

A unique list (i.e. guaranteees that no duplicates occur) collecting a set of faces in one direction.

Read more…

Components

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

The unique identifiers of the faces, i.e. the treeID of the elements on the left side of the face.

Read more…
type(grw_longarray_type), public :: rightElemId

The element id of the element on the right side of the face.

type(grw_intarray_type), public :: leftElemPos

Index of the element left of the face.

type(grw_intarray_type), public :: rightElemPos

Index of the element right of the face.

type(grw_intarray_type), public :: leftPrp

Properties on the left side of the face.

type(grw_intarray_type), public :: rightPrp

Properties on the right side of the face.

type, public ::  tem_faceIterator_type

Iterator for a certain type of faces

Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: leftPos(:)

Index of the element on the left side of the face.

integer, public, allocatable :: rightPos(:)

Index of the element on the right side of the face.

integer, public, allocatable :: facePos(:)

Index of the face in the (overall) face description (tem_faceList_type).

type, public ::  tem_face_descriptor_type

Datatype to provide face information for all faces in one direction on the same level.

Components

Type Visibility Attributes Name Initial
type(tem_faceList_type), public :: faceList

A dynamic list of faces in this descriptor.

type(tem_faceDep_type), public :: faceDep

For each element in tem_faceList_type we store the up- and downward facial dependencies.

type(tem_faceIterator_type), public :: computeFace

Datatype which holds iterators for the computable faces.

type(tem_faceInterpolation_type), public :: fromFinerFace(2)

Datatype which holds iterators for the from finer faces. We separate left and right faces. To determine which direction corresponds to left or right face, have a look at this tem_dirToFace_map.

type(tem_communication_type), public :: recvBuffer_state(2)

Buffer for state data which will be received before each compute step One buffer for the left faces of each cell and another one for the right faces of the cells. To determine which direction corresponds to left or right face, have a look at this tem_dirToFace_map.

type(tem_communication_type), public :: sendBuffer_state(2)

Buffer for state data which will be send before each compute step. One buffer for the left faces of each cell and another one for the right faces of the cells. To determine which direction corresponds to left or right face, have a look at this tem_dirToFace_map.

type(tem_communication_type), public :: recvBuffer_flux(2)

Buffer for flux data which will be received before each compute step One buffer for the left faces of each cell and another one for the right faces of the cells. To determine which direction corresponds to left or right face, have a look at this tem_dirToFace_map.

type(tem_communication_type), public :: sendBuffer_flux(2)

Buffer for flux data which will be send before each compute step. One buffer for the left faces of each cell and another one for the right faces of the cells. To determine which direction corresponds to left or right face, have a look at this tem_dirToFace_map.

type, public ::  tem_face_type

Datatype for all faces in the mesh per level.

Components

Type Visibility Attributes Name Initial
type(tem_face_descriptor_type), public :: faces(3)

Face information: one descriptor for each direction (x,y,z).

type(tem_levelDesc_type), public :: dimByDimDesc(3)

Dimension-by-dimension level descriptors (these descriptors are necessary to build up the face descriptions). The first of this descriptor is build with (-1,0,0) and (+1,0,0) stencil for the x-direction. The second is build with (0,-1,0) and (0,+1,0) stencil for the y-direction. The third is build with (0,0,-1) and (0,0,+1) stencil for the z-direction.

type, private ::  tem_faceDep_type

Datatype to represent dependencies (in up- and downward direction) of the faces in a TREELM mesh. We only store face dependencies between the two adjacent refinement levels (i.e. vertical dependencies consider only a refinement level jump of 1 in both refinement directions).

Components

Type Visibility Attributes Name Initial
integer(kind=long_k), public, allocatable :: parentFaceId(:)

JZ: currently we store vertical dependencies for all faces in the face,even if a face does not require a vertical dependency. Maybe we can replace this by a dynamic strucutre to avoid exessive memory consumption. The upwards (current level -> coarser level) facial dependencies. The size of this array is the number of faces. The array holds the face ids of the parent elements. If any element has no parent face (i.e. no upward dependency is necessary) this array holds a -1 at the element's position.

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

The parent elements position in the face description of the next coarser level. If any element does not have a parent face this array will hold a -1 entry at its position.

integer(kind=long_k), public, allocatable :: childFaceId(:,:)

The downwards (current level -> finer level) facial dependencies. The size of this array is 4 (as we have 4 child faces) and the number of faces on the current level. If a face does not have/require child faces its entries are set to -1.

integer(kind=long_k), public, allocatable :: childFaceIdOp(:,:)
integer, public, allocatable :: childFacePos(:,:)

The child element positions in the face desciption of the next finer level. If any element does not have child faces, its entries will be set to -1.

integer, public, allocatable :: childFacePosOp(:,:)

type, private ::  tem_faceInterpolation_type

Container to store the face that require interpolations.

Components

Type Visibility Attributes Name Initial
integer, public, allocatable :: elemPos(:)

The element position. Since interpolations are done facewise (left or right) we only need one element position here.

integer, public, allocatable :: childPos(:,:)

The element positions of the finer child elements. As a face has exactly 4 children the first dimension is 4. The second dimension is the number of faces in this container.

integer, public, allocatable :: elemPosOp(:)

The element position opposite to the refined face. E.g. if the left element is refined, the right face of the left element position is stored here.

integer, public, allocatable :: childPosOp(:,:)

The child element positions opposite to the refined face.

integer, public, allocatable :: facePos(:)

Position of the face in the face description.