From 999ccee12e7106bea8af82d9f2bf4acc5cb67efe Mon Sep 17 00:00:00 2001 From: Brandon Barker Date: Fri, 23 Aug 2024 13:36:36 -0600 Subject: [PATCH] fix: bad package use in history kernel for device --- src/analysis/history.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/analysis/history.cpp b/src/analysis/history.cpp index 70c589c6..a0af5e7c 100644 --- a/src/analysis/history.cpp +++ b/src/analysis/history.cpp @@ -257,16 +257,16 @@ void ReduceLocalizationFunction(MeshData *md) { auto v = desc.GetPack(md); const int nblocks = v.GetNBlocks(); auto geom = Geometry::GetCoordinateSystem(md); + auto analysis = pmb->packages.Get("analysis").get(); + const Real sigma = analysis->Param("sigma"); parthenon::par_for( parthenon::LoopPatternMDRange(), "Central Density for SN", DevExecSpace(), 0, nblocks - 1, kb.s, kb.e, jb.s, jb.e, ib.s, ib.e, KOKKOS_LAMBDA(const int b, const int k, const int j, const int i) { auto &coords = v.GetCoordinates(b); - auto analysis = pmb->packages.Get("analysis").get(); const Real x[3] = {coords.Xc<1>(k, j, i), coords.Xc<2>(k, j, i), coords.Xc<3>(k, j, i)}; - const Real sigma = analysis->Param("sigma"); Real gam[3][3]; Real r2 = 0; geom.Metric(CellLocation::Cent, 0, k, j, i, gam);