Skip to content

Commit

Permalink
Update update_grid.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
jpollin98 committed May 1, 2024
1 parent 27a128e commit 8f528a9
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions update_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1251,16 +1251,15 @@ void update_grid(FILE *estimators_file, const int nts, const int nts_prev, const
#endif

// generate a loop over all mgi
// if constexpr (DETAILED_BF_ESTIMATORS_ON) {
// for (int mgi = 0; mgi < grid::get_npts_model(); mgi++) {
// const double deltaV =
// grid::get_modelcell_assocvolume_tmin(mgi) * pow(globals::timesteps[nts_prev].mid / globals::tmin, 3);
//
// const double estimator_normfactor = 1 / deltaV / deltat / globals::nprocs;
//
// radfield::normalise_bf_estimators(mgi, estimator_normfactor / H);
// }
//}
if constexpr (DETAILED_BF_ESTIMATORS_ON) {
for (int mgi = 0; mgi < grid::get_npts_model(); mgi++) {
const double estimator_normfactor =
1 / (grid::get_modelcell_assocvolume_tmin(mgi) * pow(globals::timesteps[nts_prev].mid / globals::tmin, 3)) /
globals::timesteps[nts_prev].width / globals::nprocs;

radfield::normalise_bf_estimators(mgi, estimator_normfactor / H);
}
}

for (int mgi = 0; mgi < grid::get_npts_model(); mgi++) {
/// Check if this task should work on the current model grid cell.
Expand Down

0 comments on commit 8f528a9

Please sign in to comment.