Skip to content

Commit

Permalink
Increase ghost cells for the level mask (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf authored Sep 12, 2023
1 parent 21e4a4b commit 1d47741
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 20 deletions.
20 changes: 20 additions & 0 deletions Source/Constants.H
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,30 @@ very_small_num()
{
return std::numeric_limits<amrex::Real>::epsilon() * 1e-100;
}

AMREX_GPU_HOST_DEVICE constexpr int
level_mask_interior()
{
return 0;
}

AMREX_GPU_HOST_DEVICE constexpr int
level_mask_covered()
{
return 1;
}

AMREX_GPU_HOST_DEVICE constexpr int
level_mask_notcovered()
{
return 2;
}

AMREX_GPU_HOST_DEVICE constexpr int
level_mask_physbnd()
{
return 3;
}

} // namespace constants
#endif
5 changes: 0 additions & 5 deletions Source/Params/_cpp_parameters
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@

@namespace: pelec PeleC static

levmsk_interior int 0
levmsk_covered int 1
levmsk_notcovered int 2
levmsk_physbnd int 3

#-----------------------------------------------------------------------------
# category: AMR
#-----------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions Source/Params/param_includes/pelec_defaults.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
// or add runtime parameters, please edit _cpp_parameters and then run
// mk_params.sh

int PeleC::levmsk_interior = 0;
int PeleC::levmsk_covered = 1;
int PeleC::levmsk_notcovered = 2;
int PeleC::levmsk_physbnd = 3;
int PeleC::state_interp_order = 1;
int PeleC::lin_limit_state_interp = 1;
int PeleC::state_nghost = 0;
Expand Down
4 changes: 0 additions & 4 deletions Source/Params/param_includes/pelec_params.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
// or add runtime parameters, please edit _cpp_parameters and then run
// mk_params.sh

static int levmsk_interior;
static int levmsk_covered;
static int levmsk_notcovered;
static int levmsk_physbnd;
static int state_interp_order;
static int lin_limit_state_interp;
static int state_nghost;
Expand Down
4 changes: 0 additions & 4 deletions Source/Params/param_includes/pelec_queries.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
// or add runtime parameters, please edit _cpp_parameters and then run
// mk_params.sh

pp.query("levmsk_interior", levmsk_interior);
pp.query("levmsk_covered", levmsk_covered);
pp.query("levmsk_notcovered", levmsk_notcovered);
pp.query("levmsk_physbnd", levmsk_physbnd);
pp.query("state_interp_order", state_interp_order);
pp.query("lin_limit_state_interp", lin_limit_state_interp);
pp.query("state_nghost", state_nghost);
Expand Down
7 changes: 4 additions & 3 deletions Source/PeleC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,10 +623,11 @@ PeleC::buildMetrics()
amrex::MultiFab::Copy(vfrac, ebfactory.getVolFrac(), 0, 0, 1, numGrow());

level_mask.clear();
level_mask.define(grids, dmap, 1, 1);
level_mask.define(grids, dmap, 1, 3);
level_mask.BuildMask(
geom.Domain(), geom.periodicity(), levmsk_covered, levmsk_notcovered,
levmsk_physbnd, levmsk_interior);
geom.Domain(), geom.periodicity(), constants::level_mask_covered(),
constants::level_mask_notcovered(), constants::level_mask_physbnd(),
constants::level_mask_interior());

if (level == 0) {
setGridInfo();
Expand Down

0 comments on commit 1d47741

Please sign in to comment.