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
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 totallist. 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 
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}{cccc}
!! \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 totallist.
!! 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