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 2, 2024
1 parent 0105d1b commit 59439a3
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions update_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1108,9 +1108,9 @@ static void update_grid_cell(const int mgi, const int nts, const int nts_prev, c
// full-spectrum and binned J and nuJ estimators
radfield::fit_parameters(mgi, nts);

// if constexpr (DETAILED_BF_ESTIMATORS_ON) {
// radfield::normalise_bf_estimators(mgi, estimator_normfactor / H);
// }
if constexpr (DETAILED_BF_ESTIMATORS_ON) {
radfield::normalise_bf_estimators(mgi, estimator_normfactor / H);
}

solve_Te_nltepops(mgi, nts, titer, heatingcoolingrates);
}
Expand Down Expand Up @@ -1251,19 +1251,19 @@ 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++) {
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; // deltaV is the volume of the cell

radfield::normalise_bf_estimators(mgi, estimator_normfactor / H);
}
}
}
// if constexpr (DETAILED_BF_ESTIMATORS_ON) {
// for (int mgi = 0; mgi < grid::get_npts_model(); mgi++) {
// 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; // deltaV is the volume of the cell
//
// 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 59439a3

Please sign in to comment.