Stop unless every surface node, valid and x/y ghost, was gathered. The slab has no z ghosts, so the reduction runs over its own ghost vector.
42 Real znd_max = ReduceMax(znd_surf, znd_surf.nGrowVect(),
43 [=] AMREX_GPU_HOST_DEVICE (Box
const& bx, Array4<Real const>
const& a) ->
Real
45 Real m = std::numeric_limits<Real>::lowest();
46 amrex::Loop(bx, [&] (
int i,
int j,
int k) { m = amrex::max(m, a(i,j,k)); });
49 ParallelAllReduce::Max(znd_max, ParallelContext::CommunicatorSub());
53 "poisson_wall_dist: the surface nodes were not gathered onto every box");
constexpr amrex::Real bogus_large_value
Definition: ERF_Constants.H:19
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(axis >=0 &&axis< AMREX_SPACEDIM, "prob.axis must be 0, 1 or 2")
amrex::Real Real
Definition: ERF_ShocInterface.H:19