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 895a2e8 commit 67086f0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions update_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1253,11 +1253,15 @@ void update_grid(FILE *estimators_file, const int nts, const int nts_prev, const
// generate a loop over all mgi
if constexpr (DETAILED_BF_ESTIMATORS_ON) {
for (int mgi = 0; mgi < grid::get_npts_model(); mgi++) {
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;
const int assoc_cells = grid::get_numassociatedcells(mgi);
if (assoc_cells > 0) {
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);
radfield::normalise_bf_estimators(mgi, estimator_normfactor / H);
}
}
}

Expand Down

0 comments on commit 67086f0

Please sign in to comment.