RT: GEAR and general cleanup
What started out as a small cleanup unfortunately got a bit out of hand and introduces some cleanups, fixes, and changes:
- updated RT-GEAR documentation
- fixed errors where a factor of particle volume is missing in the core of the GEAR RT scheme, and during the injection step
- consequently, turns out that the GEAR RT scheme doesn't need both conserved and density radiation quantities, so now we only keep track of the radiation state as energy density and fluxes
- updated examples to avoid the same errors
- updated py sanity checks to look for that error
- added additional on-the-fly debugging check for particle kick dependencies w.r.t. RT
- moved contents that don't depend on particle positions/smoothing lengths out of
rt_init_part
intort_reset_part
- moved contents that don't need to be in
space_convert_rt_quantities_after_zeroth_step
tort_convert_quantities
- made
rt_convert_quantities
independent ofspace_convert_hydro_quantities
- cleanup comments, documentation, and variable names
Concerning space_convert_rt_quantities_after_zeroth_step
: Currently I need a loop over all particles after the zeroth step is done in 2 cases: (1) I have debugging checks on, and some counters need to be set to zero so that the tests work as intended. (2) When I'm experimenting with hydro controlled injection in the future, I need all star emission rates to be computed from the beginning, even for inactive stars. This can only be done once the star time step is known, and hence needs to be done there.
I moved everything else out of that function, so once I'm done with the extensive debugging and if it turns out that hydro controlled injection is useless, we can just scrap the entire thing without any other damage.
I ran all my tests again, the results are consistent.
@tkchan : FYI, I modified some function prototypes and comments/documentation in your scheme as well to match the other schemes. As far as I saw, you weren't using those functions in your branch (yet).