[newchem-cpp] Hoist mask-modifications and edot initialization out of cool1d_multi_g#546
[newchem-cpp] Hoist mask-modifications and edot initialization out of cool1d_multi_g#546mabruzzo wants to merge 10 commits into
cool1d_multi_g#546Conversation
|
I like the extraction of the masking to external functionality, but it might be worth stuffing it into an I have noted two additional places where metal masking is happening in an identical without the use of
I've now written and rewritten thoughts about extracting the dust component to the Update: in light of moving on to PR #547, you can definitely consider the last point above as requiring no action, but let me know your thoughts on the first two points. |
To be reviewed after #545
This PR is pretty straight-forward.
The main changes:
itmask(based on the temperature floor) before we entercool1d_multi_gitmask_metalbefore we entercool1d_multi_gedot(i.e. fill with zeros) before we entercool1d_multi_gThe last change is probably the most controversial change. This change was motivated by the fact that I want to be able to compute all cooling and reaction rates pertaining to our dust model all at once (so we can better compartmentalize that code and significantly improve performance/reduce allocations for Gen's model). At present, the easiest way to handle this will be to call that logic before we call
cool1d_multi_g(i.e. when we callcool1d_multi_g, theedotbuffer will already include cooling contributions from the dust model).1This PR and the prior PR (as well as the one before that) should all use the same gold-standard.
Footnotes
If we want to call
cool1d_multi_gbefore the dust calculations, then we're going to need to move the optical-depth adjustments to a separate function called after the dust calculations. If there's a preference for this plan, we can totally do it -- I don't really which care which approach we take. ↩