Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change redshift interpolation to log(1+z) #126

Merged
merged 15 commits into from Feb 17, 2023

Conversation

brittonsmith
Copy link
Contributor

This is a reissue of PR #105, which I've taken over for BK. I've merged with the latest changes and made just a couple modifications, but I will leave the rest open for discussion.

The gist of this PR is that it changes the interpolation over redshift for the UV background and tabulated cooling to interpolation over log(1 + z). This is an improvement since all of our redshift-dependent tabular data is evenly spaced in log(1 + z). My recollection is that it was decided at a user/dev meeting to go with this without maintaining an option for the old behavior as it is a general improvement.

This PR also includes changes to the tiny8 constant and setting edot to zero when it's very small. These I am less sure of these, but will leave them open for discussion.

@brittonsmith brittonsmith added the refactor internal reorganization or code simplification with no behavior changes label Dec 7, 2022
@brittonsmith brittonsmith added this to the 3.2 milestone Dec 7, 2022
@brittonsmith
Copy link
Contributor Author

This fails the cooling_rate.py tests with average relative differences of just over ~1e-7 in some of the species densities. I think this is acceptable and can update the test answers when the rest is ready to go.

Copy link
Contributor

@gregbryan gregbryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me although before merging, it would be good to get another pair of eyes on the questions I raised in my review. Great job!

src/clib/solve_rate_cool_g.F Outdated Show resolved Hide resolved
src/clib/grackle_fortran_types.def Show resolved Hide resolved
@brittonsmith brittonsmith merged commit 37d077c into grackle-project:master Feb 17, 2023
@brittonsmith brittonsmith deleted the pr105 branch February 17, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor internal reorganization or code simplification with no behavior changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants