Skip to content

[newchem-cpp] Refactor GrainSpeciesInfo to make use of FrozenKeyIdxBiMap#462

Merged
brittonsmith merged 12 commits intograckle-project:newchem-cppfrom
mabruzzo:ncc/refactor-GrainSpeciesInfo
Jan 26, 2026
Merged

[newchem-cpp] Refactor GrainSpeciesInfo to make use of FrozenKeyIdxBiMap#462
brittonsmith merged 12 commits intograckle-project:newchem-cppfrom
mabruzzo:ncc/refactor-GrainSpeciesInfo

Conversation

@mabruzzo
Copy link
Collaborator

To be reviewed after #428 and #451 are merged


This is a lightweight PR that refactors GrainSpeciesInfo to make use of FrozenKeyIdxBiMap. This is useful for PR #447 and some other things I have planned.

One minor change involved formally making it illegal to construct a
GrainSpeciesInfo instance that holds 0 dust species. That's perfectly
fine. `GrainSpeciesInfo` holds some redundant info that we will remove
in the a subsequent commit
Modify tests to start using `FrozenKeyIdxBiMap` rather than
`GrainSpeciesInfoEntry::onlygrainsp_idx` and
`GrainSpeciesInfoEntry::name`. In the next commit, we'll remove these
members from `GrainSpeciesInfoEntry`
Delete `GrainSpeciesInfoEntry::onlygrainsp_idx` and
`GrainSpeciesInfoEntry::name`.
@mabruzzo mabruzzo changed the base branch from main to newchem-cpp December 10, 2025 01:35
@mabruzzo mabruzzo added the refactor internal reorganization or code simplification with no behavior changes label Dec 10, 2025
@mabruzzo mabruzzo force-pushed the ncc/refactor-GrainSpeciesInfo branch from 5b78f94 to 4d4cdca Compare January 13, 2026 22:58
@brittonsmith brittonsmith changed the base branch from newchem-cpp to main January 26, 2026 10:46
@brittonsmith brittonsmith changed the base branch from main to newchem-cpp January 26, 2026 10:46
@brittonsmith brittonsmith merged commit e1fcc19 into grackle-project:newchem-cpp Jan 26, 2026
5 checks passed
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