[newchem-cpp] transcribe lookup_rate_1d_g#412
Merged
brittonsmith merged 57 commits intoNov 12, 2025
Merged
Conversation
…re used (to silence unused-variable warnings)
I added a bunch of comments to explain what's actually happenning here and I slightly refactored the code. The impetus for doing this was some warnings that the compiler couldn't tell whether some variables were fully initialized. I'm going to address that in the next commit
…ere some cases where we wanted to apply the operation on integers)
lookup_rate_1d_glookup_rate_1d_g
Collaborator
Author
|
Huh, well I just pushed a commit to fix the merge conflict and it's not showing up. I guess GitHub is struggling today EDIT: nevermind, it all appears to have worked out |
34811ad to
dfac060
Compare
brittonsmith
approved these changes
Nov 12, 2025
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.
This PR should be reviewed after #386 and #411 are merged
This PR transcribes
lookup_rate_1d_gto C++. This is pretty self-explanatory.At the moment, this is pretty much a raw transcription (that was reformatted by clang-format). The following needs to be done before it's ready for review:
grackle::impl::fortran_wrapper::lookup_cool_rates1d_g)grackle::impl::fortran_wrapper::lookup_cool_rates1d_g(and replace all calls to it with calls tograckle::impl::lookup_cool_rates1d_g). We probably also want to copy over all the notes in the docstring signature-1nonsense)Plans for followup PRs:
The C++ implementation can be cleaned up in a number of ways:
initialize_chemistry_data) that is indexed by theOnlyGrainSpLUTenum so we can convert all that logic to much simpler loops. (I want to use loops for all dust-related stuff, but I haven't looked to see how plausible that is)Most (all?) of these changes are implemented in followups PRs: #415, #416, #428, #429