tem_levelDesc_type Derived Type

type, public :: tem_levelDesc_type

detailed information of a complete level of elements including all treeIDs, properties and neighbors as well as informations about ghost/halo cells and its dependencies for interpolation/reconstruction


Inherits

type~~tem_leveldesc_type~~InheritsGraph type~tem_leveldesc_type tem_levelDesc_type type~depsource_type depSource_type type~tem_leveldesc_type->type~depsource_type depFromFiner, depFromCoarser type~dyn_intarray_type dyn_intarray_type type~tem_leveldesc_type->type~dyn_intarray_type sourceFromFiner, sourceFromCoarser, bc_elemBuffer type~dyn_longarray_type dyn_longarray_type type~tem_leveldesc_type->type~dyn_longarray_type require type~grw_intarray_type grw_intarray_type type~tem_leveldesc_type->type~grw_intarray_type intpFromCoarser, intpFromFiner type~tem_communication_type tem_communication_type type~tem_leveldesc_type->type~tem_communication_type sendBuffer, sendBufferFromCoarser, sendBufferFromFiner, recvBuffer, recvBufferFromCoarser, recvBufferFromFiner type~tem_element_type tem_element_type type~tem_leveldesc_type->type~tem_element_type elem type~tem_halolist_type tem_haloList_type type~tem_leveldesc_type->type~tem_halolist_type haloList type~tem_levelneighbor_type tem_levelNeighbor_type type~tem_leveldesc_type->type~tem_levelneighbor_type neigh type~depsource_type->type~grw_intarray_type elem, elemBuffer type~tem_communication_type->type~grw_intarray_type elemPos type~tem_intbuffer_type tem_intbuffer_type type~tem_communication_type->type~tem_intbuffer_type buf_int type~tem_longbuffer_type tem_longbuffer_type type~tem_communication_type->type~tem_longbuffer_type buf_long type~tem_realbuffer_type tem_realbuffer_type type~tem_communication_type->type~tem_realbuffer_type buf_real type~tem_element_type->type~dyn_longarray_type tID type~tem_element_type->type~grw_intarray_type eType, pntTID, sourceProc, haloNesting type~grw_dynlongarray_type grw_dynlongarray_type type~tem_element_type->type~grw_dynlongarray_type neighID type~grw_grw_stencilelementarray_type grw_grw_stencilelementarray_type type~tem_element_type->type~grw_grw_stencilelementarray_type stencil type~grw_logicalarray_type grw_logicalarray_type type~tem_element_type->type~grw_logicalarray_type needsUpdate type~grw_longarray_type grw_longarray_type type~tem_element_type->type~grw_longarray_type property type~tem_halolist_type->type~dyn_intarray_type partnerProc type~grw_dynintarray_type grw_dynintarray_type type~tem_halolist_type->type~grw_dynintarray_type halos type~grw_dynintarray_type->type~dyn_intarray_type val type~grw_dynlongarray_type->type~dyn_longarray_type val type~grw_stencilelementarray_type grw_stencilelementarray_type type~grw_grw_stencilelementarray_type->type~grw_stencilelementarray_type val c_ptr c_ptr type~tem_intbuffer_type->c_ptr mem_mpi type~tem_longbuffer_type->c_ptr mem_mpi type~tem_realbuffer_type->c_ptr mem_mpi type~tem_stencilelement_type tem_stencilElement_type type~grw_stencilelementarray_type->type~tem_stencilelement_type val

Inherited by

type~~tem_leveldesc_type~~InheritedByGraph type~tem_leveldesc_type tem_levelDesc_type type~tem_face_type tem_face_type type~tem_face_type->type~tem_leveldesc_type dimByDimDesc

Components

Type Visibility Attributes Name Initial
type(tem_element_type), public :: elem
type(dyn_longarray_type), public :: require

This list includes treeIDs for which additionally neighbors have to be identified constructed in tem_init_elemLevels used in routine: identify_additionalNeigh

type(tem_haloList_type), public :: haloList
integer(kind=long_k), public, allocatable :: total(:)

list of treeIDs for this level. Consists of ordered treeIDs of first fluid, then ghost, then halo elements. total: Array size: nElems ( = nElems_fluid+nElems_ghostFromCoarser + nElems_ghostFromFiner+nElems_halo )

Todo

to be replaced by growing array

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

Barycenter for all treeID in total list size: nElems in total, 3

