-
Notifications
You must be signed in to change notification settings - Fork 32
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
Refactor dual energy #418
Open
mabruzzo
wants to merge
24
commits into
cholla-hydro:dev
Choose a base branch
from
mabruzzo:refactor-dual-energy
base: dev
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
Refactor dual energy #418
Conversation
This file contains 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
In slightly more detail, we invoke `Average_Cell_All_Fields` to get the average values from the neighbors to overwrite the value in a crashed cell or (when the `AVERAGE_SLOW_CELLS` macro is defined). - We have already been excluding any neighboring cell from this average that had crashed. - The key inovation here is that we now exclude a neighboring cell that we would consider a slow cell (when the `AVERAGE_SLOW_CELLS` macro is defined). To implement this, we pass around the SlowCellConditionCheck object, which implements methods to check whether a cell is considered slow or not. When the `AVERAGE_SLOW_CELLS` macro is defined, that method does the full check. When the macro isn't defined, the logic short-circuits and always returns that the cell isn't slow.
for more information, see https://pre-commit.ci
The dual-energy formalism now respects crashed cells in the function call `Select_Internal_Energy_ND` -> the function does not modify any cells where the cell "crashed" -> while considering the neighboring values of the crashed cells, we ignore any neighbors that "crashed" -> we also now explicitly pick advected internal energy over the internal energy computed from total energy in cases where the total energy is positive, but does not exceed kinetic energy. This was all done in preparation for Averaging Crashed Cells after
It now operates after the dual-energy formalism.
Previously it always held 3 Real values. Now it holds values of an arbitrary type.
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 #417 is merged
This PR essentially moves around the contents for some dual-energy routines so that we only need to maintain a single version of these function rather than 3 independent functions. Motivation for doing this is provided at the top of the new dual_energy.h file