[newchem-cpp] Factor out metallicity and electron density calculations from cool1d_multi_g#545
Merged
brittonsmith merged 9 commits intoMay 21, 2026
Conversation
It is now temporarily allocated inside of cool1d_multi_g (the plan is to pass in a buffer as an argument). The new temporary variable is now called `nelec_times_mH`
brittonsmith
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To be reviewed after #537 has been merged
This PR factors out the logic for computing metallicity and the number density of free electrons from
cool1d_multi_g. As part of this PR, I introducedextended_gas_props, which is a function that takes care of all of the prerequisite calculations before we can start calculating rates (these prerequisite calculations have all been factored out ofcool1d_multi_g, step-by-step in the current PR sequence)Note
This should not require a gold-standard update (i.e. once we update the gold-standard from merging #537, all tests should pass)