Skip to content

Commit

Permalink
fix compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahm-LANL committed Dec 12, 2023
1 parent b2b7881 commit 2ddcf10
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions benchmarks/burgers/burgers_package.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin) {
for (int d = 1; d <= 3; ++d) {
mesh_mins.push_back(pin->GetReal("parthenon/mesh", "x" + std::to_string(d) + "min"));
mesh_maxs.push_back(pin->GetReal("parthenon/mesh", "x" + std::to_string(d) + "max"));
vol *= (mesh_maxs.back() - mesh_mins.back());
mesh_vol *= (mesh_maxs.back() - mesh_mins.back());
mesh_mids.push_back(0.5 * (mesh_mins.back() + mesh_maxs.back()));
}
pkg->AddParam("mesh_volume", mesh_vol);
Expand Down Expand Up @@ -170,7 +170,7 @@ void CalculateDerived(MeshData<Real> *md) {
// provide the routine that estimates a stable timestep for this package
Real EstimateTimestepMesh(MeshData<Real> *md) {
Kokkos::Profiling::pushRegion("Task_burgers_EstimateTimestepMesh");
auto pm = md->GetParentPointer();
Mesh *pm = md->GetMeshPointer();
IndexRange ib = md->GetBoundsI(IndexDomain::interior);
IndexRange jb = md->GetBoundsJ(IndexDomain::interior);
IndexRange kb = md->GetBoundsK(IndexDomain::interior);
Expand Down Expand Up @@ -412,6 +412,7 @@ Real MassHistory(MeshData<Real> *md, const Real x1min, const Real x1max, const R
const auto jb = md->GetBoundsJ(IndexDomain::interior);
const auto kb = md->GetBoundsK(IndexDomain::interior);

Mesh *pm = md->GetMeshPointer();
auto &params = pm->packages.Get("burgers_package")->AllParams();
const auto &mesh_vol = params.Get<Real>("mesh_volume");

Expand Down

0 comments on commit 2ddcf10

Please sign in to comment.