append_pointData Subroutine

private subroutine append_pointData(me, point, storePnt, offset_bit, storeOffsetBit, elemPos, tree, pos, wasAdded)

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

Arguments

Type IntentOptional 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, 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


Calls

proc~~append_pointdata~~CallsGraph proc~append_pointdata append_pointData proc~tem_idofcoord tem_IdOfCoord proc~append_pointdata->proc~tem_idofcoord interface~append~9 append proc~append_pointdata->interface~append~9 proc~tem_coordofreal tem_CoordOfReal proc~append_pointdata->proc~tem_coordofreal proc~append_da_label append_da_label interface~append~9->proc~append_da_label proc~append_da_veclabel append_da_veclabel interface~append~9->proc~append_da_veclabel interface~sortedposofval~5 sortedposofval proc~append_da_label->interface~sortedposofval~5 interface~expand~9 expand proc~append_da_label->interface~expand~9 proc~append_da_veclabel->interface~expand~9 proc~sortposofval_label sortposofval_label interface~sortedposofval~5->proc~sortposofval_label proc~expand_da_label expand_da_label interface~expand~9->proc~expand_da_label

Called by

proc~~append_pointdata~~CalledByGraph proc~append_pointdata append_pointData interface~append~43 append interface~append~43->proc~append_pointdata

Contents

Source Code


Source Code

  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