Skip to content

Commit

Permalink
Ensure c_h is present
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrete committed Nov 10, 2024
1 parent 867fb3a commit fcb5f39
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/hydro/hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,17 @@ std::shared_ptr<StateDescriptor> Initialize(ParameterInput *pin) {
auto glmmhd_alpha = pin->GetOrAddReal("hydro", "glmmhd_alpha", 0.1);
pkg->AddParam<Real>("glmmhd_alpha", glmmhd_alpha);
calc_c_h = true;
pkg->AddParam<Real>(
"c_h", 0.0, Params::Mutability::Restart); // hyperbolic divergence cleaning speed
} else {
PARTHENON_FAIL("AthenaPK hydro: Unknown fluid method.");
}
pkg->AddParam<>("fluid", fluid);
pkg->AddParam<>("nhydro", nhydro);
pkg->AddParam<>("calc_c_h", calc_c_h);
// Following params should (currently) be present independent of solver because
// they're all used in the main loop.
// TODO(pgrete) think about which approach (selective versus always is preferable)
pkg->AddParam<Real>(
"c_h", 0.0, Params::Mutability::Restart); // hyperbolic divergence cleaning speed
// global minimum dx (used to calc c_h)
pkg->AddParam<Real>("mindx", std::numeric_limits<Real>::max(),
Params::Mutability::Restart);
Expand Down

0 comments on commit fcb5f39

Please sign in to comment.