some changes to the SDC Newton solver to make it more robust - #2586
Merged
Conversation
we now reject a solve if the mass fractions are too far out of [0, 1] also do the total energy update conservatively
5 tasks
Member
Author
|
test diffs are small: |
maximumcats
reviewed
Oct 9, 2023
| for (int n = 0; n < NumSpec; ++n) { | ||
| if (U_new[UFS+n] < -newton::species_failure_tolerance * U_new[URHO] || | ||
| U_new[UFS+n] > (1.0_rt + newton::species_failure_tolerance) * U_new[URHO]) { | ||
| ierr = newton::BAD_MASS_FRACTIONS; |
Member
There was a problem hiding this comment.
Does it makes sense to keep doing the sub-stepping if we hit this error case?
Member
Author
There was a problem hiding this comment.
oh, you mean I should do a break here?
Member
There was a problem hiding this comment.
Well I'm not as worried about a break inside the species loop, I mean a break after the species loop before we finish up anything else we do below this
Member
Author
There was a problem hiding this comment.
I just moved it to before the previous break. Thanks. I missed that.
Member
Author
|
|
5 tasks
maximumcats
approved these changes
Oct 12, 2023
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
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.
we now reject a solve if the mass fractions are too far out of [0, 1] also do the total energy update conservatively
PR summary
PR motivation
PR checklist
CHANGESfile has been updated, if appropriate