tem_GetRealBoundingCube Function

private function tem_GetRealBoundingCube(tree) result(boundingCube)

Calculate the real bounding box around the fluid domain and return only to root (efficiency reasons)

Arguments

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

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


Calls

proc~~tem_getrealboundingcube~~CallsGraph proc~tem_getrealboundingcube tem_GetRealBoundingCube interface~tem_getlocalboundingcube tem_GetLocalBoundingCube proc~tem_getrealboundingcube->interface~tem_getlocalboundingcube mpi_reduce mpi_reduce proc~tem_getrealboundingcube->mpi_reduce proc~tem_getlocalboundingcube_fromsubtree tem_GetLocalBoundingCube_fromSubTree interface~tem_getlocalboundingcube->proc~tem_getlocalboundingcube_fromsubtree proc~tem_getlocalboundingcube_fromtree tem_GetLocalBoundingCube_fromTree interface~tem_getlocalboundingcube->proc~tem_getlocalboundingcube_fromtree proc~tem_vrtxcoordofid tem_vrtxCoordOfId proc~tem_getlocalboundingcube_fromsubtree->proc~tem_vrtxcoordofid proc~tem_getlocalboundingcube_fromtree->proc~tem_vrtxcoordofid proc~tem_baryofid tem_BaryOfId proc~tem_vrtxcoordofid->proc~tem_baryofid proc~tem_coordofid tem_CoordOfId proc~tem_vrtxcoordofid->proc~tem_coordofid

Called by

proc~~tem_getrealboundingcube~~CalledByGraph proc~tem_getrealboundingcube tem_GetRealBoundingCube proc~tem_seteffboundingbox_fromtree tem_setEffBoundingBox_fromTree proc~tem_seteffboundingbox_fromtree->proc~tem_getrealboundingcube interface~tem_seteffboundingbox tem_setEffBoundingBox interface~tem_seteffboundingbox->proc~tem_seteffboundingbox_fromtree proc~tem_create_subtree_of tem_create_subTree_of proc~tem_create_subtree_of->interface~tem_seteffboundingbox 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 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

Source Code

  function tem_GetRealBoundingCube( tree ) result( boundingCube )
    ! -------------------------------------------------------------------- !
    !>
    type(treelmesh_type), intent(in) :: tree
    !>
    real(kind=rk) :: boundingCube(3,2)
    ! -------------------------------------------------------------------- !
    real(kind=rk) :: tBounding(3)
    integer :: iErr
    ! -------------------------------------------------------------------- !
    ! Calculate process-local bounding cube
    boundingCube = tem_GetLocalBoundingCube( tree )
    ! Exchange with neighbors
    call mpi_reduce( boundingCube(:,1), tBounding, 3, rk_mpi, mpi_min, &
      &              0, tree%global%comm, iErr  )
    boundingCube(:,1) = tBounding
    call mpi_reduce( boundingCube(:,2), tBounding, 3, rk_mpi, mpi_max, &
      &              0, tree%global%comm, iErr  )
    boundingCube(:,2) = tBounding

  end function tem_GetRealBoundingCube