From f35a2fa6f85f490d911880c6eadc1c6c448290ef Mon Sep 17 00:00:00 2001 From: Ben Wibking Date: Mon, 4 Mar 2024 15:59:43 -0500 Subject: [PATCH] rename param vertical_driving_only --- src/pgen/precipitator.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pgen/precipitator.cpp b/src/pgen/precipitator.cpp index 299b23ab..4d8e5f36 100644 --- a/src/pgen/precipitator.cpp +++ b/src/pgen/precipitator.cpp @@ -287,7 +287,7 @@ 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("xy_modes_only"); + const auto vertical_driving_only = hydro_pkg->Param("vertical_driving_only"); const Real h_smooth = hydro_pkg->Param("h_smooth_heatcool"); @@ -774,7 +774,7 @@ void ProblemInitPackageData(ParameterInput *pin, parthenon::StateDescriptor *pkg if (sigma_v > 0) { auto k_peak_v = pin->GetReal("precipitator/driving", "k_peak"); - // NOTE: in 2D, there are only 12 modes. + // NOTE: in 2D, there are only 12 modes when k_peak == 2 auto num_modes_v = pin->GetOrAddInteger("precipitator/driving", "num_modes", 40); auto sol_weight_v = pin->GetOrAddReal("precipitator/driving", "sol_weight", 1.0); uint32_t rseed_v = pin->GetOrAddInteger("precipitator/driving", "rseed", 1); @@ -785,10 +785,12 @@ void ProblemInitPackageData(ParameterInput *pin, parthenon::StateDescriptor *pkg std::vector({3})); hydro_pkg->AddField("tmp_perturb", m_perturb); - auto xy_modes_only = - pin->GetOrAddBoolean("precipitator/driving", "xy_modes_only", false); - hydro_pkg->AddParam("xy_modes_only", xy_modes_only); + auto vertical_driving_only = + pin->GetOrAddBoolean("precipitator/driving", "vertical_driving_only", false); + hydro_pkg->AddParam("vertical_driving_only", vertical_driving_only); + // when only v_z is desired, ensure that always k_z == 0 + const bool xy_modes_only = vertical_driving_only; auto k_vec_v = utils::few_modes_ft::MakeRandomModes(num_modes_v, k_peak_v, xy_modes_only, rseed_v);