Skip to content

[newchem-cpp] factor out scale_fields_dust#386

Merged
brittonsmith merged 5 commits into
grackle-project:newchem-cppfrom
mabruzzo:gen2024transcribe/scale_fields_dust
Sep 12, 2025
Merged

[newchem-cpp] factor out scale_fields_dust#386
brittonsmith merged 5 commits into
grackle-project:newchem-cppfrom
mabruzzo:gen2024transcribe/scale_fields_dust

Conversation

@mabruzzo

Copy link
Copy Markdown
Collaborator

This PR was originally proposed as brittonsmith#41


This should be reviewed after #385 has been merged


This factors out some the logic from calc_tdust_3d for scaling densities from comoving form to "proper" form (and back again). This consists of 3 parts:

  1. I renamed the file that already held scale_fields_table (so that the new function could be put into the files)
  2. I actually factored out the function
  3. I did a little cleanup of calc_tdust_3d.

All in all, this is pretty simple.

Note

This PR probably changes the precise answer of the answer-tests (I had to convert a division to multiplication by an inverse). In other words, the answers drift a tiny, nominal amount. Back when I originally proposed this change (as brittonsmith#41) all of the tests still passed

@mabruzzo mabruzzo added the refactor internal reorganization or code simplification with no behavior changes label Aug 20, 2025
@mabruzzo mabruzzo moved this to Awaiting Review in New Chemistry and C++ Transcription Aug 21, 2025
@mabruzzo mabruzzo changed the base branch from newchem-cpp to main September 11, 2025 18:14
@mabruzzo mabruzzo changed the base branch from main to newchem-cpp September 11, 2025 18:14
@brittonsmith brittonsmith changed the base branch from newchem-cpp to main September 12, 2025 15:54
@brittonsmith brittonsmith changed the base branch from main to newchem-cpp September 12, 2025 15:54
@brittonsmith brittonsmith merged commit 903b3e7 into grackle-project:newchem-cpp Sep 12, 2025
5 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting Review to Done in New Chemistry and C++ Transcription Sep 12, 2025
@mabruzzo mabruzzo deleted the gen2024transcribe/scale_fields_dust branch September 12, 2025 18:34
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

Development

Successfully merging this pull request may close these issues.

2 participants