Skip to content

[newchem-cpp] Reorganize logic in cool1d_multi_g#547

Open
mabruzzo wants to merge 105 commits into
grackle-project:newchem-cppfrom
mabruzzo:ncc/reorg-cool1d_multi_g
Open

[newchem-cpp] Reorganize logic in cool1d_multi_g#547
mabruzzo wants to merge 105 commits into
grackle-project:newchem-cppfrom
mabruzzo:ncc/reorg-cool1d_multi_g

Conversation

@mabruzzo

@mabruzzo mabruzzo commented May 4, 2026

Copy link
Copy Markdown
Collaborator

To be reviewed after #546 is merged


This PR reorders a bunch of logic within cool1d_multi_g. The plan is to write a followup PR where I extract the dust-related logic from this function and from lookup_cool_rates1d (we're ALMOST there).

This PR is going to require an update to gold-standard.

mabruzzo added 30 commits April 19, 2026 09:40
This switches to using GRIMPL_NAMESPACE_DECL and puts all the helper
function into the namespace
The result is definitely not bitwise identical, but that's not going to
make tests fail (since the logic is not tested)
mabruzzo added 29 commits May 3, 2026 12:21
It turns out that the value computed on CI and on my personal machine
were -4031685600248.466 and -4031685600261.704. These values had a
relative difference of ~ -3.3e-12, which slightly exceeded our tolerance
(2e-12). Consequently, we just averaged the values
This tweak will help with the next PR in the sequence
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`
There's chance that this will require an update to the gold-standard
The refactored logic uses a for-loop (rather than explicitly listing
each kind of grain species) and one less temporary buffer. This is going
to affect the gold-standard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants