8 #ifndef IC_DOUBLENOTCH_H_
9 #define IC_DOUBLENOTCH_H_
27 void Add(
const int lev, amrex::Vector<amrex::MultiFab * > &a_field)
30 amrex::IndexType type = a_field[lev]->ixType();
31 for (amrex::MFIter mfi(*a_field[lev],amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi)
33 amrex::Box bx = mfi.tilebox();
34 bx.grow(a_field[lev]->nGrow());
35 amrex::Array4<Set::Scalar>
const& field = a_field[lev]->array(mfi);
36 amrex::ParallelFor (bx,[=] AMREX_GPU_DEVICE(
int i,
int j,
int k) {
40 if (type == amrex::IndexType::TheNodeType())
42 AMREX_D_TERM(x(0) =
geom[lev].ProbLo()[0] + ((amrex::Real)(i)) *
geom[lev].CellSize()[0];,
43 x(1) =
geom[lev].ProbLo()[1] + ((amrex::Real)(j)) *
geom[lev].CellSize()[1];,
44 x(2) =
geom[lev].ProbLo()[2] + ((amrex::Real)(k)) *
geom[lev].CellSize()[2];);
46 else if (type == amrex::IndexType::TheCellType())
48 AMREX_D_TERM(x(0) =
geom[lev].ProbLo()[0] + ((amrex::Real)(i) + 0.5) *
geom[lev].CellSize()[0];,
49 x(1) =
geom[lev].ProbLo()[1] + ((amrex::Real)(j) + 0.5) *
geom[lev].CellSize()[1];,
50 x(2) =
geom[lev].ProbLo()[2] + ((amrex::Real)(k) + 0.5) *
geom[lev].CellSize()[2];);
59 a_field[lev]->FillBoundary();