tem_PathOf Function

public elemental function tem_PathOf(TreeID) result(res)

This function returns the complete path through the tree from a given treeID to the root (all parents).

Arguments

Type IntentOptional Attributes Name
integer(kind=long_k), intent(in) :: TreeID

current treeID

Return Value type(tem_path_type)

resulting path


Called by

proc~~tem_pathof~~CalledByGraph proc~tem_pathof tem_PathOf proc~tem_find_allelements tem_find_allElements proc~tem_find_allelements->proc~tem_pathof proc~identify_additionalneigh identify_additionalNeigh proc~tem_find_allelements->proc~identify_additionalneigh proc~build_levelelements build_levelElements proc~tem_find_allelements->proc~build_levelelements proc~tem_findpath tem_findPath proc~tem_findpath->proc~tem_pathof proc~tem_findpath->proc~tem_findpath proc~add_ghostfromfiner add_ghostFromFiner proc~add_ghostfromfiner->proc~tem_pathof proc~add_ghostfromfiner->proc~add_ghostfromfiner proc~tem_init_surfdata tem_init_surfData proc~tem_init_surfdata->proc~tem_pathof proc~tem_posofid tem_PosOfId proc~tem_posofid->proc~tem_pathof proc~identify_local_element identify_local_element proc~identify_local_element->proc~tem_pathof proc~identify_local_element->proc~add_ghostfromfiner proc~identify_elements identify_elements proc~identify_elements->proc~tem_pathof proc~identify_elements->proc~identify_elements proc~single_process_element single_process_element proc~identify_elements->proc~single_process_element proc~identify_stencilneigh identify_stencilNeigh proc~identify_elements->proc~identify_stencilneigh proc~create_allparentneighbors create_allParentNeighbors proc~identify_elements->proc~create_allparentneighbors proc~tem_treeidcomparison tem_TreeIDComparison proc~tem_treeidcomparison->proc~tem_pathof proc~tem_create_leveldesc tem_create_levelDesc proc~tem_create_leveldesc->proc~tem_find_allelements proc~evaluate_add_spacetime_vectorbycoordinate evaluate_add_spacetime_vectorByCoordinate proc~evaluate_add_spacetime_vectorbycoordinate->proc~tem_posofid proc~tem_update_surfpos tem_update_surfPos proc~tem_update_surfpos->proc~tem_init_surfdata proc~evaluate_first_spacetime_scalarbycoordinate evaluate_first_spacetime_scalarByCoordinate proc~evaluate_first_spacetime_scalarbycoordinate->proc~tem_posofid proc~evaluate_add_spacetime_scalarbycoordinate evaluate_add_spacetime_scalarByCoordinate proc~evaluate_add_spacetime_scalarbycoordinate->proc~tem_posofid proc~setup_indices_spacetime setup_indices_spacetime proc~setup_indices_spacetime->proc~tem_posofid proc~tem_cano_initsubtree tem_cano_initSubTree proc~tem_cano_initsubtree->proc~tem_posofid proc~tem_cano_storepntsinsubtree tem_cano_storePntsInSubTree proc~tem_cano_storepntsinsubtree->proc~tem_posofid proc~tem_unify_vrtx tem_unify_vrtx proc~tem_unify_vrtx->proc~tem_posofid proc~single_process_element->proc~identify_local_element proc~identify_halo identify_halo proc~identify_halo->proc~identify_local_element proc~evaluate_first_spacetime_vectorbycoordinate evaluate_first_spacetime_vectorByCoordinate proc~evaluate_first_spacetime_vectorbycoordinate->proc~tem_posofid proc~tem_cano_checkneigh tem_cano_checkNeigh proc~tem_cano_checkneigh->proc~tem_posofid proc~tem_findelement tem_findElement proc~tem_findelement->proc~tem_posofid proc~tem_findelement->proc~tem_findelement proc~identify_stencilneigh->proc~identify_elements proc~create_allparentneighbors->proc~identify_elements proc~create_allparentneighbors->proc~identify_stencilneigh proc~identify_additionalneigh->proc~identify_elements proc~build_levelelements->proc~identify_elements proc~build_levelelements->proc~identify_additionalneigh proc~tem_dimbydim_construction tem_dimByDim_construction proc~tem_dimbydim_construction->proc~tem_create_leveldesc proc~tem_calc_vrtx_coord tem_calc_vrtx_coord proc~tem_calc_vrtx_coord->proc~tem_unify_vrtx proc~request_remotehalos request_remoteHalos proc~request_remotehalos->proc~identify_halo proc~request_remotehalos->proc~identify_stencilneigh proc~request_remotehalos->proc~create_allparentneighbors proc~tem_shape_subtreefromgeominters tem_shape_subTreeFromGeomInters proc~tem_shape_subtreefromgeominters->proc~tem_cano_initsubtree proc~tem_shape_subtreefromgeominters->proc~tem_cano_storepntsinsubtree proc~tem_shape_subtreefromgeominters->proc~tem_cano_checkneigh

Contents

Source Code


Source Code

  elemental function tem_PathOf( TreeID ) result(res)
    ! ---------------------------------------------------------------------------
    !> current treeID
    integer(kind=long_k), intent(in) :: TreeID
    !> resulting path
    type(tem_path_type) :: res
    ! ---------------------------------------------------------------------------

    res%level = 1
    res%Node(res%Level) = treeID
    do while (res%Node(res%Level) > 0)
      res%Level = res%Level + 1
      ! res%Node(res%Level) = (res%Node(res%Level-1)-1) / 8
      res%Node(res%Level) = ishft( (res%Node(res%Level-1)-1), -3 )
    end do
  end function tem_PathOf