Calculate the real bounding box around the fluid domain and return only to root (efficiency reasons)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | tree |
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