integer, public, allocatable :: totalPnt(:)

pointer to elem%tID list set in routine: identify_lists used in tem_build_listHorizontalDep, assemble_lists Array size: nElems

Todo

to be replaced by growing array

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

list of property bits for this level. the same order as total list array size: nElems

Todo

to be replaced by growing array

integer, public, allocatable :: pntTID(:)

pointer from the levelDescriptor to the original treeID list ( only for fluids ) array size: nElems_fluid

Todo

to be replaced by growing array

type(tem_levelNeighbor_type), public, allocatable :: neigh(:)

neighbor relations for all fluid elements. Dimension: number of stencils We store the positions of the neighbor elements inside the total-list. If a fluid element does not have a neighbor in a direction (e.g. because of a boundary in that direction), we store the boundary ID as negative to indicate, that it is not a regular neighbor.

type(depSource_type), public, allocatable :: depFromFiner(:)

Dependencies for ghost elements To reconstruct all the data you should iterate over this list and reconstruct the ghost elements with source element information from these data types data. Up = to coarser, down = to finer array size: nElems_ghostFromFiner

type(depSource_type), public, allocatable :: depFromCoarser(:)

In treelm, only the parent is stored. If more sources are needed, it has to be extend in the solver. array size: nElems_ghostFromCoarser

type(dyn_intarray_type), public :: sourceFromFiner

Store all the source elements for the ghostFromFiner Their positions in total list on source level

type(dyn_intarray_type), public :: sourceFromCoarser

Store all the source elements that needed for all ghostFromCoarser

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

Buffer storing intermediate values of the source elements for the interpolation

Todo

move into solver?

real(kind=rk), public, allocatable :: intpBufFromCoarser(:,:)
type(grw_intarray_type), public, allocatable :: intpFromCoarser(:)

List to store interpolation from coarser ghost elements How to use: do indElem = 1, intpFromCoarser%nVals posInDepFromCoarser = intpFromCoarser%val( indElem ) posInTotal = depFromCoarser%elem%val( posInDepFromCoarser ) end do Size of intpFromCoarser depends on interpolation order which intern depends on available number of source elements

type(grw_intarray_type), public :: intpFromFiner

List to store interpolation from finer ghost elements

type(dyn_intarray_type), public :: bc_elemBuffer

pointing to the position of boundary elements in the levelDescriptor total list

integer, public :: offset(2,eT_minRelevant:eT_maxRelevant) = 0

Offsets in the assembled lists for fluid (1), ghostFromCoarser(2), ghostFromFiner(3) and halo(4) elements for the assembled lists, i.e the totalList, invSorted, ... gets the values (0, nElems_fluid, nElems_fluid+nElems_ghostCoarser, nElems_fluid+nElems_ghostCoarser+nELems_ghostFiner)

type(tem_communication_type), public :: sendBuffer

Local Fluids required by remote processes

type(tem_communication_type), public :: sendBufferFromCoarser

Local ghostFromCoarser required by remote processes

type(tem_communication_type), public :: sendBufferFromFiner

Local ghostFromFiner required by remote processes

type(tem_communication_type), public :: recvBuffer

My halos which are fluids on remote processes

type(tem_communication_type), public :: recvBufferFromCoarser

My halos which are ghostFromCoarser on remote processes

type(tem_communication_type), public :: recvBufferFromFiner

My halos which are ghostFromFiner on remote processes

integer, public :: nElems

total number of elements


