-
Notifications
You must be signed in to change notification settings - Fork 49
Description
In the global_evolution branch, the following new logic was added to tauX_integrand (and tauX_integrand_MINI) in heating_helper_progs.c:
if (simulation_options_global->HII_DIM == 1 && p->x_e_ave < simulation_options_global->MIN_XE_FOR_FCOLL_IN_TAUX) {
fcoll = 0.;
} else {
fcoll = EvaluateNionTs(zhat, p->scale_consts);
}Namely the "collapsed fraction" is computed only if the average x_e is greater than the threshold MIN_XE_FOR_FCOLL_IN_TAUX and only if we have one cell (as we do when we run_global_evolution). This new logic is critical when we run_global_evolution because EvaluateNionTs is called many times (since it is found inside an integral!) and its evaluation is done by computing the actual integral, rather than using an interpolation table (the hmf interpolation tables are not used when we run_global_evolution because in most places the hmf integrals are needed to be evaluated only once per snapshot, since we have only one cell. The tau_X integral is the only place where an hmf integral is needed to be evaluated more than once). Thus, the evaluation of the tau_X integral was the bottleneck in run_global_evolution. The new logic helps to reduce runtime considerably in run_global_evolution because the volume filling factor Q_HI ~ 1 - fcoll can be well approximated to be unity prior to reionization (when x_e is sufficiently small).
While it is clear that this logic helps reducing the runtime of run_global_evolution, two questions remain unanswered:
- Could this logic be also helpful in reducing runtime in full boxes with more than one cell (
HII_DIM > 1)? In a scenario where we don't use interpolation tables to evaluated the hmf integrals, the answer is certainly yes. However, normal settings imply the usage of interpolation tables for the hmf integrals (in full boxes), and it is not clear how much costly is the hmf interpolation inside thetau_Xintegral. This should be examined. - The default value for the threshold is
MIN_XE_FOR_FCOLL_IN_TAUX=1e-3. While this choice is reasonable (since prior to reionizationx_e~1e-4) it wasn't tested how precision and runtime are affected by changing this value.