Skip to content

Commit

Permalink
fix param bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking committed Aug 30, 2024
1 parent 7d29aac commit 494e24c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pgen/precipitator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,15 @@ void TurbSrcTerm(MeshData<Real> *md, const parthenon::SimTime /*time*/, const Re
IndexRange kb = pmb->cellbounds.GetBoundsK(IndexDomain::interior);

const auto sigma_v = hydro_pkg->Param<Real>("sigma_v");
const auto vertical_driving_only = hydro_pkg->Param<bool>("vertical_driving_only");

const Real h_smooth = hydro_pkg->Param<Real>("h_smooth_heatcool");

// the maximum height at which to drive turbulence
const Real max_height_driving = hydro_pkg->Param<Real>("max_height_driving");

if (sigma_v > 0) {
// NOTE: this param only exists if sigma_v > 0
const auto vertical_driving_only = hydro_pkg->Param<bool>("vertical_driving_only");

// generate perturbations
auto *few_modes_ft = hydro_pkg->MutableParam<FewModesFT>("precipitator/few_modes_ft_v");
few_modes_ft->Generate(md, dt, "tmp_perturb");
Expand Down

0 comments on commit 494e24c

Please sign in to comment.