From d32f2756e292c94e555283f0e131f90464fc7e06 Mon Sep 17 00:00:00 2001 From: Philipp Grete Date: Thu, 21 Nov 2024 12:33:03 +0100 Subject: [PATCH] Need FillDerived because prim is used outside of k,j,i in Cond --- src/hydro/diffusion/conduction.cpp | 12 ------------ src/hydro/hydro_driver.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/hydro/diffusion/conduction.cpp b/src/hydro/diffusion/conduction.cpp index 3ab934e3..5790629f 100644 --- a/src/hydro/diffusion/conduction.cpp +++ b/src/hydro/diffusion/conduction.cpp @@ -273,17 +273,7 @@ void ThermalFluxGeneral(MeshData *md) { auto cons_pack = md->PackVariablesAndFluxes(flags_ind); auto hydro_pkg = pmb->packages.Get("Hydro"); - const auto &eos = md->GetBlockData(0) - ->GetBlockPointer() - ->packages.Get("Hydro") - ->Param("eos"); - - const auto nhydro = hydro_pkg->Param("nhydro"); - const auto nscalars = hydro_pkg->Param("nscalars"); - auto const &prim_pack = md->PackVariables(std::vector{"prim"}); - // silly workaroud to not change constorim interface - auto const &cons_pack_no_flux = md->PackVariables(std::vector{"cons"}); const int ndim = pmb->pmy_mesh->ndim; @@ -298,8 +288,6 @@ void ThermalFluxGeneral(MeshData *md) { const auto &coords = prim_pack.GetCoords(b); auto &cons = cons_pack(b); const auto &prim = prim_pack(b); - // Need this here as we're skipping the FillDerivedCall in RKL - eos.ConsToPrim(cons_pack_no_flux(b), prim, nhydro, nscalars, k, j, i); // Variables only required in 3D case Real dTdz = 0.0; diff --git a/src/hydro/hydro_driver.cpp b/src/hydro/hydro_driver.cpp index 8f60574b..7420a0c8 100644 --- a/src/hydro/hydro_driver.cpp +++ b/src/hydro/hydro_driver.cpp @@ -291,8 +291,8 @@ void AddSTSTasks(TaskCollection *ptask_coll, Mesh *pmesh, BlockList_t &blocks, // auto bounds_exchange = parthenon::AddBoundaryExchangeTasks( // rkl2_step_first | start_bnd, tl, base, pmesh->multilevel); - // tl.AddTask(rkl2_step_first, parthenon::Update::FillDerived>, - // base.get()); + tl.AddTask(rkl2_step_first, parthenon::Update::FillDerived>, + base.get()); } // Compute coefficients. Meyer+2012 eq. (16) @@ -356,8 +356,8 @@ void AddSTSTasks(TaskCollection *ptask_coll, Mesh *pmesh, BlockList_t &blocks, // auto bounds_exchange = parthenon::AddBoundaryExchangeTasks( // rkl2_step_other | start_bnd, tl, base, pmesh->multilevel); - // tl.AddTask(rkl2_step_other, parthenon::Update::FillDerived>, - // base.get()); + tl.AddTask(rkl2_step_other, parthenon::Update::FillDerived>, + base.get()); } b_jm2 = b_jm1;