tem_vrtxCoordOfId Function

public pure function tem_vrtxCoordOfId(tree, treeID) result(coord)

Calculate all eight vertex coordinates of a given tree ID

the numbering of the vertices is according to [tem_param_module:childPosition]

Arguments

Type IntentOptional Attributes Name
type(treelmesh_type), intent(in) :: tree

complete tree for info about dimensions

integer(kind=long_k), intent(in) :: treeID

input element ID

Return Value real(kind=rk), (3,8)

all vertices coordinates function return value


Calls

proc~~tem_vrtxcoordofid~~CallsGraph proc~tem_vrtxcoordofid tem_vrtxCoordOfId proc~tem_baryofid tem_BaryOfId proc~tem_vrtxcoordofid->proc~tem_baryofid proc~tem_coordofid tem_CoordOfId proc~tem_vrtxcoordofid->proc~tem_coordofid proc~tem_baryofid->proc~tem_coordofid proc~tem_elemsizelevel tem_ElemSizeLevel proc~tem_baryofid->proc~tem_elemsizelevel proc~tem_levelof tem_LevelOf proc~tem_coordofid->proc~tem_levelof

Called by

proc~~tem_vrtxcoordofid~~CalledByGraph proc~tem_vrtxcoordofid tem_vrtxCoordOfId proc~tem_getlocalboundingcube_fromsubtree tem_GetLocalBoundingCube_fromSubTree proc~tem_getlocalboundingcube_fromsubtree->proc~tem_vrtxcoordofid proc~tem_getlocalboundingcube_fromtree tem_GetLocalBoundingCube_fromTree proc~tem_getlocalboundingcube_fromtree->proc~tem_vrtxcoordofid interface~tem_getlocalboundingcube tem_GetLocalBoundingCube interface~tem_getlocalboundingcube->proc~tem_getlocalboundingcube_fromsubtree interface~tem_getlocalboundingcube->proc~tem_getlocalboundingcube_fromtree proc~tem_getrealboundingcube tem_GetRealBoundingCube proc~tem_getrealboundingcube->interface~tem_getlocalboundingcube proc~tem_seteffboundingbox_fromsubtree tem_setEffBoundingBox_fromSubTree proc~tem_seteffboundingbox_fromsubtree->interface~tem_getlocalboundingcube interface~tem_seteffboundingbox tem_setEffBoundingBox interface~tem_seteffboundingbox->proc~tem_seteffboundingbox_fromsubtree proc~tem_seteffboundingbox_fromtree tem_setEffBoundingBox_fromTree proc~tem_seteffboundingbox_fromtree->proc~tem_getrealboundingcube

Source Code

  pure function tem_vrtxCoordOfId( tree, treeID) result(coord)
    ! -------------------------------------------------------------------- !
    !> complete tree for info about dimensions
    type(treelmesh_type), intent(in) :: tree
    !> input element ID
    integer(kind=long_k), intent(in) :: treeID
    !> all vertices coordinates function return value
    real(kind=rk) :: coord(3,8)
    ! -------------------------------------------------------------------- !
    real(kind=rk) :: elemBary(3) !< barycenter of current element
    real(kind=rk) :: length  !< element size
    integer :: x(4), iCoord, iVrtx
    ! -------------------------------------------------------------------- !

    x = tem_coordOfId( treeID )
    ! Get element size
    length = tree%global%BoundingCubeLength / real( 2**x(4), kind=rk)

    ! Get Barycenter
    elemBary = tem_BaryOfId( tree, treeID )

    ! ... and calculate from there the vertex coordinates
    do iVrtx = 1, 8
      do iCoord = 1, 3
        coord( iCoord, iVrtx ) = elemBary( iCoord )                         &
          &                    + length*0.5_rk*childPosition( iVrtx, iCoord )
      enddo
    end do

  end function tem_vrtxCoordOfId