tem_endOfId Function

public pure function tem_endOfId(tree, TreeID) result(origin)

The following function provides the coordinates of the end for a given ID in the complete mesh. The described element lies between the origin and this end point.

The end point of the element with a given ID coincides with the origin of treeID with a coordinate shift of +1 in each dimension.

Arguments

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

mesh information

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

input element ID

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

origin return value


Calls

proc~~tem_endofid~~CallsGraph proc~tem_endofid tem_endOfId proc~tem_coordofid tem_CoordOfId proc~tem_endofid->proc~tem_coordofid proc~tem_elemsizelevel tem_ElemSizeLevel proc~tem_endofid->proc~tem_elemsizelevel proc~tem_levelof tem_LevelOf proc~tem_coordofid->proc~tem_levelof

Called by

proc~~tem_endofid~~CalledByGraph proc~tem_endofid tem_endOfId proc~tem_converttreeidtocube tem_convertTreeIDtoCube proc~tem_converttreeidtocube->proc~tem_endofid proc~tem_cano_initsubtree tem_cano_initSubTree proc~tem_cano_initsubtree->proc~tem_converttreeidtocube proc~tem_shape_subtreefromgeominters tem_shape_subTreeFromGeomInters proc~tem_shape_subtreefromgeominters->proc~tem_converttreeidtocube proc~tem_shape_subtreefromgeominters->proc~tem_cano_initsubtree proc~tem_shape2subtree tem_shape2subTree proc~tem_shape2subtree->proc~tem_shape_subtreefromgeominters proc~tem_create_subtree_of tem_create_subTree_of proc~tem_create_subtree_of->proc~tem_shape2subtree

Contents

Source Code


Source Code

  pure function tem_endOfId(tree,TreeID) result(origin)
    ! -------------------------------------------------------------------- !
    !> mesh information
    type(treelmesh_type), intent(in) :: tree
    !> input element ID
    integer(kind=long_k), intent(in) :: TreeID
    !> origin return value
    real(kind=rk) :: origin(3)
    ! -------------------------------------------------------------------- !
    integer       :: coord(4) !< spatial index triple for a given ID
    real(kind=rk) :: dx !< size of Element
    ! -------------------------------------------------------------------- !
    coord = tem_CoordOfId( TreeID )
    dx = tem_elemSizeLevel( tree, coord(4) )
    origin = tree%global%origin + real(coord(:3)+1, kind=rk)*dx

  end function tem_endOfId