54 amrex::Box domain =
geom[lev].Domain();
56 amrex::IndexType type = a_field[lev]->ixType();
64 for (amrex::MFIter mfi(*a_field[lev], amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi)
67 if (type == amrex::IndexType::TheNodeType()) bx = mfi.grownnodaltilebox();
68 if (type == amrex::IndexType::TheCellType()) bx = mfi.growntilebox();
71 amrex::Array4<Set::Scalar>
const& field = a_field[lev]->array(mfi);
72 amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
76 if (type == amrex::IndexType::TheNodeType())
78 x(0) = domlo(0) + ((amrex::Real)(i)) *
geom[lev].CellSize()[0];
79 x(1) = domlo(1) + ((amrex::Real)(j)) *
geom[lev].CellSize()[1];
81 else if (type == amrex::IndexType::TheCellType())
83 x(0) = domlo(0) + ((amrex::Real)(i)+0.5) *
geom[lev].CellSize()[0];
84 x(1) = domlo(1) + ((amrex::Real)(j)+0.5) *
geom[lev].CellSize()[1];
88 std::array<Set::Scalar, 4> val =
png(x);
92 if (field.nComp() > 1) field(i, j, k, 1) = 1.0 - field(i, j, k, 0);
96 a_field[lev]->FillBoundary();