Create the level-wise total lists.
They consist of fluid elements + ghost elements + halo elements and are sorted by the treeIDs Also create the property lists
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_levelDesc_type), | intent(inout) | :: | me(minlevel:maxLevel) |
Level descriptor to fill |
||
integer, | intent(in) | :: | minlevel |
Minimal level in the mesh |
||
integer, | intent(in) | :: | maxLevel |
Minimal level in the mesh |
||
type(treelmesh_type), | intent(in) | :: | tree |
tree information |
subroutine assemble_lists( me, minLevel, maxLevel, tree ) ! --------------------------------------------------------------------------- !> Minimal level in the mesh integer, intent(in) :: minlevel, maxLevel !> Level descriptor to fill type( tem_levelDesc_type ), intent(inout) :: me(minlevel:maxLevel) !> tree information type(treelmesh_type), intent(in) :: tree ! --------------------------------------------------------------------------- integer :: iLevel, iIndex integer(kind=long_k) :: tID ! --------------------------------------------------------------------------- write(logUnit(5),*) 'Assembling total list ...' do iLevel = minlevel, ubound(me,1) allocate( me( iLevel )%total( me( iLevel )%nElems )) allocate( me( iLevel )%baryOfTotal( me(iLevel)%nElems, 3 ) ) allocate( me( iLevel )%property(me( iLevel )%nElems )) allocate( me( iLevel )%pntTID( me( iLevel )%elem%nElems( eT_fluid ))) write(logUnit(5),"(A,I0)") ' Level: ', iLevel write(logUnit(5),"(A,I0)") ' nElems: ', me(iLevel)%nElems call print_nElems( me(iLevel)%elem%nElems(eT_minRelevant:eT_maxRelevant),& & logUnit(5) ) ! Counter across all lists do iIndex = 1, me( iLevel )%nElems tID = me( iLevel )%elem%tID%val( me( iLevel )%totalPnt(iIndex) ) ! sorted treeID list me( iLevel )%total( iIndex ) = tID ! barycenter of treeID in total list me( iLevel )%baryOfTotal( iIndex, : ) = tem_BaryOfID( tree, tID ) ! property me( iLevel )%property( iIndex ) = & & me( iLevel )%elem%property%val( me( iLevel )%totalPnt(iIndex)) end do do iIndex = 1, me( iLevel )%elem%nElems( eT_fluid ) ! pointer to original tree%treeID list me( iLevel)%pntTID( iIndex ) = & & me( iLevel )%elem%pntTID%val( me( iLevel )%totalPnt( iIndex )) end do call destroy( me( iLevel )%elem%pntTID ) end do ! iLevel end subroutine assemble_lists