Skip to content

Commit

Permalink
Need FillDerived because prim is used outside of k,j,i in Cond
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Nov 21, 2024
1 parent eb719e0 commit d32f275
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
12 changes: 0 additions & 12 deletions src/hydro/diffusion/conduction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,7 @@ void ThermalFluxGeneral(MeshData<Real> *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<AdiabaticGLMMHDEOS>("eos");

const auto nhydro = hydro_pkg->Param<int>("nhydro");
const auto nscalars = hydro_pkg->Param<int>("nscalars");

auto const &prim_pack = md->PackVariables(std::vector<std::string>{"prim"});
// silly workaroud to not change constorim interface
auto const &cons_pack_no_flux = md->PackVariables(std::vector<std::string>{"cons"});

const int ndim = pmb->pmy_mesh->ndim;

Expand All @@ -298,8 +288,6 @@ void ThermalFluxGeneral(MeshData<Real> *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;
Expand Down
8 changes: 4 additions & 4 deletions src/hydro/hydro_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<MeshData<Real>>,
// base.get());
tl.AddTask(rkl2_step_first, parthenon::Update::FillDerived<MeshData<Real>>,
base.get());
}

// Compute coefficients. Meyer+2012 eq. (16)
Expand Down Expand Up @@ -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<MeshData<Real>>,
// base.get());
tl.AddTask(rkl2_step_other, parthenon::Update::FillDerived<MeshData<Real>>,
base.get());
}

b_jm2 = b_jm1;
Expand Down

0 comments on commit d32f275

Please sign in to comment.