Skip to content

[newchem-cpp] Introduce mass_factor and nuclide properties to c library - #604

Open
mabruzzo wants to merge 68 commits into
grackle-project:newchem-cppfrom
mabruzzo:ncc/mass-factor
Open

[newchem-cpp] Introduce mass_factor and nuclide properties to c library#604
mabruzzo wants to merge 68 commits into
grackle-project:newchem-cppfrom
mabruzzo:ncc/mass-factor

Conversation

@mabruzzo

Copy link
Copy Markdown
Collaborator

To be reviewed after PRs #594, #602, and #603 are merged


This PR does two main things:

  1. It introduces the concept of a mass_factor to the core grackle library. The product of this number and $m_H$ is the conversion factor between user specified mass density fields and number densities. I've dedicated a section of phys_constants.hpp to enumerating these values (long term the goal is replace all implicit occurrences of the mass factor).
  2. It introduces the NuclideModel type. Objects of this type dynamically map between nuclide symbols (e.g. "H", "D", "He", "C") and their properties (namely, the mass_factor and the number of electrons).
    • The immediate goal is to make sure that gracklepy uses values that are synchronized with the core grackle library
    • I have some medium term goals that I want to use this type to accomplish

mabruzzo added 30 commits July 22, 2026 11:26
All changes in this commit are a search-and-replace (plus some automated
reformatting since the number of characters is changing)
It is now called `add_misc_recipies_to_RegBuilder` and it is now
declared at the end of the header file. The old name (and position of
the declaration) implied that it acted like a method of RegBuilder
This is inadvisable, but will be necessary to achieve reasonable
performance in step_rate_newton_raphson
The default constructor now builds an instance holding 0 elements. The
mk_invalid_FrozenKeyIdxBiMap function has beed converted to a private
factory method
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.

1 participant