Skip to content

Commit

Permalink
remove estimator_gamma_kappa_integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 12, 2024
1 parent 486afa0 commit aecd5a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
2 changes: 0 additions & 2 deletions gammapkt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,6 @@ void update_gamma_dep(const Packet &pkt, const double dist, const int mgi, const
assert_testmodeonly(heating_cont >= 0.);
assert_testmodeonly(std::isfinite(heating_cont));
atomicadd(globals::dep_estimator_gamma[nonemptymgi], heating_cont);

atomicadd(globals::estimator_gamma_kappa_integrated, heating_cont * get_kappa(pkt));
}

// handle physical pair production event
Expand Down
1 change: 0 additions & 1 deletion globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ inline std::vector<double> dep_estimator_positron;
inline std::vector<double> dep_estimator_electron;
inline std::vector<double> dep_estimator_alpha;

inline double estimator_gamma_kappa_integrated = 0.;
inline double estimator_gamma_kappa_decayspec = 0.;
inline double estimator_gamma_nu_cmf_decayspec = 0.;
inline double estimator_gamma_kappa_absorbedspec = 0.;
Expand Down
14 changes: 3 additions & 11 deletions sn3d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,6 @@ void zero_estimators() {

globals::estimator_gamma_nu_cmf_decayspec = 0.;
globals::estimator_gamma_nu_cmf_absorbedspec = 0.;
globals::estimator_gamma_kappa_integrated = 0.;
globals::estimator_gamma_kappa_decayspec = 0.;
globals::estimator_gamma_kappa_absorbedspec = 0.;

Expand Down Expand Up @@ -649,12 +648,6 @@ void normalise_deposition_estimators(int nts) {
globals::timesteps[nts].electron_dep = 0.;
globals::timesteps[nts].alpha_dep = 0.;

double gamma_dep_erg = 0.;
for (int nonemptymgi = 0; nonemptymgi < grid::get_nonempty_npts_model(); nonemptymgi++) {
gamma_dep_erg += (globals::dep_estimator_gamma[nonemptymgi] / nprocs);
}
globals::estimator_gamma_kappa_integrated /= gamma_dep_erg;

globals::estimator_gamma_kappa_decayspec /= globals::timesteps[nts].gamma_emission;
globals::estimator_gamma_nu_cmf_decayspec /= globals::timesteps[nts].gamma_emission;
const double mean_en_decay_mev = H * globals::estimator_gamma_nu_cmf_decayspec / MEV;
Expand All @@ -664,11 +657,10 @@ void normalise_deposition_estimators(int nts) {
const double mean_en_absorb_mev = H * globals::estimator_gamma_nu_cmf_absorbedspec / MEV;

printout(
"timestep %d %.2f days kappa_eff [cm2/g]: path-integrated %.3f decay_spec %.3f deposit_spec %.3f. mean gamma "
"timestep %d %.2f days kappa_eff [cm2/g]: decay_spec %.3f deposit_spec %.3f. mean gamma "
"E[MeV]: decay %.2f deposit %.2f\n",
nts, globals::timesteps[nts].mid / DAY, globals::estimator_gamma_kappa_integrated,
globals::estimator_gamma_kappa_decayspec, globals::estimator_gamma_kappa_absorbedspec, mean_en_decay_mev,
mean_en_absorb_mev);
nts, globals::timesteps[nts].mid / DAY, globals::estimator_gamma_kappa_decayspec,
globals::estimator_gamma_kappa_absorbedspec, mean_en_decay_mev, mean_en_absorb_mev);

for (int nonemptymgi = 0; nonemptymgi < grid::get_nonempty_npts_model(); nonemptymgi++) {
const int mgi = grid::get_mgi_of_nonemptymgi(nonemptymgi);
Expand Down

0 comments on commit aecd5a8

Please sign in to comment.