[newchem-cpp] convert update_UVbackground_rates.{c->cpp}#431
Merged
brittonsmith merged 6 commits intoJan 13, 2026
Merged
Conversation
As part of this patch, I introduced an internal header to declare the update_UVbackground_rates function. I also moved the function into the grackle::impl namespace
a21b42f to
d5f6f6b
Compare
brittonsmith
approved these changes
Jan 13, 2026
| @@ -73,79 +67,79 @@ int update_UVbackground_rates(chemistry_data *my_chemistry, | |||
| index++; | |||
Contributor
There was a problem hiding this comment.
Just making a note for myself. It has always bugged me that we do this to find the index for the redshift interpolation. All the tables we support are evenly spaced in log(1+z). At bare minimum we should bisection.
brittonsmith
approved these changes
Jan 13, 2026
brittonsmith
left a comment
Contributor
There was a problem hiding this comment.
This looks perfectly fine. I wish I understood the test failure.
Contributor
4454194
into
grackle-project:newchem-cpp
4 of 5 checks passed
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 #430 is merged
This PR converts
update_UVbackground_rates.cto C++. It also puts theupdate_UVbackground_ratesfunction into our internalgrackle::implnamespace.I did a few other things as part of this PR:
update_UVbackground_ratesfunction every time we want to use it1Footnotes
An argument could be made for making
update_UVbackground_ratesan inline function that is fully implemented in a header file. ↩Broadly speaking, there are a handful of macros defined in that file that are unnecessary or problematic and I've been slowly working towards reducing the usage of grackle_macros.h to ultimately remove these macros ↩