Skip to content

Commit

Permalink
Fixed AGN Triggering Mode in history dumps
Browse files Browse the repository at this point in the history
  • Loading branch information
Forrest Glines committed Jul 19, 2022
1 parent b9d1f98 commit 8f4b52c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/pgen/cluster/agn_triggering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ AGNTriggering::AGNTriggering(parthenon::ParameterInput *pin,
// unimplemented
hst_vars.emplace_back(parthenon::HistoryOutputVar(
parthenon::UserHistoryOperation::max,
[this, var_name](MeshData<Real> *md) {
[var_name](MeshData<Real> *md) {
auto pmb = md->GetBlockData(0)->GetBlockPointer();
auto hydro_pkg = pmb->packages.Get("Hydro");
return hydro_pkg->Param<Real>(var_name);
Expand All @@ -153,10 +153,11 @@ AGNTriggering::AGNTriggering(parthenon::ParameterInput *pin,
// unimplemented
hst_vars.emplace_back(parthenon::HistoryOutputVar(
parthenon::UserHistoryOperation::max,
[this](MeshData<Real> *md) {
[](MeshData<Real> *md) {
auto pmb = md->GetBlockData(0)->GetBlockPointer();
auto hydro_pkg = pmb->packages.Get("Hydro");
return this->GetAccretionRate(hydro_pkg.get());
const auto &agn_triggering = hydro_pkg->Param<AGNTriggering>("agn_triggering");
return agn_triggering.GetAccretionRate(hydro_pkg.get());
},
"agn_accretion_rate"));
}
Expand Down
2 changes: 1 addition & 1 deletion src/pgen/cluster/agn_triggering.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace cluster {

enum class AGNTriggeringMode { COLD_GAS, BOOSTED_BONDI, BOOTH_SCHAYE, NONE };
enum class AGNTriggeringMode { NONE, COLD_GAS, BOOSTED_BONDI, BOOTH_SCHAYE };

AGNTriggeringMode ParseAGNTriggeringMode(const std::string &mode_str);

Expand Down

0 comments on commit 8f4b52c

Please sign in to comment.