Compute global minima of iw variables over the leaves of the grid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| double precision, | intent(out) | :: | wmin(nw) |
The global maxima |
subroutine get_global_minima(wmin) use mod_global_parameters double precision, intent(out) :: wmin(nw) !< The global maxima integer :: iigrid, igrid, iw double precision :: wmin_mype(nw),wmin_recv(nw) wmin_mype(1:nw) = bigdouble ! Loop over all the grids do iigrid = 1, igridstail igrid = igrids(iigrid) do iw = 1, nw wmin_mype(iw)=min(wmin_mype(iw),minval(ps(igrid)%w(ixMlo1:ixMhi1,& ixMlo2:ixMhi2,ixMlo3:ixMhi3,iw))) end do end do ! Make the information available on all tasks call MPI_ALLREDUCE(wmin_mype, wmin_recv, nw, MPI_DOUBLE_PRECISION, MPI_MIN,& icomm, ierrmpi) wmin(1:nw)=wmin_recv(1:nw) end subroutine get_global_minima