48 amrex::Box domain =
geom[lev].Domain();
50 amrex::IndexType type = a_field[lev]->ixType();
58 for (amrex::MFIter mfi(*a_field[lev], amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi)
61 if (type == amrex::IndexType::TheNodeType()) bx = mfi.grownnodaltilebox();
62 if (type == amrex::IndexType::TheCellType()) bx = mfi.growntilebox();
65 amrex::Array4<Set::Scalar>
const& field = a_field[lev]->array(mfi);
66 amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE(
int i,
int j,
int k)
70 if (type == amrex::IndexType::TheNodeType())
72 x(0) = domlo(0) + ((amrex::Real)(i)) *
geom[lev].CellSize()[0];
73 x(1) = domlo(1) + ((amrex::Real)(j)) *
geom[lev].CellSize()[1];
75 else if (type == amrex::IndexType::TheCellType())
77 x(0) = domlo(0) + ((amrex::Real)(i)+0.5) *
geom[lev].CellSize()[0];
78 x(1) = domlo(1) + ((amrex::Real)(j)+0.5) *
geom[lev].CellSize()[1];
82 std::array<Set::Scalar, 4> val =
png(x);
87 if (field.nComp() > 1) field(i, j, k, 1) = 1.0 - field(i, j, k, 0);
91 a_field[lev]->FillBoundary();