24 ParmParse pp_box(
"eb.box");
28 Vector<Real> boxLo(AMREX_SPACEDIM), boxHi(AMREX_SPACEDIM);
30 Real
const* dx = a_geom.CellSize();
32 if ( !almostEqual(dx[0],dx[1]) || !almostEqual(dx[1],dx[2])) {
33 amrex::Error(
" EB Error: Mesh spacing must be uniform!.\n");
38 for (
int i = 0; i < AMREX_SPACEDIM; i++) {
39 boxLo[i] = a_geom.ProbLo(i);
40 boxHi[i] = a_geom.ProbHi(i);
43 pp_box.queryarr(
"lo", boxLo, 0, AMREX_SPACEDIM);
44 pp_box.queryarr(
"hi", boxHi, 0, AMREX_SPACEDIM);
46 pp_box.query(
"internal_flow", inside);
47 pp_box.query(
"offset",
offset);
49 Real xlo = boxLo[0] +
offset;
50 Real xhi = boxHi[0] -
offset;
54 if (a_geom.isPeriodic(0))
56 xlo = 2.0*a_geom.ProbLo(0) - a_geom.ProbHi(0);
57 xhi = 2.0*a_geom.ProbHi(0) - a_geom.ProbLo(0);
61 Real ylo = boxLo[1] +
offset;
62 Real yhi = boxHi[1] -
offset;
66 if (a_geom.isPeriodic(1))
68 ylo = 2.0*a_geom.ProbLo(1) - a_geom.ProbHi(1);
69 yhi = 2.0*a_geom.ProbHi(1) - a_geom.ProbLo(1);
72 Real zlo = boxLo[2] +
offset;
73 Real zhi = boxHi[2] -
offset;
77 if (a_geom.isPeriodic(2))
79 zlo = 2.0*a_geom.ProbLo(2) - a_geom.ProbHi(2);
80 zhi = 2.0*a_geom.ProbHi(2) - a_geom.ProbLo(2);
83 Array<Real,3> point_lox{ xlo, 0.0, 0.0};
84 Array<Real,3> normal_lox{-1.0, 0.0, 0.0};
85 Array<Real,3> point_hix{ xhi, 0.0, 0.0};
86 Array<Real,3> normal_hix{ 1.0, 0.0, 0.0};
88 Array<Real,3> point_loy{0.0, ylo, 0.0};
89 Array<Real,3> normal_loy{0.0,-1.0, 0.0};
90 Array<Real,3> point_hiy{0.0, yhi, 0.0};
91 Array<Real,3> normal_hiy{0.0, 1.0, 0.0};
93 Array<Real,3> point_loz{0.0, 0.0, zlo};
94 Array<Real,3> normal_loz{0.0, 0.0,-1.0};
95 Array<Real,3> point_hiz{0.0, 0.0, zhi};
96 Array<Real,3> normal_hiz{0.0, 0.0, 1.0};
98 EB2::PlaneIF plane_lox(point_lox,normal_lox);
99 EB2::PlaneIF plane_hix(point_hix,normal_hix);
101 EB2::PlaneIF plane_loy(point_loy,normal_loy);
102 EB2::PlaneIF plane_hiy(point_hiy,normal_hiy);
104 EB2::PlaneIF plane_loz(point_loz,normal_loz);
105 EB2::PlaneIF plane_hiz(point_hiz,normal_hiz);
107 auto box = EB2::makeUnion(plane_lox, plane_hix, plane_loy,
108 plane_hiy, plane_loz, plane_hiz );
113 auto gshop = EB2::makeShop(box);
118 auto xob = EB2::makeComplement(box);
119 auto gshop = EB2::makeShop(xob);
AMREX_FORCE_INLINE IntVect offset(const int face_dir, const int normal)
Definition: ERF_ReadBndryPlanes.cpp:28