tem_originOfId Function

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

The following function provides the coordinates of the origin for a given ID in the complete mesh.

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_originofid~~CallsGraph proc~tem_originofid tem_originOfId proc~tem_coordofid tem_CoordOfId proc~tem_originofid->proc~tem_coordofid proc~tem_elemsizelevel tem_ElemSizeLevel proc~tem_originofid->proc~tem_elemsizelevel proc~tem_levelof tem_LevelOf proc~tem_coordofid->proc~tem_levelof

Called by

proc~~tem_originofid~~CalledByGraph proc~tem_originofid tem_originOfId proc~tem_converttreeidtocube tem_convertTreeIDtoCube proc~tem_converttreeidtocube->proc~tem_originofid proc~tem_unify_vrtx tem_unify_vrtx proc~tem_unify_vrtx->proc~tem_originofid proc~tem_cano_initsubtree tem_cano_initSubTree proc~tem_cano_initsubtree->proc~tem_converttreeidtocube proc~tem_calc_vrtx_coord tem_calc_vrtx_coord proc~tem_calc_vrtx_coord->proc~tem_unify_vrtx proc~tem_shape_subtreefromgeominters tem_shape_subTreeFromGeomInters proc~tem_shape_subtreefromgeominters->proc~tem_converttreeidtocube proc~tem_shape_subtreefromgeominters->proc~tem_cano_initsubtree proc~hvs_output_init hvs_output_init proc~hvs_output_init->proc~tem_calc_vrtx_coord proc~tem_shape2subtree tem_shape2subTree proc~tem_shape2subtree->proc~tem_shape_subtreefromgeominters proc~tem_init_tracker tem_init_tracker proc~tem_init_tracker->proc~hvs_output_init 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_originOfId(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), kind=rk)*dx

  end function tem_originOfId