-
Notifications
You must be signed in to change notification settings - Fork 56
[newchem-cpp] introduce temporary InjectPathFieldPack type
#463
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
Open
mabruzzo
wants to merge
84
commits into
grackle-project:newchem-cpp
Choose a base branch
from
mabruzzo:ncc/InjPathFieldPack
base: newchem-cpp
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[newchem-cpp] introduce temporary InjectPathFieldPack type
#463
mabruzzo
wants to merge
84
commits into
grackle-project:newchem-cpp
from
mabruzzo:ncc/InjPathFieldPack
+6,619
−4,876
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There is some unforunate consequences, but if we don't do this you end up with some pretty confusing looking code... (the confusion primarily arises if new_FrozenKeyIdxBiMap or drop_FrozenKeyIdxBiMap has different behavior from other functions with similar names). I really think it would be better to make this into a simple C++ class with a constructor and destructor, but thats a topic for another time
…InfoEntry This information will only be used after we transcribe `calc_grain_size_increment_1d` (at which point we will remove the corresponding constants from phys_constants.h and can entirely delete the dust_const.def file
…e readability (and add some comments)
I moved them from initialize_dust_yields.cpp where the comments were out of place to dust/grain_species_info.cpp
…rp_table_utils.hpp
There's still a lot of work to be done (the type is incomplete and isn't filled by anything at all)
It turns out that `gr_N[1]` is accessed in a lot of places!
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`.
Essentially, this type holds pointers to the various injection pathway fields in the order that is implicitly assumed throughout the codebase. This change helps simplify make_consistent and it will also simplify `calc_grain_size_increment_1d` (once transcribed). Longer term, I have a plan that will let use dispose of this ``InjectPathFieldPack`` type (but, we need to make a few changes before we get to that).
Introduce the start_idx and stop_idx members to the struct
Use the start_idx and stop_idx members to simplify make_consistent
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR should be reviewed after #447 has been merged.
This PR introduces the temporary
InjectPathFieldPacktype. Essentially, this type holds pointers to the various injection pathway fields in the order that is implicitly assumed throughout the codebase. This change helps simplifymake_consistentand it will also simplifycalc_grain_size_increment_1d(once transcribed).For some context, PR #480 will remove the temporary
InjectPathFieldPacktype.