@@ -37,23 +37,24 @@ int main (int argc, char* argv[])
3737 int verbose = 1 ;
3838 int n_cell = 128 ;
3939 int max_grid_size = 32 ;
40-
40+ amrex::Vector< int > n_cell_2d;
4141 // read parameters
4242 {
4343 ParmParse pp;
4444 pp.query (" verbose" , verbose);
45- pp.query (" n_cell" , n_cell);
45+ // pp.query("n_cell", n_cell);
46+ pp.queryarr (" n_cell" , n_cell_2d);
4647 pp.query (" max_grid_size" , max_grid_size);
4748 }
4849
4950 Geometry geom;
5051 BoxArray grids;
5152 DistributionMapping dmap;
5253 {
53- RealBox rb ({AMREX_D_DECL (0 ., 0 ., 0 . )}, {AMREX_D_DECL (1 ., 1 ., 1 . )});
54+ RealBox rb ({AMREX_D_DECL (-. 1035 ,- 0.0527 ,- 0.0527 )}, {AMREX_D_DECL (0.1035 , 0.0527 , 0.0527 )});
5455 Array<int ,AMREX_SPACEDIM> is_periodic{AMREX_D_DECL (1 ,1 ,1 )};
5556 Box domain (IntVect{AMREX_D_DECL (0 ,0 ,0 )},
56- IntVect{AMREX_D_DECL (n_cell -1 ,n_cell- 1 ,n_cell- 1 )});
57+ IntVect{AMREX_D_DECL (n_cell_2d[ 0 ] -1 ,n_cell_2d[ 1 ]- 1 , 0 )});
5758 geom.define (domain, rb, CoordSys::cartesian, is_periodic);
5859
5960 grids.define (domain); // define the BoxArray to be a single grid
@@ -69,13 +70,10 @@ int main (int argc, char* argv[])
6970 std::string geom_type;
7071 pp.get (" geom_type" , geom_type);
7172 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 );
73+ EB2::BoxIF box1 ({AMREX_D_DECL (-0.052 ,-0.0527 ,0 )},
74+ {AMREX_D_DECL (0.052 , -0.0128 ,0 )},false );
75+ EB2::BoxIF box2 ({AMREX_D_DECL (-0.052 ,0.0128 ,0 )},
76+ {AMREX_D_DECL (0.052 ,0.0527 ,0 )},false );
7977 auto twoboxes = EB2::makeUnion (box1,box2);
8078 auto gshop = EB2::makeShop (twoboxes);
8179 EB2::Build (gshop, geom, required_coarsening_level, max_coarsening_level);
@@ -101,7 +99,7 @@ int main (int argc, char* argv[])
10199 MultiFab q (nba, dmap, 1 , 0 , MFInfo (), factory);
102100 MultiFab phi (nba, dmap, 1 , 0 , MFInfo (), factory);
103101
104- InitData (q);
102+ InitData (q, n_cell_2d[ 0 ]/ 2 , n_cell_2d[ 1 ]/ 2 );
105103
106104 LPInfo info;
107105
0 commit comments