tem_treeIDfrom_subTree Subroutine

public subroutine tem_treeIDfrom_subTree(me, glob_tree, treeID, bound)

This subroutine derives all treeIDs of a subTree from the corresponding global tree and stores them in treeID.

Arguments

Type IntentOptional Attributes Name
type(tem_subTree_type), intent(in) :: me

subTree of glob_tree

type(treelmesh_type), intent(in) :: glob_tree

corresponding global tree

integer(kind=long_k), intent(out), allocatable :: treeID(:)

complete treeID list

integer, intent(in) :: bound(2)

lower(1) and upper(2) bound of the element array


Called by

proc~~tem_treeidfrom_subtree~~CalledByGraph proc~tem_treeidfrom_subtree tem_treeIDfrom_subTree proc~tem_calc_vrtx_coord tem_calc_vrtx_coord proc~tem_calc_vrtx_coord->proc~tem_treeidfrom_subtree proc~tem_calc_vrtx_coord_noqval tem_calc_vrtx_coord_noqval proc~tem_calc_vrtx_coord->proc~tem_calc_vrtx_coord_noqval proc~tem_calc_vrtx_coord_noqval->proc~tem_treeidfrom_subtree proc~hvs_output_init hvs_output_init proc~hvs_output_init->proc~tem_calc_vrtx_coord proc~tem_init_tracker tem_init_tracker proc~tem_init_tracker->proc~hvs_output_init

Source Code

  subroutine tem_treeIDfrom_subTree( me, glob_tree, treeID, bound )
    ! ---------------------------------------------------------------------------
    !> subTree of glob_tree
    type(tem_subTree_type), intent(in) :: me
    !> corresponding global tree
    type(treelmesh_type), intent(in) :: glob_tree
    !> complete treeID list
    integer(kind=long_k), intent(out), allocatable :: treeID(:)
    !> lower(1) and upper(2) bound of the element array
    integer, intent(in) :: bound(2)
    ! ---------------------------------------------------------------------------

    ! allocate the array of treeIDs
    allocate( treeID( bound(2)-bound(1)+1 ))
    ! set the number of elements in the subTree
    if( me%useGlobalMesh)then
      treeID = glob_tree%treeID( bound(1) : bound(2) )
    else if( me%useLocalMesh)then
      treeID = me%treeID( bound(1) : bound(2) )
    else
      treeID = glob_tree%treeID( me%map2global( bound(1) : bound(2) ) )
    end if

  end subroutine tem_treeIDfrom_subTree