|
4 | 4 | #include <AMReX_EBMultiFabUtil.H>
|
5 | 5 | #include <AMReX_EB2.H>
|
6 | 6 | #include <AMReX_EB2_IF.H>
|
| 7 | + |
| 8 | + |
| 9 | +#include <AMReX_EB2_IF_Union.H> |
| 10 | +#include <AMReX_EB2_IF_Intersection.H> |
| 11 | +#include <AMReX_EB2_IF_Complement.H> |
| 12 | +#include <AMReX_EB2_IF_Scale.H> |
| 13 | +#include <AMReX_EB2_IF_Translation.H> |
| 14 | +#include <AMReX_EB2_IF_Lathe.H> |
| 15 | +#include <AMReX_EB2_IF_Box.H> |
| 16 | +#include <AMReX_EB2_IF_Cylinder.H> |
| 17 | +#include <AMReX_EB2_IF_Ellipsoid.H> |
| 18 | +#include <AMReX_EB2_IF_Sphere.H> |
| 19 | +#include <AMReX_EB2_IF_Plane.H> |
| 20 | + |
| 21 | +#include <AMReX_ParmParse.H> |
7 | 22 | #include <AMReX_MLEBABecLap.H>
|
8 | 23 | #include <AMReX_MLEBNodeFDLaplacian.H>
|
9 | 24 | #include <AMReX_PlotFileUtil.H>
|
@@ -50,7 +65,23 @@ int main (int argc, char* argv[])
|
50 | 65 | int required_coarsening_level = 0; // typically the same as the max AMR level index
|
51 | 66 | int max_coarsening_level = 100; // typically a huge number so MG coarsens as much as possible
|
52 | 67 | // build a simple geometry using the "eb2." parameters in the inputs file
|
53 |
| - EB2::Build(geom, required_coarsening_level, max_coarsening_level); |
| 68 | + ParmParse pp("eb2"); |
| 69 | + std::string geom_type; |
| 70 | + pp.get("geom_type", geom_type); |
| 71 | + if (geom_type == "merge") { |
| 72 | + EB2::SphereIF sphere1(0.25,{AMREX_D_DECL(0.5,0.5,0.5)},true); |
| 73 | + EB2::SphereIF sphere2(0.1,{AMREX_D_DECL(0.5,0.5,0.5)},true); |
| 74 | + auto twospheres = EB2::makeUnion(sphere1,sphere2); |
| 75 | + EB2::BoxIF box1({AMREX_D_DECL(0.25,0.0,0)}, |
| 76 | + {AMREX_D_DECL(0.75, 0.25,0)},false); |
| 77 | + EB2::BoxIF box2({AMREX_D_DECL(0.25,0.75,0)}, |
| 78 | + {AMREX_D_DECL(0.75,1. ,0)},false); |
| 79 | + auto twoboxes = EB2::makeUnion(box1,box2); |
| 80 | + auto gshop = EB2::makeShop(twoboxes); |
| 81 | + EB2::Build(gshop, geom, required_coarsening_level, max_coarsening_level); |
| 82 | + } else { |
| 83 | + EB2::Build(geom, required_coarsening_level, max_coarsening_level); |
| 84 | + } |
54 | 85 |
|
55 | 86 | const EB2::IndexSpace& eb_is = EB2::IndexSpace::top();
|
56 | 87 | const EB2::Level& eb_level = eb_is.getLevel(geom);
|
|
0 commit comments