diff --git a/Exec/science/wdmerger/Prob.cpp b/Exec/science/wdmerger/Prob.cpp index c2e4c7aedb..3ca92d858a 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/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/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/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();