Closed kslong closed 7 months ago
I have modified the upsilon branch of python to use the stored logarithmic values for photon x-sections in sigma_phot, and removed log_sigma_phot as it is redundant. Using the stored values speeds up that portion of the code by 20-30%. The next step in this effort might well be to work on alpha_sp_integrand (or rather the code that calls this) so that it does not use a general purpose integration routine, but rather calculates the integral from the stored values of the photoionization x-sections. Alternatively as @ssim has suggested, we might want to explore ways to reduce the number of calls from kappa_bf (or to kappa_bf). Currently in the simple model I have been trying these two routines contribute about equally to the total number of calls to sigma_phot.
This issue should be resolved, by 83d46174dfc32ec0f0943825edc362d44a51ee28
macro atom runs with cno included are very slow, and these runs seem to be slow in part because the routine sigma_phot can take up roughly half of the total time. This is split between photon transfer and setup routines. We need a faster version of this, if we are going to regularly run CNO models with macro atoms. (Note that we have long known that that sigma phot was a bottleneck, even in non-macro atom models but with large numbers of macro atoms the problem is apparently much worse.