Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Aug 19, 2024
1 parent 29df0eb commit d074a64
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
6 changes: 3 additions & 3 deletions Source/hydro/Castro_mol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ Castro::mol_ppm_reconstruct(const Box& bx,
const auto domhi = geom.Domain().hiVect3d();

const auto dx = geom.CellSizeArray();
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;

bool is_axisymmetric = geom.Coord() == 1
;
Expand Down
16 changes: 8 additions & 8 deletions Source/hydro/ppm.H
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ ppm_reconstruct(const Real* s,
Real dsvl_l = 0.0_rt;
if (dsl*dsr > 0.0_rt) {
Real dsc = 0.5_rt * (s[i0] - s[im2]);
dsvl_l = std::copysign(1.0_rt, dsc) * amrex::min(std::abs(dsc),amrex::min(std::abs(dsl),std::abs(dsr)));
dsvl_l = std::copysign(1.0_rt, dsc) * amrex::min(std::abs(dsc), std::abs(dsl), std::abs(dsr));
}

dsl = 2.0_rt * (s[i0] - s[im1]);
Expand All @@ -148,7 +148,7 @@ ppm_reconstruct(const Real* s,
Real dsvl_r = 0.0_rt;
if (dsl*dsr > 0.0_rt) {
Real dsc = 0.5_rt * (s[ip1] - s[im1]);
dsvl_r = std::copysign(1.0_rt, dsc) * amrex::min(std::abs(dsc),amrex::min(std::abs(dsl),std::abs(dsr)));
dsvl_r = std::copysign(1.0_rt, dsc) * amrex::min(std::abs(dsc), std::abs(dsl), std::abs(dsr));
}

// Interpolate s to edges
Expand All @@ -159,8 +159,8 @@ ppm_reconstruct(const Real* s,

// Make sure sedge lies in between adjacent cell-centered values

sm = amrex::max(sm, amrex::min(s[i0], s[im1]));
sm = amrex::min(sm, amrex::max(s[i0], s[im1]));
sm = std::clamp(sm, std::min(s[i0], s[im1]), std::max(s[i0], s[im1]));

}

// now we compute s_{i+1/2} -- the right interface value for zone i
Expand Down Expand Up @@ -233,7 +233,7 @@ ppm_reconstruct(const Real* s,
Real dsvl_l = 0.0_rt;
if (dsl*dsr > 0.0_rt) {
Real dsc = 0.5_rt * (s[ip1] - s[im1]);
dsvl_l = std::copysign(1.0_rt, dsc) * amrex::min(std::abs(dsc), amrex::min(std::abs(dsl),std::abs(dsr)));
dsvl_l = std::copysign(1.0_rt, dsc) * amrex::min(std::abs(dsc), std::abs(dsl), std::abs(dsr));
}

dsl = 2.0_rt * (s[ip1] - s[i0]);
Expand All @@ -242,7 +242,7 @@ ppm_reconstruct(const Real* s,
Real dsvl_r = 0.0_rt;
if (dsl*dsr > 0.0_rt) {
Real dsc = 0.5_rt * (s[ip2] - s[i0]);
dsvl_r = std::copysign(1.0_rt, dsc) * amrex::min(std::abs(dsc), amrex::min(std::abs(dsl),std::abs(dsr)));
dsvl_r = std::copysign(1.0_rt, dsc) * amrex::min(std::abs(dsc), std::abs(dsl), std::abs(dsr));
}

// Interpolate s to edges
Expand All @@ -253,8 +253,8 @@ ppm_reconstruct(const Real* s,

// Make sure sedge lies in between adjacent cell-centered values

sp = amrex::max(sp, amrex::min(s[ip1], s[i0]));
sp = amrex::min(sp, amrex::max(s[ip1], s[i0]));
sp = std::clamp(sp, std::min(s[ip1], s[i0]), std::max(s[ip1], s[i0]));

}

// Flatten the parabola
Expand Down
6 changes: 2 additions & 4 deletions Source/hydro/trace_ppm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ Castro::trace_ppm(const Box& bx,
const auto domlo = geom.Domain().loVect3d();
const auto domhi = geom.Domain().hiVect3d();

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;


// Trace to left and right edges using upwind PPM
Expand Down Expand Up @@ -651,5 +651,3 @@ Castro::trace_ppm(const Box& bx,

});
}


0 comments on commit d074a64

Please sign in to comment.