Routine to append point Datas like points, offset_bit and elemPos Append point datas only if treeID of a point in max level is newly added
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_pointData_type), | intent(inout) | :: | me |
Point data type to be filled |
||
real(kind=rk), | intent(in) | :: | point(1:3) |
space coordinate to append |
||
logical, | intent(in) | :: | storePnt |
logical to store point into me%grwPnt |
||
character(len=1), | intent(in) | :: | offset_bit |
offset bit to append |
||
logical, | intent(in) | :: | storeOffsetBit |
logical to store offset bit into me%offset_bit |
||
integer, | intent(in) | :: | elemPos |
Position of element which contains given point in global tree%treeID |
||
type(treelmesh_type), | intent(in) | :: | tree |
global tree |
||
integer, | intent(out) | :: | pos |
return position of treeID of a point in maxLevel in me%treeID |
||
logical, | intent(out) | :: | wasAdded |
If point is new and added to pointData |
subroutine append_pointData(me, point, storePnt, offset_bit, storeOffsetBit, & & elemPos, tree, pos, wasAdded ) !--------------------------------------------------------------------------- !> Point data type to be filled type(tem_pointData_type), intent(inout) :: me !> space coordinate to append real(kind=rk), intent(in) :: point(1:3) !> logical to store point into me%grwPnt logical, intent(in) :: storePnt !> offset bit to append character, intent(in) :: offset_bit !> logical to store offset bit into me%offset_bit logical, intent(in) :: storeOffsetBit !> Position of element which contains given point in global tree%treeID integer, intent(in) :: elemPos !> global tree type(treelmesh_type), intent(in) :: tree !> return position of treeID of a point in maxLevel in me%treeID integer, intent(out) :: pos !> If point is new and added to pointData logical, intent(out) :: wasAdded !--------------------------------------------------------------------------- integer(kind=long_k) :: treeID !--------------------------------------------------------------------------- treeID = tem_IdOfCoord( & & tem_CoordOfReal(tree, point) ) call append(me = me%treeID, & & val = treeID, & & pos = pos, & & wasAdded = wasAdded ) if (wasAdded) then if (storePnt) then call append(me = me%grwPnt, & & val = point(1:3) ) end if !storePnt if (storeOffsetBit) then call append(me = me%offset_bit, & & val = offset_bit ) end if !storeOffsetBit call append( me = me%elemPos, & & val = elemPos ) ! number of points in pointdata me%nPnts = me%treeID%nVals end if ! new point end subroutine append_pointData