From 494e24c89e4272795bbd78b898854ae0cc13d2b2 Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Fri, 30 Aug 2024 14:18:00 -0400 Subject: [PATCH] fix param bug --- src/pgen/precipitator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pgen/precipitator.cpp b/src/pgen/precipitator.cpp index fa0d3428..51d45042 100644 --- a/src/pgen/precipitator.cpp +++ b/src/pgen/precipitator.cpp @@ -287,14 +287,15 @@ void TurbSrcTerm(MeshData *md, const parthenon::SimTime /*time*/, const Re IndexRange kb = pmb->cellbounds.GetBoundsK(IndexDomain::interior); const auto sigma_v = hydro_pkg->Param("sigma_v"); - const auto vertical_driving_only = hydro_pkg->Param("vertical_driving_only"); - const Real h_smooth = hydro_pkg->Param("h_smooth_heatcool"); // the maximum height at which to drive turbulence const Real max_height_driving = hydro_pkg->Param("max_height_driving"); if (sigma_v > 0) { + // NOTE: this param only exists if sigma_v > 0 + const auto vertical_driving_only = hydro_pkg->Param("vertical_driving_only"); + // generate perturbations auto *few_modes_ft = hydro_pkg->MutableParam("precipitator/few_modes_ft_v"); few_modes_ft->Generate(md, dt, "tmp_perturb");