tem_copyPropertyBitsFromTree Subroutine

private subroutine tem_copyPropertyBitsFromTree(inTree, subTree)

Copy the properties of inTree to the ones in subTree.

Arguments

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

tree to get information from

type(tem_subTree_type), intent(inout) :: subTree

tree to pass information to


Calls

proc~~tem_copypropertybitsfromtree~~CallsGraph proc~tem_copypropertybitsfromtree tem_copyPropertyBitsFromTree proc~gather_property gather_property proc~tem_copypropertybitsfromtree->proc~gather_property mpi_exscan mpi_exscan proc~gather_property->mpi_exscan

Called by

proc~~tem_copypropertybitsfromtree~~CalledByGraph proc~tem_copypropertybitsfromtree tem_copyPropertyBitsFromTree interface~tem_copypropertybits tem_copyPropertyBits interface~tem_copypropertybits->proc~tem_copypropertybitsfromtree proc~tem_create_subtree_of tem_create_subTree_of proc~tem_create_subtree_of->interface~tem_copypropertybits proc~tem_init_convergence tem_init_convergence proc~tem_init_convergence->proc~tem_create_subtree_of proc~tem_init_tracker_subtree tem_init_tracker_subTree proc~tem_init_tracker_subtree->proc~tem_create_subtree_of proc~tem_write_debugmesh tem_write_debugMesh proc~tem_write_debugmesh->proc~tem_create_subtree_of proc~tem_create_subtree_of_st_funlist tem_create_subTree_of_st_funList proc~tem_create_subtree_of_st_funlist->proc~tem_create_subtree_of

Contents


Source Code

  subroutine tem_copyPropertyBitsFromTree( inTree, subTree )
    ! ---------------------------------------------------------------------------
    !> tree to get information from
    type(treelmesh_type), intent(in) :: inTree
    !> tree to pass information to
    type(tem_subTree_type), intent(inout) :: subTree
    ! ---------------------------------------------------------------------------
    integer :: iElem
    integer :: elemPos
    integer :: iProp
    ! ---------------------------------------------------------------------------
    ! allocate the bitfield
    allocate(subTree%elemPropertyBits(subTree%nElems))

    ! initialize the bitfield with 0
    subTree%elemPropertyBits = 0

    do iElem = 1, subTree%nElems
      ! get the position in the global tree
      elemPos = subTree%map2global(iElem)
      ! copy the propertyBits in the subTree
      subTree%ElemPropertyBits(iElem) = inTree%ElemPropertyBits(elemPos)
    end do

    ! update the property information
    allocate(subTree%property(subTree%global%nProperties))

    do iProp=1,subTree%global%nProperties
      call gather_Property( Property = subTree%Property(iProp),                &
        &                   Header   = subTree%global%Property(iProp),         &
        &                   BitField = subTree%ElemPropertyBits,               &
        &                   comm     = subTree%global%comm )
    end do

  end subroutine tem_copyPropertyBitsFromTree