From 59439a308fa15fcd1da7de020ea4fc0d1ac94ddf Mon Sep 17 00:00:00 2001 From: jpollin98 Date: Thu, 2 May 2024 10:14:16 +0100 Subject: [PATCH] Update update_grid.cc --- update_grid.cc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/update_grid.cc b/update_grid.cc index 32a97f328..d33dc4aeb 100644 --- a/update_grid.cc +++ b/update_grid.cc @@ -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); } @@ -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.