Skip to content

Commit b69ee21

Browse files
Fixes to erroneous additions from cherry picks
1 parent a30110d commit b69ee21

File tree

2 files changed

+1
-38
lines changed

2 files changed

+1
-38
lines changed

src/pgen/cluster.cpp

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -103,43 +103,6 @@ void ClusterSplitSrcTerm(MeshData<Real> *md, const parthenon::SimTime &tm,
103103
dust::DustUpdateDriver(md, dt, tm);
104104
}
105105

106-
// Turbulence driving (existing logic)
107-
const bool drive_turbulence = hydro_pkg->Param<bool>("drive_turbulence");
108-
if (drive_turbulence) {
109-
if (parthenon::Globals::my_rank == 0) {
110-
printf("Will drive turbulence\n");
111-
}
112-
ClusterGenerateDriving(md, dt);
113-
ClusterApplyDrivingForces(md, dt);
114-
}
115-
116-
// Calculate global accretion by calling the encapsulated AGN triggering method
117-
const auto &agn_triggering = hydro_pkg->Param<AGNTriggering>("agn_triggering");
118-
const auto global_sink_data = agn_triggering.CalculateGlobalAccretion(md, tm);
119-
120-
// Update the black hole state using the returned accretion data
121-
auto smbh_spin_sptr =
122-
hydro_pkg->Param<std::shared_ptr<BlackHoleSpin>>("smbh_spin_object");
123-
BlackHoleSpin *smbh_spin_obj = smbh_spin_sptr.get();
124-
smbh_spin_obj->UpdateBlackHoleStateFromGlobalAccretion(global_sink_data, tm,
125-
hydro_pkg.get());
126-
127-
// Print accretion rate to file for fine analysis
128-
double total_accretion_rate = hydro_pkg->Param<Real>("total_accretion_rate");
129-
// Only rank 0 writes the accretion rate
130-
int rank;
131-
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
132-
if (rank == 0) {
133-
std::ofstream file("accretion.txt", std::ios::app);
134-
if (file.is_open()) {
135-
// file << std::setprecision(12) << std::fixed;
136-
file << tm.time << " " << tm.dt << " " << total_accretion_rate << " "
137-
<< smbh_spin_obj->GetSMBHMass(hydro_pkg.get()) << std::endl;
138-
file.close();
139-
} else {
140-
std::cerr << "Error: Unable to open file 'accretion.txt' for writing." << std::endl;
141-
}
142-
}
143106
ApplyClusterClips(md, tm, dt);
144107
const auto &DustObj = hydro_pkg->Param<dust::Dust>("dust");
145108
DustObj.MeasureAndRecordHistory(md, tm);

src/pgen/cluster/cluster_clips.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ void ApplyClusterClips(MeshData<Real> *md, const parthenon::SimTime &tm,
197197
}
198198
}
199199
},
200-
added_dfloor_mass, removed_dceil_mass, removed_vceil_energy, added_vAceil_mass,
200+
added_dfloor_mass, removed_vceil_energy, added_vAceil_mass,
201201
removed_eceil_energy, added_dust_mass);
202202

203203
// Add the freshly added mass/removed energy to running totals

0 commit comments

Comments
 (0)