@@ -37,23 +37,24 @@ int main (int argc, char* argv[])
37
37
int verbose = 1 ;
38
38
int n_cell = 128 ;
39
39
int max_grid_size = 32 ;
40
-
40
+ amrex::Vector< int > n_cell_2d;
41
41
// read parameters
42
42
{
43
43
ParmParse pp;
44
44
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);
46
47
pp.query (" max_grid_size" , max_grid_size);
47
48
}
48
49
49
50
Geometry geom;
50
51
BoxArray grids;
51
52
DistributionMapping dmap;
52
53
{
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 )});
54
55
Array<int ,AMREX_SPACEDIM> is_periodic{AMREX_D_DECL (1 ,1 ,1 )};
55
56
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 )});
57
58
geom.define (domain, rb, CoordSys::cartesian, is_periodic);
58
59
59
60
grids.define (domain); // define the BoxArray to be a single grid
@@ -69,13 +70,10 @@ int main (int argc, char* argv[])
69
70
std::string geom_type;
70
71
pp.get (" geom_type" , geom_type);
71
72
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 );
79
77
auto twoboxes = EB2::makeUnion (box1,box2);
80
78
auto gshop = EB2::makeShop (twoboxes);
81
79
EB2::Build (gshop, geom, required_coarsening_level, max_coarsening_level);
@@ -101,7 +99,7 @@ int main (int argc, char* argv[])
101
99
MultiFab q (nba, dmap, 1 , 0 , MFInfo (), factory);
102
100
MultiFab phi (nba, dmap, 1 , 0 , MFInfo (), factory);
103
101
104
- InitData (q);
102
+ InitData (q, n_cell_2d[ 0 ]/ 2 , n_cell_2d[ 1 ]/ 2 );
105
103
106
104
LPInfo info;
107
105
0 commit comments