Source Code

  type tem_levelDesc_type

    ! ---------new types for element description---------------------
    type(tem_element_type) :: elem
    !> This list includes treeIDs for which additionally
    !! neighbors have to be identified
    !! constructed in tem_init_elemLevels
    !! used in routine: identify_additionalNeigh
    type(dyn_longArray_type) :: require
    type(tem_haloList_type) :: haloList
    ! ---------------------------------------------------------------

    !> list of treeIDs for this level. Consists of ordered treeIDs of
    !! first fluid, then ghost, then halo elements.
    !! total:
    !! \[
    !! \newcommand\T{\Rule{0pt}{1em}{.3em}}
    !! \begin{array}{|c|c|c|c|}
    !! \hline fluid \T & ghostFromCoarser \T & ghostFromFiner \T & halo \\\hline
    !! \end{array}
    !! \]
    !! Array size: nElems ( =   nElems_fluid+nElems_ghostFromCoarser
    !!                        + nElems_ghostFromFiner+nElems_halo  )
    !! @todo: to be replaced by growing array
    integer(kind=long_k), allocatable :: total(:)

    !> Barycenter for all treeID in total list
    !! size: nElems in total, 3
    real(kind=rk), allocatable :: baryOfTotal(:,:)

    !> pointer to elem%tID list
    !! set in routine: identify_lists
    !! used in tem_build_listHorizontalDep, assemble_lists
    !! Array size: nElems
    !! @todo: to be replaced by growing array
    integer, allocatable :: totalPnt(:)

    !> list of property bits for this level. the same order as total list
    !! array size: nElems
    !! @todo: to be replaced by growing array
    integer(kind=long_k), allocatable :: property(:)

    !> pointer from the levelDescriptor to the original treeID list
    !! ( only for fluids )
    !! array size: nElems_fluid
    !! @todo: to be replaced by growing array
    integer, allocatable :: pntTID(:)

    !> neighbor relations for all fluid elements.
    !! Dimension: number of stencils
    !! We store the positions of the neighbor elements inside the total-list.
    !! If a fluid element does not have a neighbor in a direction
    !! (e.g. because of a boundary in that direction), we store the boundary ID
    !! as negative to indicate, that it is not a regular neighbor.
    type( tem_levelNeighbor_type ), allocatable :: neigh(:)

    !> Dependencies for ghost elements
    !! To reconstruct all the data you should
    !! iterate over this list and reconstruct the ghost elements
    !! with source element information from these data types
    !! data. Up = to coarser, down = to finer
    !! array size: nElems_ghostFromFiner
    type( depSource_type ), allocatable :: depFromFiner(:)
    !> In treelm, only the parent is stored.
    !! If more sources are needed, it has to be extend in the solver.
    !! array size: nElems_ghostFromCoarser
    type( depSource_type ), allocatable :: depFromCoarser(:)

    !> Store all the source elements for the ghostFromFiner
    !! Their positions in total list on source level
    type(dyn_intArray_type) :: sourceFromFiner
    !> Store all the source elements that needed for all ghostFromCoarser
    type(dyn_intArray_type) :: sourceFromCoarser

    !> Buffer storing intermediate values of the source elements for
    !! the interpolation
    !! @todo: move into solver?
    real(kind=rk), allocatable :: intpBufFromFiner(:,:)
    real(kind=rk), allocatable :: intpBufFromCoarser(:,:)

    !> List to store interpolation from coarser ghost elements
    !! How to use:
    !!  do indElem = 1, intpFromCoarser%nVals
    !!    posInDepFromCoarser = intpFromCoarser%val( indElem )
    !!    posInTotal = depFromCoarser%elem%val( posInDepFromCoarser )
    !!  end do
    !! Size of intpFromCoarser depends on interpolation order which intern
    !! depends on available number of source elements
    type(grw_intArray_type), allocatable :: intpFromCoarser(:)
    !> List to store interpolation from finer ghost elements
    type(grw_intArray_type) :: intpFromFiner

    !> pointing to the position of boundary elements
    !! in the levelDescriptor total list
    type(dyn_intArray_type) :: bc_elemBuffer

    !> Offsets in the assembled lists for
    !! fluid (1), ghostFromCoarser(2), ghostFromFiner(3) and halo(4) elements
    !! for the assembled lists, i.e the totalList, invSorted, ...
    !! gets the values (0, nElems_fluid,
    !!   nElems_fluid+nElems_ghostCoarser,
    !!   nElems_fluid+nElems_ghostCoarser+nELems_ghostFiner)
    integer :: offset( 2, eT_minRelevant:eT_maxRelevant ) = 0

    !> Local Fluids required by remote processes
    type( tem_communication_type ) :: sendBuffer
    !> Local ghostFromCoarser required by remote processes
    type( tem_communication_type ) :: sendBufferFromCoarser
    !> Local ghostFromFiner required by remote processes
    type( tem_communication_type ) :: sendBufferFromFiner
    !> My halos which are fluids on remote processes
    type( tem_communication_type ) :: recvBuffer
    !> My halos which are ghostFromCoarser on remote processes
    type( tem_communication_type ) :: recvBufferFromCoarser
    !> My halos which are ghostFromFiner on remote processes
    type( tem_communication_type ) :: recvBufferFromFiner

    !> total number of elements
    integer :: nElems

  end type tem_levelDesc_type