From 09b5fe593c0270f9d8b3f867c584ad93d5409e19 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Tue, 6 Feb 2024 08:12:48 -0500 Subject: [PATCH] remove some deprecated AMReX constants / macros (#2719) This prepares us for AMReX-Codes/amrex#3713 Co-authored-by: Weiqun Zhang --- Diagnostics/DustCollapse/main.cpp | 6 +- Diagnostics/Radiation/gaussian_pulse.cpp | 4 +- Diagnostics/Radiation/lgt_frnt1d.cpp | 4 +- Diagnostics/Radiation/rad_shock.cpp | 2 +- Diagnostics/Radiation/rad_source.cpp | 2 +- Diagnostics/Radiation/rad_sphere.cpp | 6 +- Diagnostics/Radiation/rhd_shocktube.cpp | 2 +- Docs/source/faq.rst | 4 +- .../DustCollapse/problem_bc_fill.H | 12 +-- .../hydrostatic_adjust/problem_bc_fill.H | 6 +- .../double_mach_reflection/problem_bc_fill.H | 6 +- .../Rad2Tshock/problem_bc_fill.H | 12 +-- Exec/science/Detonation/problem_bc_fill.H | 36 ++++---- Exec/science/wdmerger/Prob.cpp | 10 +- Exec/science/wdmerger/wdmerger_util.cpp | 10 +- Source/diffusion/Diffusion.cpp | 4 +- Source/driver/Castro.cpp | 16 ++-- Source/driver/Castro_setup.cpp | 16 ++-- Source/driver/MGutils.cpp | 2 +- Source/driver/timestep.cpp | 12 +-- Source/gravity/Gravity.cpp | 22 ++--- Source/hydro/Castro_mol.cpp | 4 +- Source/hydro/Castro_mol_hydro.cpp | 4 +- Source/hydro/advection_util.cpp | 4 +- Source/hydro/fourth_center_average.cpp | 20 ++-- Source/hydro/fourth_order.cpp | 60 ++++++------ Source/hydro/riemann.cpp | 12 +-- Source/hydro/trace_plm.cpp | 4 +- Source/mhd/mhd_plm.cpp | 4 +- Source/particles/CastroParticles.cpp | 2 +- Source/problems/Castro_bc_fill_nd.cpp | 64 ++++++------- Source/problems/ambient_fill.cpp | 24 ++--- Source/problems/hse_fill.cpp | 32 +++---- Source/radiation/HABEC.H | 16 ++-- Source/radiation/HypreABec.cpp | 92 +++++++++---------- Source/radiation/HypreExtMultiABec.cpp | 12 +-- Source/radiation/HypreMultiABec.cpp | 72 +++++++-------- Source/radiation/MGFLDRadSolver.cpp | 4 +- Source/radiation/MGRadBndry.cpp | 26 +++--- Source/radiation/RadBndry.cpp | 28 +++--- Source/radiation/RadSolve.cpp | 6 +- Source/radiation/SGRadSolver.cpp | 4 +- Source/reactions/Castro_react.cpp | 4 +- Util/ConvertCheckpoint/Embiggen.cpp | 6 +- 44 files changed, 349 insertions(+), 349 deletions(-) diff --git a/Diagnostics/DustCollapse/main.cpp b/Diagnostics/DustCollapse/main.cpp index 9ac8619009..6fad04b96b 100644 --- a/Diagnostics/DustCollapse/main.cpp +++ b/Diagnostics/DustCollapse/main.cpp @@ -172,17 +172,17 @@ int main(int argc, char* argv[]) const Box& bx = mfi.tilebox(); #if (AMREX_SPACEDIM == 1) - fdustcollapse1d(ARLIM_3D(bx.loVect()), ARLIM_3D(bx.hiVect()), + fdustcollapse1d(AMREX_ARLIM_3D(bx.loVect()), AMREX_ARLIM_3D(bx.hiVect()), BL_TO_FORTRAN_FAB(lev_data_mf[mfi]), nbins, dens.dataPtr(), imask.dataPtr(), mask_size, r1, dens_comp, &cnt); #elif (AMREX_SPACEDIM == 2) - fdustcollapse2d(ARLIM_3D(bx.loVect()), ARLIM_3D(bx.hiVect()), + fdustcollapse2d(AMREX_ARLIM_3D(bx.loVect()), AMREX_ARLIM_3D(bx.hiVect()), BL_TO_FORTRAN_FAB(lev_data_mf[mfi]), nbins, dens.dataPtr(), volcount.dataPtr(), imask.dataPtr(), mask_size, r1, - ZFILL(level_dx), dx_fine, yctr, dens_comp); + AMREX_ZFILL(level_dx), dx_fine, yctr, dens_comp); #else fdustcollapse3d(bx.loVect(), bx.hiVect(), BL_TO_FORTRAN_FAB(lev_data_mf[mfi]), diff --git a/Diagnostics/Radiation/gaussian_pulse.cpp b/Diagnostics/Radiation/gaussian_pulse.cpp index 570b0f637b..a934fa7db4 100644 --- a/Diagnostics/Radiation/gaussian_pulse.cpp +++ b/Diagnostics/Radiation/gaussian_pulse.cpp @@ -123,11 +123,11 @@ int main(int argc, char* argv[]) for (MFIter mfi(lev_data_mf, true); mfi.isValid(); ++mfi) { const Box& bx = mfi.tilebox(); - fgaussian_pulse(ARLIM_3D(bx.loVect()), ARLIM_3D(bx.hiVect()), + fgaussian_pulse(AMREX_ARLIM_3D(bx.loVect()), AMREX_ARLIM_3D(bx.hiVect()), BL_TO_FORTRAN_FAB(lev_data_mf[mfi]), nbins, rad_bin.dataPtr(), ncount.dataPtr(), imask.dataPtr(), mask_size, r1, - rad_comp, ZFILL(dx), dx_fine, xctr, yctr); + rad_comp, AMREX_ZFILL(dx), dx_fine, xctr, yctr); } diff --git a/Diagnostics/Radiation/lgt_frnt1d.cpp b/Diagnostics/Radiation/lgt_frnt1d.cpp index 9b1743b3b4..cf9ebfa5b5 100644 --- a/Diagnostics/Radiation/lgt_frnt1d.cpp +++ b/Diagnostics/Radiation/lgt_frnt1d.cpp @@ -114,13 +114,13 @@ int main(int argc, char* argv[]) for (MFIter mfi(lev_data_mf, true); mfi.isValid(); ++mfi) { const Box& bx = mfi.tilebox(); - flgt_frnt1d(ARLIM_3D(bx.loVect()), ARLIM_3D(bx.hiVect()), + flgt_frnt1d(AMREX_ARLIM_3D(bx.loVect()), AMREX_ARLIM_3D(bx.hiVect()), BL_TO_FORTRAN_FAB(lev_data_mf[mfi]), nbins, dens_bin.dataPtr(), vel_bin.dataPtr(), pres_bin.dataPtr(), rad_bin.dataPtr(), imask.dataPtr(), mask_size, r1, dens_comp, xmom_comp, pres_comp, rad_comp, - ZFILL(dx), dx_fine); + AMREX_ZFILL(dx), dx_fine); } // adjust r1 for the next lowest level diff --git a/Diagnostics/Radiation/rad_shock.cpp b/Diagnostics/Radiation/rad_shock.cpp index 3fbfcab5d8..1707bb7fcc 100644 --- a/Diagnostics/Radiation/rad_shock.cpp +++ b/Diagnostics/Radiation/rad_shock.cpp @@ -135,7 +135,7 @@ int main(int argc, char* argv[]) for (MFIter mfi(lev_data_mf, true); mfi.isValid(); ++mfi) { const Box& bx = mfi.tilebox(); - fradshock(ARLIM_3D(bx.loVect()), ARLIM_3D(bx.hiVect()), + fradshock(AMREX_ARLIM_3D(bx.loVect()), AMREX_ARLIM_3D(bx.hiVect()), problo.dataPtr(), probhi.dataPtr(), BL_TO_FORTRAN_FAB(lev_data_mf[mfi]), nbins, vars_bin.dataPtr(), diff --git a/Diagnostics/Radiation/rad_source.cpp b/Diagnostics/Radiation/rad_source.cpp index fae6885035..20260dc530 100644 --- a/Diagnostics/Radiation/rad_source.cpp +++ b/Diagnostics/Radiation/rad_source.cpp @@ -81,7 +81,7 @@ int main(int argc, char* argv[]) Real rhoe, rad; - fradsource(ARLIM_3D(bx.loVect()), ARLIM_3D(bx.hiVect()), + fradsource(AMREX_ARLIM_3D(bx.loVect()), AMREX_ARLIM_3D(bx.hiVect()), BL_TO_FORTRAN_FAB(lev_data_mf[mfi]), &rhoe, &rad, rhoe_comp, rad_comp); diff --git a/Diagnostics/Radiation/rad_sphere.cpp b/Diagnostics/Radiation/rad_sphere.cpp index 55bc63695d..a60f03486c 100644 --- a/Diagnostics/Radiation/rad_sphere.cpp +++ b/Diagnostics/Radiation/rad_sphere.cpp @@ -163,12 +163,12 @@ int main(int argc, char* argv[]) for (MFIter mfi(lev_data_mf, true); mfi.isValid(); ++mfi) { const Box& bx = mfi.tilebox(); - fradsphere(ARLIM_3D(bx.loVect()), ARLIM_3D(bx.hiVect()), - ZFILL(problo), ZFILL(probhi), + fradsphere(AMREX_ARLIM_3D(bx.loVect()), AMREX_ARLIM_3D(bx.hiVect()), + AMREX_ZFILL(problo), AMREX_ZFILL(probhi), BL_TO_FORTRAN_FAB(lev_data_mf[mfi]), nbins, vars_bin.dataPtr(), imask.dataPtr(), mask_size, r1, - ZFILL(dx), &cnt); + AMREX_ZFILL(dx), &cnt); } // adjust r1 for the next lowest level diff --git a/Diagnostics/Radiation/rhd_shocktube.cpp b/Diagnostics/Radiation/rhd_shocktube.cpp index 9ed79f00ca..c81529fd1b 100644 --- a/Diagnostics/Radiation/rhd_shocktube.cpp +++ b/Diagnostics/Radiation/rhd_shocktube.cpp @@ -150,7 +150,7 @@ int main(int argc, char* argv[]) for (MFIter mfi(lev_data_mf, true); mfi.isValid(); ++mfi) { const Box& bx = mfi.tilebox(); - frhdshocktube(ARLIM_3D(bx.loVect()), ARLIM_3D(bx.hiVect()), + frhdshocktube(AMREX_ARLIM_3D(bx.loVect()), AMREX_ARLIM_3D(bx.hiVect()), BL_TO_FORTRAN_FAB(lev_data_mf[mfi]), nbins, dens_bin.dataPtr(), vel_bin.dataPtr(), pres_bin.dataPtr(), rad_bin.dataPtr(), diff --git a/Docs/source/faq.rst b/Docs/source/faq.rst index 4e3d03daf3..c723b745db 100644 --- a/Docs/source/faq.rst +++ b/Docs/source/faq.rst @@ -106,10 +106,10 @@ Debugging :: - print_state(mf, IntVect(D_DECL(10, 20, 30))); + print_state(mf, IntVect(AMREX_D_DECL(10, 20, 30))); Here, the IntVect has the dimension that we were compiled with - (and this is handled through the preprocessor ``D_DECL``). In + (and this is handled through the preprocessor ``AMREX_D_DECL``). In this case, we are inspecting zone (10, 20, 30), in the global index space. Note that since a multifab exists only on a single level, the integer indices here refer to the global index space on that level. diff --git a/Exec/gravity_tests/DustCollapse/problem_bc_fill.H b/Exec/gravity_tests/DustCollapse/problem_bc_fill.H index 5c9225eb40..b4a937f816 100644 --- a/Exec/gravity_tests/DustCollapse/problem_bc_fill.H +++ b/Exec/gravity_tests/DustCollapse/problem_bc_fill.H @@ -30,7 +30,7 @@ void problem_bc_fill(int i, int j, int k, Real r = std::sqrt(x * x + y * y + z * z); // XLO - if (bcs(0).lo(0) == FOEXTRAP && i < domlo[0]) { + if (bcs(0).lo(0) == amrex::BCType::foextrap && i < domlo[0]) { int ic = domlo[0]; Real xc = problo[0] + (static_cast(ic) + 0.5_rt) * dx[0] - problem::center[0]; @@ -50,7 +50,7 @@ void problem_bc_fill(int i, int j, int k, } // XHI - if (bcs(0).hi(0) == FOEXTRAP && i > domhi[0]) { + if (bcs(0).hi(0) == amrex::BCType::foextrap && i > domhi[0]) { int ic = domhi[0]; Real xc = problo[0] + (static_cast(ic) + 0.5_rt) * dx[0] - problem::center[0]; @@ -71,7 +71,7 @@ void problem_bc_fill(int i, int j, int k, #if AMREX_SPACEDIM >= 2 // YLO - if (bcs(0).lo(1) == FOEXTRAP && j < domlo[1]) { + if (bcs(0).lo(1) == amrex::BCType::foextrap && j < domlo[1]) { int jc = domlo[1]; Real yc = problo[1] + (static_cast(jc) + 0.5_rt) * dx[1] - problem::center[1]; @@ -91,7 +91,7 @@ void problem_bc_fill(int i, int j, int k, } // YHI - if (bcs(0).hi(1) == FOEXTRAP && j > domhi[1]) { + if (bcs(0).hi(1) == amrex::BCType::foextrap && j > domhi[1]) { int jc = domhi[1]; Real yc = problo[1] + (static_cast(jc) + 0.5_rt) * dx[1] - problem::center[1]; @@ -112,7 +112,7 @@ void problem_bc_fill(int i, int j, int k, #if AMREX_SPACEDIM == 3 // ZLO - if (bcs(0).lo(2) == FOEXTRAP && k < domlo[2]) { + if (bcs(0).lo(2) == amrex::BCType::foextrap && k < domlo[2]) { int kc = domlo[2]; Real zc = problo[2] + (static_cast(kc) + 0.5_rt) * dx[2] - problem::center[2]; @@ -132,7 +132,7 @@ void problem_bc_fill(int i, int j, int k, } // ZHI - if (bcs(0).hi(2) == FOEXTRAP && k > domhi[2]) { + if (bcs(0).hi(2) == amrex::BCType::foextrap && k > domhi[2]) { int kc = domhi[2]; Real zc = problo[2] + (static_cast(kc) + 0.5_rt) * dx[2] - problem::center[2]; diff --git a/Exec/gravity_tests/hydrostatic_adjust/problem_bc_fill.H b/Exec/gravity_tests/hydrostatic_adjust/problem_bc_fill.H index 428c8d16ba..9a28bef1d3 100644 --- a/Exec/gravity_tests/hydrostatic_adjust/problem_bc_fill.H +++ b/Exec/gravity_tests/hydrostatic_adjust/problem_bc_fill.H @@ -14,7 +14,7 @@ void problem_bc_fill(int i, int j, int k, if (AMREX_SPACEDIM == 1) { - if (bcs(UMX).hi(0) == FOEXTRAP && i > domhi[0]) { + if (bcs(UMX).hi(0) == amrex::BCType::foextrap && i > domhi[0]) { Real vel = amrex::max(state(i,j,k,UMX) / state(i,j,k,URHO), 0.0); state(i,j,k,URHO) = problem::hse_rho_top; @@ -36,7 +36,7 @@ void problem_bc_fill(int i, int j, int k, } else if (AMREX_SPACEDIM == 2) { - if (bcs(UMY).hi(1) == FOEXTRAP && j > domhi[1]) { + if (bcs(UMY).hi(1) == amrex::BCType::foextrap && j > domhi[1]) { Real vel = amrex::max(state(i,j,k,UMY) / state(i,j,k,URHO), 0.0); state(i,j,k,URHO) = problem::hse_rho_top; @@ -58,7 +58,7 @@ void problem_bc_fill(int i, int j, int k, } else { - if (bcs(UMZ).hi(2) == FOEXTRAP && k > domhi[2]) { + if (bcs(UMZ).hi(2) == amrex::BCType::foextrap && k > domhi[2]) { Real vel = amrex::max(state(i,j,k,UMZ) / state(i,j,k,URHO), 0.0); state(i,j,k,URHO) = problem::hse_rho_top; diff --git a/Exec/hydro_tests/double_mach_reflection/problem_bc_fill.H b/Exec/hydro_tests/double_mach_reflection/problem_bc_fill.H index ba28f4a2f8..aaba204f55 100644 --- a/Exec/hydro_tests/double_mach_reflection/problem_bc_fill.H +++ b/Exec/hydro_tests/double_mach_reflection/problem_bc_fill.H @@ -18,7 +18,7 @@ void problem_bc_fill(int i, int j, int k, // x boundaries //------------------------------------------------------------------------- - if ((bcs(URHO).lo(0) == EXT_DIR || bcs(URHO).lo(0) == FOEXTRAP) && i < domlo[0]) { + if ((bcs(URHO).lo(0) == amrex::BCType::ext_dir || bcs(URHO).lo(0) == amrex::BCType::foextrap) && i < domlo[0]) { state(i,j,k,URHO) = problem::rho_l; state(i,j,k,UMX) = problem::rho_l * problem::u_l; state(i,j,k,UMY) = problem::rho_l * problem::v_l; @@ -43,7 +43,7 @@ void problem_bc_fill(int i, int j, int k, Real y = problo[1] + dx[1] * (static_cast(j) + 0.5e0_rt); // YLO - if ((bcs(URHO).lo(1) == EXT_DIR || bcs(URHO).lo(1) == FOEXTRAP) && j < domlo[1]) { + if ((bcs(URHO).lo(1) == amrex::BCType::ext_dir || bcs(URHO).lo(1) == amrex::BCType::foextrap) && j < domlo[1]) { if (x < 1.e0_rt / 6.e0_rt) { // ICs state(i,j,k,URHO) = problem::rho_l; @@ -71,7 +71,7 @@ void problem_bc_fill(int i, int j, int k, } // YHI - if ((bcs(URHO).hi(2) == EXT_DIR || bcs(URHO).hi(2) == FOEXTRAP) && j > domhi[1]) { + if ((bcs(URHO).hi(2) == amrex::BCType::ext_dir || bcs(URHO).hi(2) == amrex::BCType::foextrap) && j > domhi[1]) { state(i,j,k,URHO ) = 0.e0_rt; state(i,j,k,UMX ) = 0.e0_rt; state(i,j,k,UMY ) = 0.e0_rt; diff --git a/Exec/radiation_tests/Rad2Tshock/problem_bc_fill.H b/Exec/radiation_tests/Rad2Tshock/problem_bc_fill.H index 4a7a301b69..d23413fef3 100644 --- a/Exec/radiation_tests/Rad2Tshock/problem_bc_fill.H +++ b/Exec/radiation_tests/Rad2Tshock/problem_bc_fill.H @@ -18,7 +18,7 @@ void problem_bc_fill(int i, int j, int k, if (problem::idir == 1) { // XLO - if ((bcs(URHO).lo(0) == EXT_DIR || bcs(URHO).lo(0) == FOEXTRAP) && i < domlo[0]) { + if ((bcs(URHO).lo(0) == amrex::BCType::ext_dir || bcs(URHO).lo(0) == amrex::BCType::foextrap) && i < domlo[0]) { state(i,j,k,URHO) = problem::rho0; state(i,j,k,UMX) = problem::rho0 * problem::v0; state(i,j,k,UMY) = 0.e0_rt; @@ -33,7 +33,7 @@ void problem_bc_fill(int i, int j, int k, } // XHI - if ((bcs(URHO).hi(0) == EXT_DIR || bcs(URHO).hi(0) == FOEXTRAP) && i > domhi[0]) { + if ((bcs(URHO).hi(0) == amrex::BCType::ext_dir || bcs(URHO).hi(0) == amrex::BCType::foextrap) && i > domhi[0]) { state(i,j,k,URHO) = problem::rho1; state(i,j,k,UMX) = problem::rho1 * problem::v1; state(i,j,k,UMY) = 0.e0_rt; @@ -51,7 +51,7 @@ void problem_bc_fill(int i, int j, int k, else if (problem::idir == 2) { // YLO - if ((bcs(URHO).lo(1) == EXT_DIR || bcs(URHO).lo(1) == FOEXTRAP) && j < domlo[1]) { + if ((bcs(URHO).lo(1) == amrex::BCType::ext_dir || bcs(URHO).lo(1) == amrex::BCType::foextrap) && j < domlo[1]) { state(i,j,k,URHO) = problem::rho0; state(i,j,k,UMX) = 0.e0_rt; state(i,j,k,UMY) = problem::rho0 * problem::v0; @@ -66,7 +66,7 @@ void problem_bc_fill(int i, int j, int k, } // YHI - if ((bcs(URHO).hi(1) == EXT_DIR || bcs(URHO).hi(1) == FOEXTRAP) && j > domhi[1]) { + if ((bcs(URHO).hi(1) == amrex::BCType::ext_dir || bcs(URHO).hi(1) == amrex::BCType::foextrap) && j > domhi[1]) { state(i,j,k,URHO) = problem::rho1; state(i,j,k,UMX) = 0.e0_rt; state(i,j,k,UMY) = problem::rho1 * problem::v1; @@ -84,7 +84,7 @@ void problem_bc_fill(int i, int j, int k, else if (problem::idir == 3) { // ZLO - if ((bcs(URHO).lo(2) == EXT_DIR || bcs(URHO).lo(2) == FOEXTRAP) && k < domlo[2]) { + if ((bcs(URHO).lo(2) == amrex::BCType::ext_dir || bcs(URHO).lo(2) == amrex::BCType::foextrap) && k < domlo[2]) { state(i,j,k,URHO) = problem::rho0; state(i,j,k,UMX) = 0.e0_rt; state(i,j,k,UMY) = 0.e0_rt; @@ -99,7 +99,7 @@ void problem_bc_fill(int i, int j, int k, } // ZHI - if ((bcs(URHO).hi(2) == EXT_DIR || bcs(URHO).hi(2) == FOEXTRAP) && k > domhi[2]) { + if ((bcs(URHO).hi(2) == amrex::BCType::ext_dir || bcs(URHO).hi(2) == amrex::BCType::foextrap) && k > domhi[2]) { state(i,j,k,URHO) = problem::rho1; state(i,j,k,UMX) = 0.e0_rt; state(i,j,k,UMY) = 0.e0_rt; diff --git a/Exec/science/Detonation/problem_bc_fill.H b/Exec/science/Detonation/problem_bc_fill.H index 9070d5fe4d..d16f07bf0d 100644 --- a/Exec/science/Detonation/problem_bc_fill.H +++ b/Exec/science/Detonation/problem_bc_fill.H @@ -63,39 +63,39 @@ void problem_bc_fill(int i, int j, int k, // Note: in these checks we're only looking at the boundary // conditions on the first state component (density). - if (i < domlo[0] && (bcs(0).lo(0) != REFLECT_ODD && - bcs(0).lo(0) != INT_DIR && - bcs(0).lo(0) != REFLECT_EVEN)) { + if (i < domlo[0] && (bcs(0).lo(0) != amrex::BCType::reflect_odd && + bcs(0).lo(0) != amrex::BCType::int_dir && + bcs(0).lo(0) != amrex::BCType::reflect_even)) { do_ambient_fill = true; } - else if (i > domhi[0] && (bcs(0).hi(0) != REFLECT_ODD && - bcs(0).hi(0) != INT_DIR && - bcs(0).hi(0) != REFLECT_EVEN)) { + else if (i > domhi[0] && (bcs(0).hi(0) != amrex::BCType::reflect_odd && + bcs(0).hi(0) != amrex::BCType::int_dir && + bcs(0).hi(0) != amrex::BCType::reflect_even)) { do_ambient_fill = true; } if (AMREX_SPACEDIM >= 2) { - if (j < domlo[1] && (bcs(0).lo(1) != REFLECT_ODD && - bcs(0).lo(1) != INT_DIR && - bcs(0).lo(1) != REFLECT_EVEN)) { + if (j < domlo[1] && (bcs(0).lo(1) != amrex::BCType::reflect_odd && + bcs(0).lo(1) != amrex::BCType::int_dir && + bcs(0).lo(1) != amrex::BCType::reflect_even)) { do_ambient_fill = true; } - else if (j > domhi[1] && (bcs(0).hi(1) != REFLECT_ODD && - bcs(0).hi(1) != INT_DIR && - bcs(0).hi(1) != REFLECT_EVEN)) { + else if (j > domhi[1] && (bcs(0).hi(1) != amrex::BCType::reflect_odd && + bcs(0).hi(1) != amrex::BCType::int_dir && + bcs(0).hi(1) != amrex::BCType::reflect_even)) { do_ambient_fill = true; } } if (AMREX_SPACEDIM == 3) { - if (k < domlo[2] && (bcs(0).lo(2) != REFLECT_ODD && - bcs(0).lo(2) != INT_DIR && - bcs(0).lo(2) != REFLECT_EVEN)) { + if (k < domlo[2] && (bcs(0).lo(2) != amrex::BCType::reflect_odd && + bcs(0).lo(2) != amrex::BCType::int_dir && + bcs(0).lo(2) != amrex::BCType::reflect_even)) { do_ambient_fill = true; } - else if (k > domhi[2] && (bcs(0).hi(2) != REFLECT_ODD && - bcs(0).hi(2) != INT_DIR && - bcs(0).hi(2) != REFLECT_EVEN)) { + else if (k > domhi[2] && (bcs(0).hi(2) != amrex::BCType::reflect_odd && + bcs(0).hi(2) != amrex::BCType::int_dir && + bcs(0).hi(2) != amrex::BCType::reflect_even)) { do_ambient_fill = true; } } diff --git a/Exec/science/wdmerger/Prob.cpp b/Exec/science/wdmerger/Prob.cpp index 1b61cf8683..ac6a41eceb 100644 --- a/Exec/science/wdmerger/Prob.cpp +++ b/Exec/science/wdmerger/Prob.cpp @@ -101,10 +101,10 @@ Castro::wd_update (Real time, Real dt) GpuArray symm_bound_hi{false}; for (int n = 0; n < AMREX_SPACEDIM; ++n) { - if (phys_bc.lo()[n] == Symmetry) { + if (phys_bc.lo()[n] == amrex::PhysBCType::symmetry) { symm_bound_lo[n] = true; } - if (phys_bc.hi()[n] == Symmetry) { + if (phys_bc.hi()[n] == amrex::PhysBCType::symmetry) { symm_bound_hi[n] = true; } } @@ -665,9 +665,9 @@ Castro::update_relaxation(Real time, Real dt) { const int* lo_bc = phys_bc.lo(); - const bool symm_lo_x = (lo_bc[0] == Symmetry); - const bool symm_lo_y = (lo_bc[1] == Symmetry); - const bool symm_lo_z = (lo_bc[2] == Symmetry); + const bool symm_lo_x = (lo_bc[0] == amrex::PhysBCType::symmetry); + const bool symm_lo_y = (lo_bc[1] == amrex::PhysBCType::symmetry); + const bool symm_lo_z = (lo_bc[2] == amrex::PhysBCType::symmetry); ReduceOps reduce_op; ReduceData reduce_data(reduce_op); diff --git a/Exec/science/wdmerger/wdmerger_util.cpp b/Exec/science/wdmerger/wdmerger_util.cpp index 3ccf324816..aad2daaa6e 100644 --- a/Exec/science/wdmerger/wdmerger_util.cpp +++ b/Exec/science/wdmerger/wdmerger_util.cpp @@ -462,15 +462,15 @@ void binary_setup () const Real* problo = DefaultGeometry().ProbLo(); const Real* probhi = DefaultGeometry().ProbHi(); - if (Castro::physbc().lo(0) == Symmetry && problem::center[0] != problo[0]) { + if (Castro::physbc().lo(0) == amrex::PhysBCType::symmetry && problem::center[0] != problo[0]) { amrex::Error("Symmetric lower x-boundary but the center is not on this boundary."); } - if (Castro::physbc().lo(1) == Symmetry && problem::center[1] != problo[1]) { + if (Castro::physbc().lo(1) == amrex::PhysBCType::symmetry && problem::center[1] != problo[1]) { amrex::Error("Symmetric lower y-boundary but the center is not on this boundary."); } - if (Castro::physbc().lo(2) == Symmetry && problem::center[2] != problo[2]) { + if (Castro::physbc().lo(2) == amrex::PhysBCType::symmetry && problem::center[2] != problo[2]) { amrex::Error("Symmetric lower z-boundary but the center is not on this boundary."); } @@ -656,7 +656,7 @@ void binary_setup () Real length; - if (Castro::physbc().lo(problem::axis_1-1) == Symmetry) { + if (Castro::physbc().lo(problem::axis_1-1) == amrex::PhysBCType::symmetry) { // In this case we're only modelling the secondary. length = problem::r_P_initial + problem::radius_P; @@ -787,7 +787,7 @@ void binary_setup () // Safety check: make sure the stars are actually inside the computational domain. - if (!(AMREX_SPACEDIM == 2 && Castro::physbc().lo(1) == Symmetry)) { + if (!(AMREX_SPACEDIM == 2 && Castro::physbc().lo(1) == amrex::PhysBCType::symmetry)) { if ((0.5_rt * (probhi[0] - problo[0]) < problem::radius_P) || (0.5_rt * (probhi[1] - problo[1]) < problem::radius_P) || diff --git a/Source/diffusion/Diffusion.cpp b/Source/diffusion/Diffusion.cpp index 3fc02063d8..2f478fdc39 100644 --- a/Source/diffusion/Diffusion.cpp +++ b/Source/diffusion/Diffusion.cpp @@ -105,12 +105,12 @@ Diffusion::make_mg_bc () mlmg_lobc[idim] = MLLinOp::BCType::Periodic; mlmg_hibc[idim] = MLLinOp::BCType::Periodic; } else { - if (phys_bc->lo(idim) == Inflow) { + if (phys_bc->lo(idim) == amrex::PhysBCType::inflow) { mlmg_lobc[idim] = MLLinOp::BCType::Dirichlet; } else { mlmg_lobc[idim] = MLLinOp::BCType::Neumann; } - if (phys_bc->hi(idim) == Symmetry) { + if (phys_bc->hi(idim) == amrex::PhysBCType::symmetry) { mlmg_hibc[idim] = MLLinOp::BCType::Dirichlet; } else { mlmg_hibc[idim] = MLLinOp::BCType::Neumann; diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index 155cd3cf5b..a0217208cf 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -245,14 +245,14 @@ Castro::read_params () { if (dgeom.isPeriodic(dir)) { - if (lo_bc[dir] != Interior) + if (lo_bc[dir] != amrex::PhysBCType::interior) { std::cerr << "Castro::read_params:periodic in direction " << dir << " but low BC is not Interior\n"; amrex::Error(); } - if (hi_bc[dir] != Interior) + if (hi_bc[dir] != amrex::PhysBCType::interior) { std::cerr << "Castro::read_params:periodic in direction " << dir @@ -269,14 +269,14 @@ Castro::read_params () // for (int dir=0; dir= domhi[dim] - boundary_buf)) { outer_boundary_test[dim] = true; } diff --git a/Source/driver/Castro_setup.cpp b/Source/driver/Castro_setup.cpp index 9506fdde2c..2e3a3c1bfc 100644 --- a/Source/driver/Castro_setup.cpp +++ b/Source/driver/Castro_setup.cpp @@ -31,23 +31,23 @@ typedef StateDescriptor::BndryFunc BndryFunc; // static int scalar_bc[] = { - INT_DIR, EXT_DIR, FOEXTRAP, REFLECT_EVEN, REFLECT_EVEN, REFLECT_EVEN + amrex::BCType::int_dir, amrex::BCType::ext_dir, amrex::BCType::foextrap, amrex::BCType::reflect_even, amrex::BCType::reflect_even, amrex::BCType::reflect_even }; static int norm_vel_bc[] = { - INT_DIR, EXT_DIR, FOEXTRAP, REFLECT_ODD, REFLECT_ODD, REFLECT_ODD + amrex::BCType::int_dir, amrex::BCType::ext_dir, amrex::BCType::foextrap, amrex::BCType::reflect_odd, amrex::BCType::reflect_odd, amrex::BCType::reflect_odd }; static int tang_vel_bc[] = { - INT_DIR, EXT_DIR, FOEXTRAP, REFLECT_EVEN, REFLECT_EVEN, REFLECT_EVEN + amrex::BCType::int_dir, amrex::BCType::ext_dir, amrex::BCType::foextrap, amrex::BCType::reflect_even, amrex::BCType::reflect_even, amrex::BCType::reflect_even }; #ifdef MHD static int mag_field_bc[] = { - INT_DIR, EXT_DIR, FOEXTRAP, REFLECT_EVEN, FOEXTRAP, HOEXTRAP + amrex::BCType::int_dir, amrex::BCType::ext_dir, amrex::BCType::foextrap, amrex::BCType::reflect_even, amrex::BCType::foextrap, amrex::BCType::hoextrap }; #endif @@ -146,11 +146,11 @@ void replace_inflow_bc (BCRec& bc) { for (int dir = 0; dir < AMREX_SPACEDIM; ++dir) { - if (bc.lo(dir) == EXT_DIR) { - bc.setLo(dir, FOEXTRAP); + if (bc.lo(dir) == amrex::BCType::ext_dir) { + bc.setLo(dir, amrex::BCType::foextrap); } - if (bc.hi(dir) == EXT_DIR) { - bc.setHi(dir, FOEXTRAP); + if (bc.hi(dir) == amrex::BCType::ext_dir) { + bc.setHi(dir, amrex::BCType::foextrap); } } } diff --git a/Source/driver/MGutils.cpp b/Source/driver/MGutils.cpp index 62e5bbd85c..2a7455a6fc 100644 --- a/Source/driver/MGutils.cpp +++ b/Source/driver/MGutils.cpp @@ -20,7 +20,7 @@ apply_metric(const Box& bx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { - IntVect idx(D_DECL(i, j, k)); + IntVect idx(AMREX_D_DECL(i, j, k)); // at centers if (rbx.contains(idx)) { diff --git a/Source/driver/timestep.cpp b/Source/driver/timestep.cpp index 42ac0325b2..a7b5936e4e 100644 --- a/Source/driver/timestep.cpp +++ b/Source/driver/timestep.cpp @@ -46,7 +46,7 @@ Castro::estdt_cfl (int is_new) Array4 const& u = ua[box_no]; - IntVect idx(D_DECL(i,j,k)); + IntVect idx(AMREX_D_DECL(i,j,k)); Real rhoInv = 1.0_rt / u(i,j,k,URHO); @@ -150,7 +150,7 @@ Castro::estdt_mhd (int is_new) Array4 const& by_arr = bya[box_no]; Array4 const& bz_arr = bza[box_no]; - IntVect idx(D_DECL(i,j,k)); + IntVect idx(AMREX_D_DECL(i,j,k)); Real rhoInv = 1.0_rt / u_arr(i,j,k,URHO); Real bcx = 0.5_rt * (bx_arr(i+1,j,k) + bx_arr(i,j,k)); @@ -253,7 +253,7 @@ Castro::estdt_temp_diffusion (int is_new) Array4 const& ustate = ua[box_no]; - IntVect idx(D_DECL(i,j,k)); + IntVect idx(AMREX_D_DECL(i,j,k)); if (ustate(i,j,k,URHO) > ldiffuse_cutoff_density) { @@ -315,7 +315,7 @@ Castro::estdt_burning (int is_new) { if (castro::dtnuc_e > 1.e199_rt && castro::dtnuc_X > 1.e199_rt) { - IntVect idx(D_DECL(0,0,0)); + IntVect idx(AMREX_D_DECL(0,0,0)); return {ValLocPair{1.e200_rt, idx}}; } @@ -331,7 +331,7 @@ Castro::estdt_burning (int is_new) Array4 const& S = ua[box_no]; - IntVect idx(D_DECL(i,j,k)); + IntVect idx(AMREX_D_DECL(i,j,k)); // Set a floor on the minimum size of a derivative. This floor // is small enough such that it will result in no timestep limiting. @@ -368,7 +368,7 @@ Castro::estdt_burning (int is_new) #if AMREX_SPACEDIM == 1 burn_state.dx = dx[0]; #else - burn_state.dx = amrex::min(D_DECL(dx[0], dx[1], dx[2])); + burn_state.dx = amrex::min(AMREX_D_DECL(dx[0], dx[1], dx[2])); #endif burn_state.rho = S(i,j,k,URHO); diff --git a/Source/gravity/Gravity.cpp b/Source/gravity/Gravity.cpp index d67087d469..8ef59f0e46 100644 --- a/Source/gravity/Gravity.cpp +++ b/Source/gravity/Gravity.cpp @@ -1656,7 +1656,7 @@ Gravity::init_multipole_grav() for (int b = 0; b < AMREX_SPACEDIM; ++b) { - if ((lo_bc[b] == Symmetry) && (parent->Geom(0).Coord() == 0)) { + if ((lo_bc[b] == amrex::PhysBCType::symmetry) && (parent->Geom(0).Coord() == 0)) { if (std::abs(problem::center[b] - problo[b]) < edgeTolerance) { multipole::volumeFactor *= 2.0_rt; multipole::doReflectionLo(b) = true; @@ -1667,7 +1667,7 @@ Gravity::init_multipole_grav() } } - if ((hi_bc[b] == Symmetry) && (parent->Geom(0).Coord() == 0)) { + if ((hi_bc[b] == amrex::PhysBCType::symmetry) && (parent->Geom(0).Coord() == 0)) { if (std::abs(problem::center[b] - probhi[b]) < edgeTolerance) { multipole::volumeFactor *= 2.0_rt; multipole::doReflectionHi(b) = true; @@ -1801,9 +1801,9 @@ Gravity::fill_multipole_BCs(int crse_level, int fine_level, const Vectorlo(idim) == Symmetry) { + if (phys_bc->lo(idim) == amrex::PhysBCType::symmetry) { mlmg_lobc[idim] = MLLinOp::BCType::Neumann; } else { mlmg_lobc[idim] = MLLinOp::BCType::Dirichlet; } - if (phys_bc->hi(idim) == Symmetry) { + if (phys_bc->hi(idim) == amrex::PhysBCType::symmetry) { mlmg_hibc[idim] = MLLinOp::BCType::Neumann; } else { mlmg_hibc[idim] = MLLinOp::BCType::Dirichlet; @@ -3525,10 +3525,10 @@ Gravity::sanity_check (int level) { if (!geom.isPeriodic(dir)) { - if (phys_bc->lo(dir) != Symmetry) { + if (phys_bc->lo(dir) != amrex::PhysBCType::symmetry) { shrunk_domain.growLo(dir,-1); } - if (phys_bc->hi(dir) != Symmetry) { + if (phys_bc->hi(dir) != amrex::PhysBCType::symmetry) { shrunk_domain.growHi(dir,-1); } } diff --git a/Source/hydro/Castro_mol.cpp b/Source/hydro/Castro_mol.cpp index 1ea775f2cc..23a004c719 100644 --- a/Source/hydro/Castro_mol.cpp +++ b/Source/hydro/Castro_mol.cpp @@ -29,8 +29,8 @@ Castro::mol_plm_reconstruct(const Box& bx, const int* lo_bc = phys_bc.lo(); const int* hi_bc = phys_bc.hi(); - bool lo_symm = lo_bc[idir] == Symmetry; - bool hi_symm = hi_bc[idir] == Symmetry; + bool lo_symm = lo_bc[idir] == amrex::PhysBCType::symmetry; + bool hi_symm = hi_bc[idir] == amrex::PhysBCType::symmetry; const auto domlo = geom.Domain().loVect3d(); const auto domhi = geom.Domain().hiVect3d(); diff --git a/Source/hydro/Castro_mol_hydro.cpp b/Source/hydro/Castro_mol_hydro.cpp index 3fddd8d072..b73e6b7047 100644 --- a/Source/hydro/Castro_mol_hydro.cpp +++ b/Source/hydro/Castro_mol_hydro.cpp @@ -314,8 +314,8 @@ Castro::construct_mol_hydro_source(Real time, Real dt, MultiFab& A_update) GpuArray lo_periodic; GpuArray hi_periodic; for (int idir = 0; idir < AMREX_SPACEDIM; idir++) { - lo_periodic[idir] = lo_bc[idir] == Interior; - hi_periodic[idir] = hi_bc[idir] == Interior; + lo_periodic[idir] = lo_bc[idir] == amrex::PhysBCType::interior; + hi_periodic[idir] = hi_bc[idir] == amrex::PhysBCType::interior; } amrex::ParallelFor(nbx, NQ, diff --git a/Source/hydro/advection_util.cpp b/Source/hydro/advection_util.cpp index 0723c29983..ec7505a438 100644 --- a/Source/hydro/advection_util.cpp +++ b/Source/hydro/advection_util.cpp @@ -694,8 +694,8 @@ Castro::enforce_reflect_states(const Box& bx, const int idir, const auto domlo = geom.Domain().loVect3d(); const auto domhi = geom.Domain().hiVect3d(); - bool lo_bc_test = lo_bc[idir] == Symmetry; - bool hi_bc_test = hi_bc[idir] == Symmetry; + bool lo_bc_test = lo_bc[idir] == amrex::PhysBCType::symmetry; + bool hi_bc_test = hi_bc[idir] == amrex::PhysBCType::symmetry; // normal velocity const int QUN = QU + idir; diff --git a/Source/hydro/fourth_center_average.cpp b/Source/hydro/fourth_center_average.cpp index 5c4566b615..070fcd8f3e 100644 --- a/Source/hydro/fourth_center_average.cpp +++ b/Source/hydro/fourth_center_average.cpp @@ -35,8 +35,8 @@ Castro::make_cell_center(const Box& bx, GpuArray lo_periodic; GpuArray hi_periodic; for (int idir = 0; idir < AMREX_SPACEDIM; idir++) { - lo_periodic[idir] = lo_bc[idir] == Interior; - hi_periodic[idir] = hi_bc[idir] == Interior; + lo_periodic[idir] = lo_bc[idir] == amrex::PhysBCType::interior; + hi_periodic[idir] = hi_bc[idir] == amrex::PhysBCType::interior; } amrex::ParallelFor(bx, U.nComp(), @@ -68,8 +68,8 @@ Castro::make_cell_center_in_place(const Box& bx, GpuArray lo_periodic; GpuArray hi_periodic; for (int idir = 0; idir < AMREX_SPACEDIM; idir++) { - lo_periodic[idir] = lo_bc[idir] == Interior; - hi_periodic[idir] = hi_bc[idir] == Interior; + lo_periodic[idir] = lo_bc[idir] == amrex::PhysBCType::interior; + hi_periodic[idir] = hi_bc[idir] == amrex::PhysBCType::interior; } for (int n = 0; n < U.nComp(); n++) { @@ -105,8 +105,8 @@ Castro::compute_lap_term(const Box& bx, GpuArray lo_periodic; GpuArray hi_periodic; for (int idir = 0; idir < AMREX_SPACEDIM; idir++) { - lo_periodic[idir] = lo_bc[idir] == Interior; - hi_periodic[idir] = hi_bc[idir] == Interior; + lo_periodic[idir] = lo_bc[idir] == amrex::PhysBCType::interior; + hi_periodic[idir] = hi_bc[idir] == amrex::PhysBCType::interior; } amrex::ParallelFor(bx, @@ -136,8 +136,8 @@ Castro::make_fourth_average(const Box& bx, GpuArray lo_periodic; GpuArray hi_periodic; for (int idir = 0; idir < AMREX_SPACEDIM; idir++) { - lo_periodic[idir] = lo_bc[idir] == Interior; - hi_periodic[idir] = hi_bc[idir] == Interior; + lo_periodic[idir] = lo_bc[idir] == amrex::PhysBCType::interior; + hi_periodic[idir] = hi_bc[idir] == amrex::PhysBCType::interior; } amrex::ParallelFor(bx, q.nComp(), @@ -186,8 +186,8 @@ Castro::make_fourth_in_place_n(const Box& bx, GpuArray lo_periodic; GpuArray hi_periodic; for (int idir = 0; idir < AMREX_SPACEDIM; idir++) { - lo_periodic[idir] = lo_bc[idir] == Interior; - hi_periodic[idir] = hi_bc[idir] == Interior; + lo_periodic[idir] = lo_bc[idir] == amrex::PhysBCType::interior; + hi_periodic[idir] = hi_bc[idir] == amrex::PhysBCType::interior; } amrex::ParallelFor(bx, diff --git a/Source/hydro/fourth_order.cpp b/Source/hydro/fourth_order.cpp index e8f563fe21..89183a5f27 100644 --- a/Source/hydro/fourth_order.cpp +++ b/Source/hydro/fourth_order.cpp @@ -37,25 +37,25 @@ Castro::fourth_interfaces(const Box& bx, // interpolate to the edges -- this is a_{i-1/2} // note for non-periodic physical boundaries, we use a special stencil - if (i == domlo[0]+1 && lo_bc[0] == Symmetry) { + if (i == domlo[0]+1 && lo_bc[0] == amrex::PhysBCType::symmetry) { // use a stencil for the interface that is one zone // from the left physical boundary, MC Eq. 22 a_int(i,j,k) = (1.0_rt/12.0_rt)*(3.0_rt*a(i-1,j,k,ncomp) + 13.0_rt*a(i,j,k,ncomp) - 5.0_rt*a(i+1,j,k,ncomp) + a(i+2,j,k,ncomp)); - } else if (i == domlo[0] && lo_bc[0] == Symmetry) { + } else if (i == domlo[0] && lo_bc[0] == amrex::PhysBCType::symmetry) { // use a stencil for when the interface is on the // left physical boundary MC Eq. 21 a_int(i,j,k) = (1.0_rt/12.0_rt)*(25.0_rt*a(i,j,k,ncomp) - 23.0_rt*a(i+1,j,k,ncomp) + 13.0_rt*a(i+2,j,k,ncomp) - 3.0_rt*a(i+3,j,k,ncomp)); - } else if (i == domhi[0] && hi_bc[0] == Symmetry) { + } else if (i == domhi[0] && hi_bc[0] == amrex::PhysBCType::symmetry) { // use a stencil for the interface that is one zone // from the right physical boundary, MC Eq. 22 a_int(i,j,k) = (1.0_rt/12.0_rt)*(3.0_rt*a(i,j,k,ncomp) + 13.0_rt*a(i-1,j,k,ncomp) - 5.0_rt*a(i-2,j,k,ncomp) + a(i-3,j,k,ncomp)); - } else if (i == domhi[0]+1 && hi_bc[0] == Symmetry) { + } else if (i == domhi[0]+1 && hi_bc[0] == amrex::PhysBCType::symmetry) { // use a stencil for when the interface is on the // right physical boundary MC Eq. 21 a_int(i,j,k) = (1.0_rt/12.0_rt)*(25.0_rt*a(i-1,j,k,ncomp) - 23.0_rt*a(i-2,j,k,ncomp) + @@ -78,25 +78,25 @@ Castro::fourth_interfaces(const Box& bx, // interpolate to the edges - if (j == domlo[1]+1 && lo_bc[1] == Symmetry) { + if (j == domlo[1]+1 && lo_bc[1] == amrex::PhysBCType::symmetry) { // use a stencil for the interface that is one zone // from the left physical boundary, MC Eq. 22 a_int(i,j,k) = (1.0_rt/12.0_rt)*(3.0_rt*a(i,j-1,k,ncomp) + 13.0_rt*a(i,j,k,ncomp) - 5.0_rt*a(i,j+1,k,ncomp) + a(i,j+2,k,ncomp)); - } else if (j == domlo[1] && lo_bc[1] == Symmetry) { + } else if (j == domlo[1] && lo_bc[1] == amrex::PhysBCType::symmetry) { // use a stencil for when the interface is on the // left physical boundary MC Eq. 21 a_int(i,j,k) = (1.0_rt/12.0_rt)*(25.0_rt*a(i,j,k,ncomp) - 23.0_rt*a(i,j+1,k,ncomp) + 13.0_rt*a(i,j+2,k,ncomp) - 3.0_rt*a(i,j+3,k,ncomp)); - } else if (j == domhi[1] && hi_bc[1] == Symmetry) { + } else if (j == domhi[1] && hi_bc[1] == amrex::PhysBCType::symmetry) { // use a stencil for the interface that is one zone // from the right physical boundary, MC Eq. 22 a_int(i,j,k) = (1.0_rt/12.0_rt)*(3.0_rt*a(i,j,k,ncomp) + 13.0_rt*a(i,j-1,k,ncomp) - 5.0_rt*a(i,j-2,k,ncomp) + a(i,j-3,k,ncomp)); - } else if (j == domhi[1]+1 && hi_bc[1] == Symmetry) { + } else if (j == domhi[1]+1 && hi_bc[1] == amrex::PhysBCType::symmetry) { // use a stencil for when the interface is on the // right physical boundary MC Eq. 21 a_int(i,j,k) = (1.0_rt/12.0_rt)*(25.0_rt*a(i,j-1,k,ncomp) - 23.0_rt*a(i,j-2,k,ncomp) + @@ -120,25 +120,25 @@ Castro::fourth_interfaces(const Box& bx, // interpolate to the edges - if (k == domlo[2]+1 && lo_bc[2] == Symmetry) { + if (k == domlo[2]+1 && lo_bc[2] == amrex::PhysBCType::symmetry) { // use a stencil for the interface that is one zone // from the left physical boundary, MC Eq. 22 a_int(i,j,k) = (1.0_rt/12.0_rt)*(3.0_rt*a(i,j,k-1,ncomp) + 13.0_rt*a(i,j,k,ncomp) - 5.0_rt*a(i,j,k+1,ncomp) + a(i,j,k+2,ncomp)); - } else if (k == domlo[2] && lo_bc[2] == Symmetry) { + } else if (k == domlo[2] && lo_bc[2] == amrex::PhysBCType::symmetry) { // use a stencil for when the interface is on the // left physical boundary MC Eq. 21 a_int(i,j,k) = (1.0_rt/12.0_rt)*(25.0_rt*a(i,j,k,ncomp) - 23.0_rt*a(i,j,k+1,ncomp) + 13.0_rt*a(i,j,k+2,ncomp) - 3.0_rt*a(i,j,k+3,ncomp)); - } else if (k == domhi[2] && hi_bc[2] == Symmetry) { + } else if (k == domhi[2] && hi_bc[2] == amrex::PhysBCType::symmetry) { // use a stencil for the interface that is one zone // from the right physical boundary, MC Eq. 22 a_int(i,j,k) = (1.0_rt/12.0_rt)*(3.0_rt*a(i,j,k,ncomp) + 13.0_rt*a(i,j,k-1,ncomp) - 5.0_rt*a(i,j,k-2,ncomp) + a(i,j,k-3,ncomp)); - } else if (k == domhi[2]+1 && hi_bc[2] == Symmetry) { + } else if (k == domhi[2]+1 && hi_bc[2] == amrex::PhysBCType::symmetry) { // use a stencil for when the interface is on the // right physical boundary MC Eq. 21 a_int(i,j,k) = (1.0_rt/12.0_rt)*(25.0_rt*a(i,j,k-1,ncomp) - 23.0_rt*a(i,j,k-2,ncomp) + @@ -300,17 +300,17 @@ Castro::states(const Box& bx, // reset the left state at domlo[0] if needed -- it is outside the domain - if (lo_bc[0] == Outflow) { + if (lo_bc[0] == amrex::PhysBCType::outflow) { //al(domlo[0],j,k,ncomp) = ar(domlo[0],j,k,ncomp); - } else if (lo_bc[0] == Symmetry) { + } else if (lo_bc[0] == amrex::PhysBCType::symmetry) { if (ncomp == QU) { al(domlo[0],j,k,QU) = -ar(domlo[0],j,k,QU); } else { al(domlo[0],j,k,ncomp) = ar(domlo[0],j,k,ncomp); } - } else if (lo_bc[0] == Interior) { + } else if (lo_bc[0] == amrex::PhysBCType::interior) { // we don't need to do anything here } else { @@ -324,17 +324,17 @@ Castro::states(const Box& bx, // reset the right state at domhi[0]+1 if needed -- it is outside the domain - if (hi_bc[0] == Outflow) { + if (hi_bc[0] == amrex::PhysBCType::outflow) { //ar(domhi[0]+1,j,k,ncomp) = al(domhi[0]+1,j,k,ncomp); - } else if (hi_bc[0] == Symmetry) { + } else if (hi_bc[0] == amrex::PhysBCType::symmetry) { if (ncomp == QU) { ar(domhi[0]+1,j,k,QU) = -al(domhi[0]+1,j,k,QU); } else { ar(domhi[0]+1,j,k,ncomp) = al(domhi[0]+1,j,k,ncomp); } - } else if (hi_bc[0] == Interior) { + } else if (hi_bc[0] == amrex::PhysBCType::interior) { // we don't need to do anything here } else { @@ -465,17 +465,17 @@ Castro::states(const Box& bx, // reset the left state at domlo[1] if needed -- it is outside the domain - if (lo_bc[1] == Outflow) { + if (lo_bc[1] == amrex::PhysBCType::outflow) { //al(i,domlo[1],k,ncomp) = ar(i,domlo[1],k,ncomp); - } else if (lo_bc[1] == Symmetry) { + } else if (lo_bc[1] == amrex::PhysBCType::symmetry) { if (ncomp == QV) { al(i,domlo[1],k,QV) = -ar(i,domlo[1],k,QV); } else { al(i,domlo[1],k,ncomp) = ar(i,domlo[1],k,ncomp); } - } else if (lo_bc[1] == Interior) { + } else if (lo_bc[1] == amrex::PhysBCType::interior) { // we don't need to do anything here } else { @@ -489,17 +489,17 @@ Castro::states(const Box& bx, // reset the right state at domhi[1]+1 if needed -- it is outside the domain - if (hi_bc[1] == Outflow) { + if (hi_bc[1] == amrex::PhysBCType::outflow) { //ar(i,domhi[1]+1,k,ncomp) = al(i,domhi[1]+1,k,ncomp); - } else if (hi_bc[1] == Symmetry) { + } else if (hi_bc[1] == amrex::PhysBCType::symmetry) { if (ncomp == QV) { ar(i,domhi[1]+1,k,QV) = -al(i,domhi[1]+1,k,QV); } else { ar(i,domhi[1]+1,k,ncomp) = al(i,domhi[1]+1,k,ncomp); } - } else if (hi_bc[1] == Interior) { + } else if (hi_bc[1] == amrex::PhysBCType::interior) { // we don't need to do anything here } else { @@ -628,17 +628,17 @@ Castro::states(const Box& bx, if (k == domlo[2]) { // reset the left state at domlo[2] if needed -- it is outside the domain - if (lo_bc[2] == Outflow) { + if (lo_bc[2] == amrex::PhysBCType::outflow) { //al(i,j,domlo[2],ncomp) = ar(i,j,domlo[2],ncomp); - } else if (lo_bc[2] == Symmetry) { + } else if (lo_bc[2] == amrex::PhysBCType::symmetry) { if (ncomp == QW) { al(i,j,domlo[2],QW) = -ar(i,j,domlo[2],QW); } else { al(i,j,domlo[2],ncomp) = ar(i,j,domlo[2],ncomp); } - } else if (lo_bc[2] == Interior) { + } else if (lo_bc[2] == amrex::PhysBCType::interior) { // we don't need to do anything here } else { @@ -651,17 +651,17 @@ Castro::states(const Box& bx, if (k == domhi[2]+1) { // reset the right state at domhi[2]+1 if needed -- it is outside the domain - if (hi_bc[2] == Outflow) { + if (hi_bc[2] == amrex::PhysBCType::outflow) { //ar(i,j,domhi[2]+1,ncomp) = al(i,j,domhi[2]+1,ncomp); - } else if (hi_bc[2] == Symmetry) { + } else if (hi_bc[2] == amrex::PhysBCType::symmetry) { if (ncomp == QW) { ar(i,j,domhi[2]+1,QW) = -al(i,j,domhi[2]+1,QW); } else { ar(i,j,domhi[2]+1,ncomp) = al(i,j,domhi[2]+1,ncomp); } - } else if (lo_bc[2] == Interior) { + } else if (lo_bc[2] == amrex::PhysBCType::interior) { // we don't need to do anything here } else { diff --git a/Source/hydro/riemann.cpp b/Source/hydro/riemann.cpp index 8a7a1a7c57..96d2c2e6f0 100644 --- a/Source/hydro/riemann.cpp +++ b/Source/hydro/riemann.cpp @@ -51,12 +51,12 @@ Castro::cmpflx_plus_godunov(const Box& bx, const int* hi_bc = phys_bc.hi(); // do we want to force the flux to zero at the boundary? - const bool special_bnd_lo = (lo_bc[idir] == Symmetry || - lo_bc[idir] == SlipWall || - lo_bc[idir] == NoSlipWall); - const bool special_bnd_hi = (hi_bc[idir] == Symmetry || - hi_bc[idir] == SlipWall || - hi_bc[idir] == NoSlipWall); + const bool special_bnd_lo = (lo_bc[idir] == amrex::PhysBCType::symmetry || + lo_bc[idir] == amrex::PhysBCType::slipwall || + lo_bc[idir] == amrex::PhysBCType::noslipwall); + const bool special_bnd_hi = (hi_bc[idir] == amrex::PhysBCType::symmetry || + hi_bc[idir] == amrex::PhysBCType::slipwall || + hi_bc[idir] == amrex::PhysBCType::noslipwall); auto coord = geom.Coord(); diff --git a/Source/hydro/trace_plm.cpp b/Source/hydro/trace_plm.cpp index 9a1e563e6f..8b075b47eb 100644 --- a/Source/hydro/trace_plm.cpp +++ b/Source/hydro/trace_plm.cpp @@ -37,8 +37,8 @@ Castro::trace_plm(const Box& bx, const int idir, const int* lo_bc = phys_bc.lo(); const int* hi_bc = phys_bc.hi(); - bool lo_symm = lo_bc[idir] == Symmetry; - bool hi_symm = hi_bc[idir] == Symmetry; + bool lo_symm = lo_bc[idir] == amrex::PhysBCType::symmetry; + bool hi_symm = hi_bc[idir] == amrex::PhysBCType::symmetry; const auto domlo = geom.Domain().loVect3d(); const auto domhi = geom.Domain().hiVect3d(); diff --git a/Source/mhd/mhd_plm.cpp b/Source/mhd/mhd_plm.cpp index 99c6dc64e7..2747812513 100644 --- a/Source/mhd/mhd_plm.cpp +++ b/Source/mhd/mhd_plm.cpp @@ -26,8 +26,8 @@ Castro::plm(const Box& bx, const int* lo_bc = phys_bc.lo(); const int* hi_bc = phys_bc.hi(); - bool lo_symm = lo_bc[idir] == Symmetry; - bool hi_symm = hi_bc[idir] == Symmetry; + bool lo_symm = lo_bc[idir] == amrex::PhysBCType::symmetry; + bool hi_symm = hi_bc[idir] == amrex::PhysBCType::symmetry; const auto domlo = geom.Domain().loVect3d(); const auto domhi = geom.Domain().hiVect3d(); diff --git a/Source/particles/CastroParticles.cpp b/Source/particles/CastroParticles.cpp index 10e98b078c..5c3adb1152 100644 --- a/Source/particles/CastroParticles.cpp +++ b/Source/particles/CastroParticles.cpp @@ -137,7 +137,7 @@ Castro::ParticleDerive(const std::string& name, // auto derive_dat = ParticleDerive("particle_count",time,ngrow); - IntVect trr(D_DECL(1,1,1)); + IntVect trr(AMREX_D_DECL(1,1,1)); for (int lev = level+1; lev <= parent->finestLevel(); lev++) { diff --git a/Source/problems/Castro_bc_fill_nd.cpp b/Source/problems/Castro_bc_fill_nd.cpp index fda142da03..f06a7f4236 100644 --- a/Source/problems/Castro_bc_fill_nd.cpp +++ b/Source/problems/Castro_bc_fill_nd.cpp @@ -25,11 +25,11 @@ void ca_statefill(Box const& bx, FArrayBox& data, Vector bcr_noinflow{bcr}; for (auto & bc : bcr_noinflow) { for (int dir = 0; dir < AMREX_SPACEDIM; ++dir) { - if (bc.lo(dir) == EXT_DIR) { - bc.setLo(dir, FOEXTRAP); + if (bc.lo(dir) == amrex::BCType::ext_dir) { + bc.setLo(dir, amrex::BCType::foextrap); } - if (bc.hi(dir) == EXT_DIR) { - bc.setHi(dir, FOEXTRAP); + if (bc.hi(dir) == amrex::BCType::ext_dir) { + bc.setHi(dir, amrex::BCType::foextrap); } } } @@ -62,39 +62,39 @@ void ca_statefill(Box const& bx, FArrayBox& data, // corners. #if AMREX_SPACEDIM == 2 - if ((bcr[URHO].lo(0) == EXT_DIR && bcr[URHO].lo(1) == EXT_DIR) || - (bcr[URHO].lo(0) == EXT_DIR && bcr[URHO].hi(1) == EXT_DIR) || - (bcr[URHO].hi(0) == EXT_DIR && bcr[URHO].lo(1) == EXT_DIR) || - (bcr[URHO].hi(0) == EXT_DIR && bcr[URHO].hi(1) == EXT_DIR)) { + if ((bcr[URHO].lo(0) == amrex::BCType::ext_dir && bcr[URHO].lo(1) == amrex::BCType::ext_dir) || + (bcr[URHO].lo(0) == amrex::BCType::ext_dir && bcr[URHO].hi(1) == amrex::BCType::ext_dir) || + (bcr[URHO].hi(0) == amrex::BCType::ext_dir && bcr[URHO].lo(1) == amrex::BCType::ext_dir) || + (bcr[URHO].hi(0) == amrex::BCType::ext_dir && bcr[URHO].hi(1) == amrex::BCType::ext_dir)) { amrex::Error("Error: external boundaries meeting at a corner not supported"); } #endif #if AMREX_SPACEDIM == 3 - if ((bcr[URHO].lo(0) == EXT_DIR && // xl, yl, zl corner - (bcr[URHO].lo(1) == EXT_DIR || bcr[URHO].lo(2) == EXT_DIR)) || - (bcr[URHO].lo(1) == EXT_DIR && bcr[URHO].lo(2) == EXT_DIR) || - (bcr[URHO].lo(0) == EXT_DIR && // xl, yr, zl corner - (bcr[URHO].hi(1) == EXT_DIR || bcr[URHO].lo(2) == EXT_DIR)) || - (bcr[URHO].hi(1) == EXT_DIR && bcr[URHO].lo(2) == EXT_DIR) || - (bcr[URHO].lo(0) == EXT_DIR && // xl, yl, zr corner - (bcr[URHO].lo(1) == EXT_DIR || bcr[URHO].hi(2) == EXT_DIR)) || - (bcr[URHO].lo(1) == EXT_DIR && bcr[URHO].hi(2) == EXT_DIR) || - (bcr[URHO].lo(0) == EXT_DIR && // xl, yr, zr corner - (bcr[URHO].hi(1) == EXT_DIR || bcr[URHO].hi(2) == EXT_DIR)) || - (bcr[URHO].hi(1) == EXT_DIR && bcr[URHO].hi(2) == EXT_DIR) || - (bcr[URHO].hi(0) == EXT_DIR && // xr, yl, zl corner - (bcr[URHO].lo(1) == EXT_DIR || bcr[URHO].lo(2) == EXT_DIR)) || - (bcr[URHO].lo(1) == EXT_DIR && bcr[URHO].lo(2) == EXT_DIR) || - (bcr[URHO].hi(0) == EXT_DIR && // xr, yr, zl corner - (bcr[URHO].hi(1) == EXT_DIR || bcr[URHO].lo(2) == EXT_DIR)) || - (bcr[URHO].hi(1) == EXT_DIR && bcr[URHO].lo(2) == EXT_DIR) || - (bcr[URHO].hi(0) == EXT_DIR && // xr, yl, zr corner - (bcr[URHO].lo(1) == EXT_DIR || bcr[URHO].hi(2) == EXT_DIR)) || - (bcr[URHO].lo(1) == EXT_DIR && bcr[URHO].hi(2) == EXT_DIR) || - (bcr[URHO].hi(0) == EXT_DIR && // xr, yr, zr corner - (bcr[URHO].hi(1) == EXT_DIR || bcr[URHO].hi(2) == EXT_DIR)) || - (bcr[URHO].hi(1) == EXT_DIR && bcr[URHO].hi(2) == EXT_DIR)) { + if ((bcr[URHO].lo(0) == amrex::BCType::ext_dir && // xl, yl, zl corner + (bcr[URHO].lo(1) == amrex::BCType::ext_dir || bcr[URHO].lo(2) == amrex::BCType::ext_dir)) || + (bcr[URHO].lo(1) == amrex::BCType::ext_dir && bcr[URHO].lo(2) == amrex::BCType::ext_dir) || + (bcr[URHO].lo(0) == amrex::BCType::ext_dir && // xl, yr, zl corner + (bcr[URHO].hi(1) == amrex::BCType::ext_dir || bcr[URHO].lo(2) == amrex::BCType::ext_dir)) || + (bcr[URHO].hi(1) == amrex::BCType::ext_dir && bcr[URHO].lo(2) == amrex::BCType::ext_dir) || + (bcr[URHO].lo(0) == amrex::BCType::ext_dir && // xl, yl, zr corner + (bcr[URHO].lo(1) == amrex::BCType::ext_dir || bcr[URHO].hi(2) == amrex::BCType::ext_dir)) || + (bcr[URHO].lo(1) == amrex::BCType::ext_dir && bcr[URHO].hi(2) == amrex::BCType::ext_dir) || + (bcr[URHO].lo(0) == amrex::BCType::ext_dir && // xl, yr, zr corner + (bcr[URHO].hi(1) == amrex::BCType::ext_dir || bcr[URHO].hi(2) == amrex::BCType::ext_dir)) || + (bcr[URHO].hi(1) == amrex::BCType::ext_dir && bcr[URHO].hi(2) == amrex::BCType::ext_dir) || + (bcr[URHO].hi(0) == amrex::BCType::ext_dir && // xr, yl, zl corner + (bcr[URHO].lo(1) == amrex::BCType::ext_dir || bcr[URHO].lo(2) == amrex::BCType::ext_dir)) || + (bcr[URHO].lo(1) == amrex::BCType::ext_dir && bcr[URHO].lo(2) == amrex::BCType::ext_dir) || + (bcr[URHO].hi(0) == amrex::BCType::ext_dir && // xr, yr, zl corner + (bcr[URHO].hi(1) == amrex::BCType::ext_dir || bcr[URHO].lo(2) == amrex::BCType::ext_dir)) || + (bcr[URHO].hi(1) == amrex::BCType::ext_dir && bcr[URHO].lo(2) == amrex::BCType::ext_dir) || + (bcr[URHO].hi(0) == amrex::BCType::ext_dir && // xr, yl, zr corner + (bcr[URHO].lo(1) == amrex::BCType::ext_dir || bcr[URHO].hi(2) == amrex::BCType::ext_dir)) || + (bcr[URHO].lo(1) == amrex::BCType::ext_dir && bcr[URHO].hi(2) == amrex::BCType::ext_dir) || + (bcr[URHO].hi(0) == amrex::BCType::ext_dir && // xr, yr, zr corner + (bcr[URHO].hi(1) == amrex::BCType::ext_dir || bcr[URHO].hi(2) == amrex::BCType::ext_dir)) || + (bcr[URHO].hi(1) == amrex::BCType::ext_dir && bcr[URHO].hi(2) == amrex::BCType::ext_dir)) { amrex::Error("Error: external boundaries meeting at a corner not supported"); } #endif diff --git a/Source/problems/ambient_fill.cpp b/Source/problems/ambient_fill.cpp index 14f30ab302..c5cb7cc701 100644 --- a/Source/problems/ambient_fill.cpp +++ b/Source/problems/ambient_fill.cpp @@ -17,22 +17,22 @@ ambient_denfill(const Box& bx, Array4 const& state, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { bool ambient_x_lo = (castro::ambient_fill_dir == 0 || castro::ambient_fill_dir == -1) && - (bc.lo(0) == FOEXTRAP || bc.lo(0) == HOEXTRAP); + (bc.lo(0) == amrex::BCType::foextrap || bc.lo(0) == amrex::BCType::hoextrap); bool ambient_x_hi = (castro::ambient_fill_dir == 0 || castro::ambient_fill_dir == -1) && - (bc.hi(0) == FOEXTRAP || bc.hi(0) == HOEXTRAP); + (bc.hi(0) == amrex::BCType::foextrap || bc.hi(0) == amrex::BCType::hoextrap); #if AMREX_SPACEDIM >= 2 bool ambient_y_lo = (castro::ambient_fill_dir == 1 || castro::ambient_fill_dir == -1) && - (bc.lo(1) == FOEXTRAP || bc.lo(1) == HOEXTRAP); + (bc.lo(1) == amrex::BCType::foextrap || bc.lo(1) == amrex::BCType::hoextrap); bool ambient_y_hi = (castro::ambient_fill_dir == 1 || castro::ambient_fill_dir == -1) && - (bc.hi(1) == FOEXTRAP || bc.hi(1) == HOEXTRAP); + (bc.hi(1) == amrex::BCType::foextrap || bc.hi(1) == amrex::BCType::hoextrap); #endif #if AMREX_SPACEDIM == 3 bool ambient_z_lo = (castro::ambient_fill_dir == 2 || castro::ambient_fill_dir == -1) && - (bc.lo(2) == FOEXTRAP || bc.lo(2) == HOEXTRAP); + (bc.lo(2) == amrex::BCType::foextrap || bc.lo(2) == amrex::BCType::hoextrap); bool ambient_z_hi = (castro::ambient_fill_dir == 2 || castro::ambient_fill_dir == -1) && - (bc.hi(2) == FOEXTRAP || bc.hi(2) == HOEXTRAP); + (bc.hi(2) == amrex::BCType::foextrap || bc.hi(2) == amrex::BCType::hoextrap); #endif if (castro::fill_ambient_bc == 1) { @@ -76,22 +76,22 @@ ambient_fill(const Box& bx, Array4 const& state, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { bool ambient_x_lo = (castro::ambient_fill_dir == 0 || castro::ambient_fill_dir == -1) && - (bcs(URHO).lo(0) == FOEXTRAP || bcs(URHO).lo(0) == HOEXTRAP); + (bcs(URHO).lo(0) == amrex::BCType::foextrap || bcs(URHO).lo(0) == amrex::BCType::hoextrap); bool ambient_x_hi = (castro::ambient_fill_dir == 0 || castro::ambient_fill_dir == -1) && - (bcs(URHO).hi(0) == FOEXTRAP || bcs(URHO).hi(0) == HOEXTRAP); + (bcs(URHO).hi(0) == amrex::BCType::foextrap || bcs(URHO).hi(0) == amrex::BCType::hoextrap); #if AMREX_SPACEDIM >= 2 bool ambient_y_lo = (castro::ambient_fill_dir == 1 || castro::ambient_fill_dir == -1) && - (bcs(URHO).lo(1) == FOEXTRAP || bcs(URHO).lo(1) == HOEXTRAP); + (bcs(URHO).lo(1) == amrex::BCType::foextrap || bcs(URHO).lo(1) == amrex::BCType::hoextrap); bool ambient_y_hi = (castro::ambient_fill_dir == 1 || castro::ambient_fill_dir == -1) && - (bcs(URHO).hi(1) == FOEXTRAP || bcs(URHO).hi(1) == HOEXTRAP); + (bcs(URHO).hi(1) == amrex::BCType::foextrap || bcs(URHO).hi(1) == amrex::BCType::hoextrap); #endif #if AMREX_SPACEDIM == 3 bool ambient_z_lo = (castro::ambient_fill_dir == 2 || castro::ambient_fill_dir == -1) && - (bcs(URHO).lo(2) == FOEXTRAP || bcs(URHO).lo(2) == HOEXTRAP); + (bcs(URHO).lo(2) == amrex::BCType::foextrap || bcs(URHO).lo(2) == amrex::BCType::hoextrap); bool ambient_z_hi = (castro::ambient_fill_dir == 2 || castro::ambient_fill_dir == -1) && - (bcs(URHO).hi(2) == FOEXTRAP || bcs(URHO).hi(2) == HOEXTRAP); + (bcs(URHO).hi(2) == amrex::BCType::foextrap || bcs(URHO).hi(2) == amrex::BCType::hoextrap); #endif if (castro::fill_ambient_bc == 1) { diff --git a/Source/problems/hse_fill.cpp b/Source/problems/hse_fill.cpp index 6d210fdd34..b9d2c6ab77 100644 --- a/Source/problems/hse_fill.cpp +++ b/Source/problems/hse_fill.cpp @@ -36,7 +36,7 @@ hse_fill(const Box& bx, Array4 const& adv, // XLO - if (bcr[URHO].lo(0) == EXT_DIR && lo[0] < domlo[0]) { + if (bcr[URHO].lo(0) == amrex::BCType::ext_dir && lo[0] < domlo[0]) { if (xl_ext_bc_type == EXT_HSE) { @@ -44,8 +44,8 @@ hse_fill(const Box& bx, Array4 const& adv, // to domlo[0]-1, but we want that to be handled by a // single thread on the GPU - Box gbx(IntVect(D_DECL(domlo[0]-1, lo[1], lo[2])), - IntVect(D_DECL(domlo[0]-1, hi[1], hi[2]))); + Box gbx(IntVect(AMREX_D_DECL(domlo[0]-1, lo[1], lo[2])), + IntVect(AMREX_D_DECL(domlo[0]-1, hi[1], hi[2]))); amrex::ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept @@ -236,12 +236,12 @@ hse_fill(const Box& bx, Array4 const& adv, // XHI - if (bcr[URHO].hi(0) == EXT_DIR && hi[0] > domhi[0]) { + if (bcr[URHO].hi(0) == amrex::BCType::ext_dir && hi[0] > domhi[0]) { if (xr_ext_bc_type == EXT_HSE) { - Box gbx(IntVect(D_DECL(domhi[0]+1, lo[1], lo[2])), - IntVect(D_DECL(domhi[0]+1, hi[1], hi[2]))); + Box gbx(IntVect(AMREX_D_DECL(domhi[0]+1, lo[1], lo[2])), + IntVect(AMREX_D_DECL(domhi[0]+1, hi[1], hi[2]))); amrex::ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept @@ -432,12 +432,12 @@ hse_fill(const Box& bx, Array4 const& adv, // YLO - if (bcr[URHO].lo(1) == EXT_DIR && lo[1] < domlo[1]) { + if (bcr[URHO].lo(1) == amrex::BCType::ext_dir && lo[1] < domlo[1]) { if (yl_ext_bc_type == EXT_HSE) { - Box gbx(IntVect(D_DECL(lo[0], domlo[1]-1, lo[2])), - IntVect(D_DECL(hi[0], domlo[1]-1, hi[2]))); + Box gbx(IntVect(AMREX_D_DECL(lo[0], domlo[1]-1, lo[2])), + IntVect(AMREX_D_DECL(hi[0], domlo[1]-1, hi[2]))); amrex::ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept @@ -626,12 +626,12 @@ hse_fill(const Box& bx, Array4 const& adv, // YHI - if (bcr[URHO].hi(1) == EXT_DIR && hi[1] > domhi[1]) { + if (bcr[URHO].hi(1) == amrex::BCType::ext_dir && hi[1] > domhi[1]) { if (yr_ext_bc_type == EXT_HSE) { - Box gbx(IntVect(D_DECL(lo[0], domhi[1]+1, lo[2])), - IntVect(D_DECL(hi[0], domhi[1]+1, hi[2]))); + Box gbx(IntVect(AMREX_D_DECL(lo[0], domhi[1]+1, lo[2])), + IntVect(AMREX_D_DECL(hi[0], domhi[1]+1, hi[2]))); amrex::ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept @@ -821,12 +821,12 @@ hse_fill(const Box& bx, Array4 const& adv, // ZLO - if (bcr[URHO].lo(2) == EXT_DIR && lo[2] < domlo[2]) { + if (bcr[URHO].lo(2) == amrex::BCType::ext_dir && lo[2] < domlo[2]) { if (zl_ext_bc_type == EXT_HSE) { - Box gbx(IntVect(D_DECL(lo[0], lo[1], domlo[2]-1)), - IntVect(D_DECL(hi[0], hi[1], domlo[2]-1))); + Box gbx(IntVect(AMREX_D_DECL(lo[0], lo[1], domlo[2]-1)), + IntVect(AMREX_D_DECL(hi[0], hi[1], domlo[2]-1))); amrex::ParallelFor(gbx, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept @@ -1012,7 +1012,7 @@ hse_fill(const Box& bx, Array4 const& adv, // ZHI - if (bcr[URHO].hi(2) == EXT_DIR && hi[2] > domhi[2]) { + if (bcr[URHO].hi(2) == amrex::BCType::ext_dir && hi[2] > domhi[2]) { if (zr_ext_bc_type == EXT_HSE) { #ifndef AMREX_USE_GPU diff --git a/Source/radiation/HABEC.H b/Source/radiation/HABEC.H index 3039e759d3..2bd6e7aabb 100644 --- a/Source/radiation/HABEC.H +++ b/Source/radiation/HABEC.H @@ -89,7 +89,7 @@ namespace HABEC Real bfv, bfm, bfm2; - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { Real h2 = 0.5e0_rt * h; Real th2 = 3.e0_rt * h2; @@ -306,7 +306,7 @@ namespace HABEC else { bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; th2 = 3.e0_rt * h2; @@ -319,12 +319,12 @@ namespace HABEC bfm = bfv; } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfv = beta * r; bfm = 0.e0_rt; bfm2 = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * beta * r; if (bho >= 1) { bfm = 0.375e0_rt * c * bfv; @@ -334,7 +334,7 @@ namespace HABEC bfm = 0.25e0_rt * c * bfv; } } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r; if (bho >= 1) { bfm = 1.5e0_rt * spa(i,j,k) * c * bfv; @@ -457,7 +457,7 @@ namespace HABEC { if (mask.contains(i+icp,j+jcp,k+kcp)) { if (mask(i+icp,j+jcp,k+kcp) > 0) { - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { Real d_sign = 1.0_rt; if (iep != 0 || jep != 0 || kep != 0) { // right edge @@ -568,7 +568,7 @@ namespace HABEC else { bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { Real d_sign = 1.0_rt; if (iep != 0 || jep != 0 || kep != 0) { // right edge @@ -576,7 +576,7 @@ namespace HABEC } dterm(i+iep,j+jep,k+kep) = d(i+iep,j+jep,k+kep) * d_sign * (er(i,j,k) - bcval(i+icp,j+jcp,k+kcp)) / (0.5_rt * h + bcl); } - else if (bct == LO_NEUMANN && bcval(i+icp,j+jcp,k+kcp) == 0.0_rt) { + else if (bct == AMREX_LO_NEUMANN && bcval(i+icp,j+jcp,k+kcp) == 0.0_rt) { dterm(i+iep,j+jep,k+kep) = 0.0_rt; } } diff --git a/Source/radiation/HypreABec.cpp b/Source/radiation/HypreABec.cpp index 6461c2ff2f..d8ab7d5a4a 100644 --- a/Source/radiation/HypreABec.cpp +++ b/Source/radiation/HypreABec.cpp @@ -507,11 +507,11 @@ void HypreABec::hbmat (const Box& bx, Real bfv, bfm; - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { bfv = fac * h / (0.5e0_rt * h + bcl); bfm = bfv - fac; } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfv = beta / h; bfm = -fac; } @@ -691,18 +691,18 @@ void HypreABec::hbmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { bfv = fac * h / (0.5e0_rt * h + bcl); bfm = bfv * b(i,j,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * beta * r / h; bfm = 0.25e0_rt * c * bfv; } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; bfm = spa(i,j,k) * c * bfv; } @@ -729,18 +729,18 @@ void HypreABec::hbmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { bfv = fac * h / (0.5e0_rt * h + bcl); bfm = bfv * b(i+1,j,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * beta * r / h; bfm = 0.25e0_rt * c * bfv; } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; bfm = spa(i,j,k) * c * bfv; } @@ -766,18 +766,18 @@ void HypreABec::hbmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { bfv = fac * h / (0.5e0_rt * h + bcl); bfm = bfv * b(i,j,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * beta * r / h; bfm = 0.25e0_rt * c * bfv; } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; bfm = spa(i,j,k) * c * bfv; } @@ -804,18 +804,18 @@ void HypreABec::hbmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { bfv = fac * h / (0.5e0_rt * h + bcl); bfm = bfv * b(i,j+1,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * beta * r / h; bfm = 0.25e0_rt * c * bfv; } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; bfm = spa(i,j,k) * c * bfv; } @@ -842,18 +842,18 @@ void HypreABec::hbmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { bfv = fac * h / (0.5e0_rt * h + bcl); bfm = bfv * b(i,j,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * beta * r / h; bfm = 0.25e0_rt * c * bfv; } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; bfm = spa(i,j,k) * c * bfv; } @@ -880,18 +880,18 @@ void HypreABec::hbmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { bfv = fac * h / (0.5e0_rt * h + bcl); bfm = bfv * b(i,j,k+1); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * beta * r / h; bfm = 0.25e0_rt * c * bfv; } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; bfm = spa(i,j,k) * c * bfv; } @@ -1275,7 +1275,7 @@ void HypreABec::hbvec3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; th2 = 3.e0_rt * h2; @@ -1287,10 +1287,10 @@ void HypreABec::hbvec3 (const Box& bx, bfv = bfv * b(i,j,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfv = beta * r / h; } - else if (bct == LO_MARSHAK || bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_MARSHAK || bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; } #ifndef AMREX_USE_GPU @@ -1315,7 +1315,7 @@ void HypreABec::hbvec3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; th2 = 3.e0_rt * h2; @@ -1327,10 +1327,10 @@ void HypreABec::hbvec3 (const Box& bx, bfv = bfv * b(i+1,j,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfv = beta * r / h; } - else if (bct == LO_MARSHAK || bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_MARSHAK || bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; } #ifndef AMREX_USE_GPU @@ -1355,7 +1355,7 @@ void HypreABec::hbvec3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; th2 = 3.e0_rt * h2; @@ -1367,10 +1367,10 @@ void HypreABec::hbvec3 (const Box& bx, bfv = bfv * b(i,j,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfv = beta * r / h; } - else if (bct == LO_MARSHAK || bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_MARSHAK || bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; } #ifndef AMREX_USE_GPU @@ -1395,7 +1395,7 @@ void HypreABec::hbvec3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; th2 = 3.e0_rt * h2; @@ -1407,10 +1407,10 @@ void HypreABec::hbvec3 (const Box& bx, bfv = bfv * b(i,j+1,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfv = beta * r / h; } - else if (bct == LO_MARSHAK || bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_MARSHAK || bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; } #ifndef AMREX_USE_GPU @@ -1435,7 +1435,7 @@ void HypreABec::hbvec3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; th2 = 3.e0_rt * h2; @@ -1447,10 +1447,10 @@ void HypreABec::hbvec3 (const Box& bx, bfv = bfv * b(i,j,k); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfv = beta * r / h; } - else if (bct == LO_MARSHAK || bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_MARSHAK || bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; } #ifndef AMREX_USE_GPU @@ -1475,7 +1475,7 @@ void HypreABec::hbvec3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; th2 = 3.e0_rt * h2; @@ -1487,10 +1487,10 @@ void HypreABec::hbvec3 (const Box& bx, bfv = bfv * b(i,j,k+1); } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfv = beta * r / h; } - else if (bct == LO_MARSHAK || bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_MARSHAK || bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * beta * r / h; } #ifndef AMREX_USE_GPU @@ -1591,7 +1591,7 @@ void HypreABec::hbvec (const Box& bx, } } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; th2 = 3.e0_rt * h2; @@ -1601,7 +1601,7 @@ void HypreABec::hbvec (const Box& bx, bfv = (beta / h) / (0.5e0_rt * h + bcl); } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfv = beta / h; } else { diff --git a/Source/radiation/HypreExtMultiABec.cpp b/Source/radiation/HypreExtMultiABec.cpp index a65292751a..0930849b3e 100644 --- a/Source/radiation/HypreExtMultiABec.cpp +++ b/Source/radiation/HypreExtMultiABec.cpp @@ -423,7 +423,7 @@ void HypreExtMultiABec::loadMatrix() if (reg[ori] == domain[ori] && bd[level]->mixedBndry(ori)) { bct = (*(bd[level]->bndryTypes(ori)[i]))(v+vin); } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho == 1) { evalue(ori,i)(v+vin).push(level, v, (bcl * th2) / (h * (bcl + h2))); @@ -478,10 +478,10 @@ void HypreExtMultiABec::loadMatrix() entry(ori,i)(v).push(&(*ederiv[level])(ori,i)(v+vin), fac); } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { // no more action required here } - else if (bct == LO_MARSHAK || bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_MARSHAK || bct == AMREX_LO_SANCHEZ_POMRANING) { if (bho == 1) { evalue(ori,i)(v+vin).push(level, v, 1.5); evalue(ori,i)(v+vin).push(level, v-vin, -0.5); @@ -937,7 +937,7 @@ void HypreExtMultiABec::loadLevelVectorB(int level, if (reg[ori] == domain[ori] && bd[level]->mixedBndry(ori)) { bct = (*(bd[level]->bndryTypes(ori)[i]))(v+vin); } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { Real dfac, vfac; if (bho == 1) { dfac = 1.0 / ((bcl + h2) * (bcl + th2)); @@ -991,7 +991,7 @@ void HypreExtMultiABec::loadLevelVectorB(int level, HYPRE_SStructVectorAddToValues(b, part, getV1(v), 0, &tmp); } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { // cmult should be c for photons, 1 for neutrinos Real cmult = 1.0; Real xi = 0.0; // xi should be passed in through RadBndry? @@ -1000,7 +1000,7 @@ void HypreExtMultiABec::loadLevelVectorB(int level, cmult * fs(v+vin,bdcomp)); HYPRE_SStructVectorAddToValues(b, part, getV1(v), 0, &tmp); } - else if (bct == LO_MARSHAK || bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_MARSHAK || bct == AMREX_LO_SANCHEZ_POMRANING) { // cmult should be c for photons, 1 for neutrinos Real cmult = 1.0; Real xi = 0.0; // xi should be passed in through RadBndry? diff --git a/Source/radiation/HypreMultiABec.cpp b/Source/radiation/HypreMultiABec.cpp index 5f5e749255..aa27b902b1 100644 --- a/Source/radiation/HypreMultiABec.cpp +++ b/Source/radiation/HypreMultiABec.cpp @@ -785,9 +785,9 @@ void HypreMultiABec::addLevel(int level, static void TransverseInterpolant(AuxVarBox& cintrp, const Mask& msk, const Box& reg, const Box& creg, - D_DECL(const IntVect& rat, const IntVect& vj1, const IntVect& vk1), - D_DECL(const IntVect& ve, const IntVect& vjr, const IntVect& vkr), - D_DECL(int idir, int jdir, int kdir), + AMREX_D_DECL(const IntVect& rat, const IntVect& vj1, const IntVect& vk1), + AMREX_D_DECL(const IntVect& ve, const IntVect& vjr, const IntVect& vkr), + AMREX_D_DECL(int idir, int jdir, int kdir), int clevel) { for (IntVect vc = creg.smallEnd(); vc <= creg.bigEnd(); creg.next(vc)) { @@ -1070,9 +1070,9 @@ void HypreMultiABec::buildMatrixStructure() const Mask &msk = bd[level]->bndryMasks(ori,i); TransverseInterpolant((*cintrp[level])(ori,i), msk, reg, creg, - D_DECL(rat, vj1, vk1), - D_DECL(ve, vjr, vkr), - D_DECL(idir, jdir, kdir), + AMREX_D_DECL(rat, vj1, vk1), + AMREX_D_DECL(ve, vjr, vkr), + AMREX_D_DECL(idir, jdir, kdir), level-1); NormalDerivative((*ederiv[level])(ori,i), @@ -1192,9 +1192,9 @@ void HypreMultiABec::buildMatrixStructure() const Mask &msk = c_cintrp[level]->mask(ori,i,j); // fine mask TransverseInterpolant((*c_cintrp[level])(ori,i,j), msk, reg, creg, - D_DECL(rat, vj1, vk1), - D_DECL(ve, vjr, vkr), - D_DECL(idir, jdir, kdir), + AMREX_D_DECL(rat, vj1, vk1), + AMREX_D_DECL(ve, vjr, vkr), + AMREX_D_DECL(idir, jdir, kdir), level-1); NormalDerivative((*c_ederiv[level])(ori,i,j), @@ -1502,7 +1502,7 @@ HypreMultiABec::hmmat (const Box& bx, Real bfm, bfv; Real bfm2, h2, th2; - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { @@ -1520,7 +1520,7 @@ HypreMultiABec::hmmat (const Box& bx, } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = -fac; bfm2 = 0.e0_rt; @@ -1739,7 +1739,7 @@ HypreMultiABec::hmmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; @@ -1753,13 +1753,13 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; bfm2 = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * c * beta * r / h; @@ -1772,7 +1772,7 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * c * beta * r / h; @@ -1813,7 +1813,7 @@ HypreMultiABec::hmmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; @@ -1827,13 +1827,13 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; bfm2 = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * c * beta * r / h; @@ -1846,7 +1846,7 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * c * beta * r / h; @@ -1887,7 +1887,7 @@ HypreMultiABec::hmmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; @@ -1901,13 +1901,13 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; bfm2 = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * c * beta * r / h; @@ -1920,7 +1920,7 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * c * beta * r / h; @@ -1961,7 +1961,7 @@ HypreMultiABec::hmmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; @@ -1975,13 +1975,13 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; bfm2 = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * c * beta * r / h; @@ -1994,7 +1994,7 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * c * beta * r / h; @@ -2035,7 +2035,7 @@ HypreMultiABec::hmmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; @@ -2049,13 +2049,13 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; bfm2 = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * c * beta * r / h; @@ -2068,7 +2068,7 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * c * beta * r / h; @@ -2109,7 +2109,7 @@ HypreMultiABec::hmmat3 (const Box& bx, bct = bctype; } - if (bct == LO_DIRICHLET) { + if (bct == AMREX_LO_DIRICHLET) { if (bho >= 1) { h2 = 0.5e0_rt * h; @@ -2123,13 +2123,13 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_NEUMANN) { + else if (bct == AMREX_LO_NEUMANN) { bfm = 0.e0_rt; bfm2 = 0.e0_rt; } - else if (bct == LO_MARSHAK) { + else if (bct == AMREX_LO_MARSHAK) { bfv = 2.e0_rt * c * beta * r / h; @@ -2142,7 +2142,7 @@ HypreMultiABec::hmmat3 (const Box& bx, } } - else if (bct == LO_SANCHEZ_POMRANING) { + else if (bct == AMREX_LO_SANCHEZ_POMRANING) { bfv = 2.e0_rt * c * beta * r / h; @@ -2286,7 +2286,7 @@ void HypreMultiABec::loadMatrix() // level in the current linear system. Zero out the interior // stencil using Neumann BC: - const RadBoundCond bct_coarse = LO_NEUMANN; + const RadBoundCond bct_coarse = AMREX_LO_NEUMANN; hmmat(reg, matfab.array(), cdir, bct_coarse, bho, bcl, msk.array(), (*bcoefs[level])[idim][mfi].array(), beta, geom[level].CellSize()); diff --git a/Source/radiation/MGFLDRadSolver.cpp b/Source/radiation/MGFLDRadSolver.cpp index 250de9b1ae..3bb6187791 100644 --- a/Source/radiation/MGFLDRadSolver.cpp +++ b/Source/radiation/MGFLDRadSolver.cpp @@ -147,8 +147,8 @@ void Radiation::MGFLD_implicit_update(int level, int iteration, int ncycle) for (int idim=0; idim(value_nu[igroup], igroup); } @@ -240,7 +240,7 @@ void MGRadBndry::setBndryFluxConds(const BCRec& bc, const BC_Mode phys_bc_mode) BaseFab& tfab = *(bctypearray[face][i]); FORT_RADBNDRY2(BL_TO_FORTRAN(bnd_fab), - tfab.dataPtr(), ARLIM(domain.loVect()), ARLIM(domain.hiVect()), dx, xlo, time); + tfab.dataPtr(), AMREX_ARLIM(domain.loVect()), AMREX_ARLIM(domain.hiVect()), dx, xlo, time); #endif if (p_bcflag == 0) { // Homogeneous case. We called RADBNDRY2 only to set tfab right. diff --git a/Source/radiation/RadBndry.cpp b/Source/radiation/RadBndry.cpp index aa742febef..24079fd85f 100644 --- a/Source/radiation/RadBndry.cpp +++ b/Source/radiation/RadBndry.cpp @@ -46,7 +46,7 @@ RadBndry::RadBndry(const BoxArray& _grids, const DistributionMapping& _dmap, #if 0 FORT_RADBNDRY2(BL_TO_FORTRAN(bndry[face][bi]), bctypearray[face][igrid]->dataPtr(), - ARLIM(domain.loVect()), ARLIM(domain.hiVect()), dx, xlo, time); + AMREX_ARLIM(domain.loVect()), AMREX_ARLIM(domain.hiVect()), dx, xlo, time); #endif } } @@ -143,25 +143,25 @@ void RadBndry::setBndryConds(const BCRec& bc, if (domain[face] == grd[face] && !geom.isPeriodic(dir)) { /* // All physical bc values are located on face - if (p_bc == EXT_DIR) { - bctag[i] = LO_DIRICHLET; + if (p_bc == amrex::BCType::ext_dir) { + bctag[i] = AMREX_LO_DIRICHLET; bloc[i] = 0.; } - else if (p_bc == EXTRAP || p_bc == HOEXTRAP || p_bc == REFLECT_EVEN) { - bctag[i] = LO_NEUMANN; + else if (p_bc == EXTRAP || p_bc == amrex::BCType::hoextrap || p_bc == amrex::BCType::reflect_even) { + bctag[i] = AMREX_LO_NEUMANN; bloc[i] = 0.; } - else if (p_bc == REFLECT_ODD) { - bctag[i] = LO_REFLECT_ODD; + else if (p_bc == amrex::BCType::reflect_odd) { + bctag[i] = AMREX_LO_REFLECT_ODD; bloc[i] = 0.; } */ - if (p_bc == LO_DIRICHLET || p_bc == LO_NEUMANN || - p_bc == LO_REFLECT_ODD) { + if (p_bc == AMREX_LO_DIRICHLET || p_bc == AMREX_LO_NEUMANN || + p_bc == AMREX_LO_REFLECT_ODD) { bctag[i] = p_bc; bloc[i] = 0.; } - else if (p_bc == LO_MARSHAK || p_bc == LO_SANCHEZ_POMRANING) { + else if (p_bc == AMREX_LO_MARSHAK || p_bc == AMREX_LO_SANCHEZ_POMRANING) { bctag[i] = p_bc; //gives asymmetric, second-order version of Marshak b.c. // (worked for bbmg, works with nonsymmetric hypre solvers): @@ -177,7 +177,7 @@ void RadBndry::setBndryConds(const BCRec& bc, } else { // internal bndry - bctag[i] = LO_DIRICHLET; + bctag[i] = AMREX_LO_DIRICHLET; bloc[i] = 0.5*delta; } } @@ -211,8 +211,8 @@ void RadBndry::setBndryFluxConds(const BCRec& bc, const BC_Mode phys_bc_mode) if (domain[face] == grd[face] && !geom.isPeriodic(dir)) { if (bcflag[face] <= 1) { - if (p_bc == LO_MARSHAK || p_bc == LO_SANCHEZ_POMRANING || - p_bc == LO_DIRICHLET || p_bc == LO_NEUMANN) { + if (p_bc == AMREX_LO_MARSHAK || p_bc == AMREX_LO_SANCHEZ_POMRANING || + p_bc == AMREX_LO_DIRICHLET || p_bc == AMREX_LO_NEUMANN) { setValue(face, i, value); } } @@ -227,7 +227,7 @@ void RadBndry::setBndryFluxConds(const BCRec& bc, const BC_Mode phys_bc_mode) BaseFab& tfab = bctypearray[face][i]; FORT_RADBNDRY2(BL_TO_FORTRAN(bnd_fab), tfab.dataPtr(), - ARLIM(domain.loVect()), ARLIM(domain.hiVect()), dx, xlo, time); + AMREX_ARLIM(domain.loVect()), AMREX_ARLIM(domain.hiVect()), dx, xlo, time); if (p_bcflag == 0) { // Homogeneous case. We called RADBNDRY2 only to set tfab right. setValue(face, i, value); diff --git a/Source/radiation/RadSolve.cpp b/Source/radiation/RadSolve.cpp index 372384d415..40a84b59a0 100644 --- a/Source/radiation/RadSolve.cpp +++ b/Source/radiation/RadSolve.cpp @@ -261,12 +261,12 @@ void RadSolve::levelSPas(int level, Array& lambda, int bool nexttoboundary=false; for (int idim=0; idimGeom(level).CellSize(); - const Real volume = D_TERM(dx[0], * dx[1], * dx[2]); + const Real volume = AMREX_D_TERM(dx[0], * dx[1], * dx[2]); if (flux_in) { for (int n = 0; n < AMREX_SPACEDIM; n++) { diff --git a/Source/radiation/SGRadSolver.cpp b/Source/radiation/SGRadSolver.cpp index eca2c5db37..0cf0b76904 100644 --- a/Source/radiation/SGRadSolver.cpp +++ b/Source/radiation/SGRadSolver.cpp @@ -129,8 +129,8 @@ void Radiation::single_group_update(int level, int iteration, int ncycle) for (int idim=0; idim