Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BC Types due to breaking AMReX change #758

Merged
merged 6 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/BCfill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ pc_bcfill_hyp(
if (PeleC::turb_inflow.is_initialized()) {
for (int dir = 0; dir < AMREX_SPACEDIM; ++dir) {
auto bndryBoxLO = amrex::Box(amrex::adjCellLo(geom.Domain(), dir) & bx);
if (bcr[1].lo()[dir] == EXT_DIR && bndryBoxLO.ok()) {
if (bcr[1].lo()[dir] == amrex::BCType::ext_dir && bndryBoxLO.ok()) {
// Create box with ghost cells and set them to zero
amrex::IntVect growVect(PeleC::numGrow());
growVect[dir] = 0;
Expand All @@ -179,7 +179,7 @@ pc_bcfill_hyp(
}

auto bndryBoxHI = amrex::Box(amrex::adjCellHi(geom.Domain(), dir) & bx);
if (bcr[1].hi()[dir] == EXT_DIR && bndryBoxHI.ok()) {
if (bcr[1].hi()[dir] == amrex::BCType::ext_dir && bndryBoxHI.ok()) {
// Create box with ghost cells and set them to zero
amrex::IntVect growVect(PeleC::numGrow());
growVect[dir] = 0;
Expand Down
16 changes: 10 additions & 6 deletions Source/Godunov.H
Original file line number Diff line number Diff line change
Expand Up @@ -1127,13 +1127,17 @@ pc_artif_visc(
divu(iv), 0.5 * (divu(iv) + divu(ivpj)),
0.25 * (divu(iv) + divu(ivpj) + divu(ivpk) + divu(ivpp))));

bool at_bndry = ((dir == 0) && (i == domlo) && (bclo == NoSlipWall)) ||
((dir == 0) && (i == domhi + 1) && (bchi == NoSlipWall)) ||
((dir == 1) && (j == domlo) && (bclo == NoSlipWall)) ||
((dir == 1) && (j == domhi + 1) && (bchi == NoSlipWall));
bool at_bndry =
((dir == 0) && (i == domlo) && (bclo == amrex::PhysBCType::noslipwall)) ||
((dir == 0) && (i == domhi + 1) &&
(bchi == amrex::PhysBCType::noslipwall)) ||
((dir == 1) && (j == domlo) && (bclo == amrex::PhysBCType::noslipwall)) ||
((dir == 1) && (j == domhi + 1) && (bchi == amrex::PhysBCType::noslipwall));
#if (AMREX_SPACEDIM == 3)
at_bndry = at_bndry || ((dir == 2) && (k == domlo) && (bclo == NoSlipWall)) ||
((dir == 2) && (k == domhi + 1) && (bchi == NoSlipWall));
at_bndry =
at_bndry ||
((dir == 2) && (k == domlo) && (bclo == amrex::PhysBCType::noslipwall)) ||
((dir == 2) && (k == domhi + 1) && (bchi == amrex::PhysBCType::noslipwall));
#endif

for (int n = 0; n < NVAR; ++n) {
Expand Down
3 changes: 2 additions & 1 deletion Source/Hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ PeleC::construct_hydro_source(
//
// The user should provide a bcnormal routine in bc_fill_module with
// additional optional arguments to temporary fill ghost-cells for
// EXT_DIR and to provide target BC values. See the examples.
// amrex::BCType::ext_dir and to provide target BC values. See the
// examples.

// Allocate fabs for bcMask. Note that we grow in the opposite direction
// because the Riemann solver wants a face value in a ghost-cell
Expand Down
4 changes: 2 additions & 2 deletions Source/InitEB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ PeleC::eb_distance(const int lev, amrex::MultiFab& signDistLev)
// dummy bcs
amrex::Vector<amrex::BCRec> bcrec_dummy(1);
for (int dir = 0; dir < AMREX_SPACEDIM; dir++) {
bcrec_dummy[0].setLo(dir, INT_DIR);
bcrec_dummy[0].setHi(dir, INT_DIR);
bcrec_dummy[0].setLo(dir, amrex::BCType::int_dir);
bcrec_dummy[0].setHi(dir, amrex::BCType::int_dir);
}

// Interpolate on successive levels up to lev
Expand Down
4 changes: 2 additions & 2 deletions Source/PeleC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,8 @@ PeleC::setGridInfo()
const int* domhi_coarse = geom.Domain().hiVect();

for (int dir = 0; dir < 3; dir++) {
domlo_level[dir] = (ARLIM_3D(domlo_coarse))[dir];
domhi_level[dir] = (ARLIM_3D(domhi_coarse))[dir];
domlo_level[dir] = (AMREX_ARLIM_3D(domlo_coarse))[dir];
domhi_level[dir] = (AMREX_ARLIM_3D(domhi_coarse))[dir];
}

for (int lev = 1; lev <= max_level; lev++) {
Expand Down
35 changes: 23 additions & 12 deletions Source/Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,29 @@ SootModel PeleC::soot_model;

// Components are defined in PCPhysBCType enum in PeleC.H:
// Interior, Inflow, Outflow, Symmetry, SlipWall, NoSlipWall, UserBC
static int scalar_bc[] = {INT_DIR, EXT_DIR, FOEXTRAP, REFLECT_EVEN,
REFLECT_EVEN, REFLECT_EVEN, EXT_DIR};

static int norm_vel_bc[] = {INT_DIR, EXT_DIR, FOEXTRAP, REFLECT_ODD,
REFLECT_ODD, REFLECT_ODD, EXT_DIR};

static int tang_vel_bc[] = {INT_DIR, EXT_DIR, FOEXTRAP, REFLECT_EVEN,
REFLECT_EVEN, REFLECT_ODD, EXT_DIR};

static int react_src_bc[] = {INT_DIR, REFLECT_EVEN, REFLECT_EVEN,
REFLECT_EVEN, REFLECT_EVEN, REFLECT_EVEN,
REFLECT_EVEN};
static int scalar_bc[] = {
amrex::BCType::int_dir, amrex::BCType::ext_dir,
amrex::BCType::foextrap, amrex::BCType::reflect_even,
amrex::BCType::reflect_even, amrex::BCType::reflect_even,
amrex::BCType::ext_dir};

static int norm_vel_bc[] = {
amrex::BCType::int_dir, amrex::BCType::ext_dir,
amrex::BCType::foextrap, amrex::BCType::reflect_odd,
amrex::BCType::reflect_odd, amrex::BCType::reflect_odd,
amrex::BCType::ext_dir};

static int tang_vel_bc[] = {
amrex::BCType::int_dir, amrex::BCType::ext_dir,
amrex::BCType::foextrap, amrex::BCType::reflect_even,
amrex::BCType::reflect_even, amrex::BCType::reflect_odd,
amrex::BCType::ext_dir};

static int react_src_bc[] = {
amrex::BCType::int_dir, amrex::BCType::reflect_even,
amrex::BCType::reflect_even, amrex::BCType::reflect_even,
amrex::BCType::reflect_even, amrex::BCType::reflect_even,
amrex::BCType::reflect_even};

static void
set_scalar_bc(amrex::BCRec& bc, const amrex::BCRec& phys_bc)
Expand Down
2 changes: 1 addition & 1 deletion Submodules/PelePhysics
Submodule PelePhysics updated 88 files
+18 −1 Docs/sphinx/Ceptr.rst
+32 −21 Mechanisms/Aromatic_KrNara/mechanism.H
+2 −2 Mechanisms/Aromatic_KrNara/mechanism.cpp
+14 −3 Mechanisms/BurkeDryer/mechanism.H
+4 −3 Mechanisms/BurkeDryer/mechanism.cpp
+14 −3 Mechanisms/C1-C2-NO/mechanism.H
+2 −2 Mechanisms/C1-C2-NO/mechanism.cpp
+14 −3 Mechanisms/C1-C2-NO_qss/mechanism.H
+2 −2 Mechanisms/C1-C2-NO_qss/mechanism.cpp
+17 −6 Mechanisms/CH4_lean/mechanism.H
+2 −2 Mechanisms/CH4_lean/mechanism.cpp
+38 −26 Mechanisms/CH4_lean_qss/mechanism.H
+2 −2 Mechanisms/CH4_lean_qss/mechanism.cpp
+14 −3 Mechanisms/Davis/mechanism.H
+4 −4 Mechanisms/Davis/mechanism.cpp
+15 −4 Mechanisms/FFCM1_Red/mechanism.H
+2 −2 Mechanisms/FFCM1_Red/mechanism.cpp
+14 −3 Mechanisms/H2-CO-CO2-3spec/mechanism.H
+14 −3 Mechanisms/IonizedAir/mechanism.H
+14 −3 Mechanisms/JL4/mechanism.H
+2 −2 Mechanisms/JL4/mechanism.cpp
+14 −3 Mechanisms/Kolla/mechanism.H
+4 −4 Mechanisms/Kolla/mechanism.cpp
+14 −3 Mechanisms/LiDryer/mechanism.H
+3 −3 Mechanisms/LiDryer/mechanism.cpp
+17 −6 Mechanisms/LuDME/mechanism.H
+2 −2 Mechanisms/LuDME/mechanism.cpp
+14 −3 Mechanisms/LuEthylene/mechanism.H
+2 −2 Mechanisms/LuEthylene/mechanism.cpp
+14 −3 Mechanisms/LuEthylene_qss/mechanism.H
+2 −2 Mechanisms/LuEthylene_qss/mechanism.cpp
+24 −13 Mechanisms/NUIGalway/mechanism.H
+2 −2 Mechanisms/NUIGalway/mechanism.cpp
+14 −3 Mechanisms/SootReaction/mechanism.H
+2 −2 Mechanisms/SootReaction/mechanism.cpp
+14 −3 Mechanisms/air/mechanism.H
+18 −7 Mechanisms/alzeta/mechanism.H
+2 −2 Mechanisms/alzeta/mechanism.cpp
+14 −3 Mechanisms/chem-CH4-2step/mechanism.H
+2 −2 Mechanisms/chem-CH4-2step/mechanism.cpp
+14 −3 Mechanisms/chem-H/mechanism.H
+4 −3 Mechanisms/chem-H/mechanism.cpp
+14 −3 Mechanisms/decane_3sp/mechanism.H
+14 −3 Mechanisms/dodecane_lu/mechanism.H
+2 −2 Mechanisms/dodecane_lu/mechanism.cpp
+14 −3 Mechanisms/dodecane_lu_qss/mechanism.H
+2 −2 Mechanisms/dodecane_lu_qss/mechanism.cpp
+14 −3 Mechanisms/dodecane_wang/mechanism.H
+2 −2 Mechanisms/dodecane_wang/mechanism.cpp
+14 −3 Mechanisms/dodmethair_4sp/mechanism.H
+15 −4 Mechanisms/drm19/mechanism.H
+7 −7 Mechanisms/drm19/mechanism.cpp
+14 −3 Mechanisms/ethylene_af/mechanism.H
+2 −2 Mechanisms/ethylene_af/mechanism.cpp
+15 −4 Mechanisms/grimech12/mechanism.H
+2 −2 Mechanisms/grimech12/mechanism.cpp
+15 −4 Mechanisms/grimech30-noArN/mechanism.H
+2 −2 Mechanisms/grimech30-noArN/mechanism.cpp
+15 −4 Mechanisms/grimech30/mechanism.H
+2 −2 Mechanisms/grimech30/mechanism.cpp
+14 −3 Mechanisms/heptane_3sp/mechanism.H
+16 −5 Mechanisms/heptane_fc/mechanism.H
+2 −2 Mechanisms/heptane_fc/mechanism.cpp
+19 −8 Mechanisms/heptane_lu_88sk/mechanism.H
+2 −2 Mechanisms/heptane_lu_88sk/mechanism.cpp
+22 −11 Mechanisms/heptane_lu_qss/mechanism.H
+2 −2 Mechanisms/heptane_lu_qss/mechanism.cpp
+54 −43 Mechanisms/isooctane_lu/mechanism.H
+2 −2 Mechanisms/isooctane_lu/mechanism.cpp
+15 −4 Mechanisms/methaneIons_diRenzo/mechanism.H
+2 −2 Mechanisms/methaneIons_diRenzo/mechanism.cpp
+14 −3 Mechanisms/ndodecane_35/mechanism.H
+14 −3 Mechanisms/nitrogens/mechanism.H
+24 −13 Mechanisms/propane_fc/mechanism.H
+2 −2 Mechanisms/propane_fc/mechanism.cpp
+14 −3 Mechanisms/sCO2/mechanism.H
+6 −6 Mechanisms/sCO2/mechanism.cpp
+33 −20 Source/Radiation/PeleLMRad.H
+6 −4 Source/Spray/SprayParticles.cpp
+1 −1 Submodules/amrex
+75 −2 Support/ceptr/ceptr/ceptr.py
+125 −13 Support/ceptr/ceptr/converter.py
+1 −1 Support/ceptr/ceptr/formatter.py
+1 −1 Support/ceptr/ceptr/qssa.py
+48 −13 Support/ceptr/ceptr/reaction_info.py
+3 −0 Support/ceptr/ceptr/species_info.py
+1 −0 Support/ceptr/pyproject.toml
+9 −3 Support/ceptr/tests/test_ceptr.py
Loading