26 Sphere(amrex::Vector<amrex::Geometry>& _geom):
IC(_geom) {}
39 Define(_radius, _center, _type, _alpha_in, _alpha_out);
57 bool cellcentered = (a_field[0]->boxArray().ixType() == amrex::IndexType(amrex::IntVect::TheCellVector()));
58 int ncomp = a_field[0]->nComp();
60 for (amrex::MFIter mfi(*a_field[lev], amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi)
62 amrex::Box bx = mfi.tilebox();
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)
72 AMREX_D_TERM(x =
geom[lev].ProbLo()[0] + ((amrex::Real)(i)+0.5) *
geom[lev].CellSize()[0];,
73 y =
geom[lev].ProbLo()[1] + ((amrex::Real)(j)+0.5) *
geom[lev].CellSize()[1];,
74 z =
geom[lev].ProbLo()[2] + ((amrex::Real)(k)+0.5) *
geom[lev].CellSize()[2];);
78 AMREX_D_TERM(x =
geom[lev].ProbLo()[0] + (amrex::Real)(i)*
geom[lev].CellSize()[0];,
79 y =
geom[lev].ProbLo()[1] + (amrex::Real)(j)*
geom[lev].CellSize()[1];,
80 z =
geom[lev].ProbLo()[2] + (amrex::Real)(k)*
geom[lev].CellSize()[2];);
85 if (
type == Type::XYZ)
93 else if (
type == Type::XY)
101 else if (
type == Type::YZ)
109 else if (
type == Type::ZX)
121 if (ncomp > 1) field(i, j, k, 1) = 0.;
126 if (ncomp > 1) field(i, j, k, 1) = 1;
142 value.
type = Type::YZ;
144 value.
type = Type::ZX;
146 value.
type = Type::XY;
148 value.
type = Type::XYZ;