Increased auxiliary term performance#197
Merged
david-montiel-t merged 3 commits intoprisms-center:masterfrom Aug 28, 2023
Merged
Increased auxiliary term performance#197david-montiel-t merged 3 commits intoprisms-center:masterfrom
david-montiel-t merged 3 commits intoprisms-center:masterfrom
Conversation
added 2 commits
August 26, 2023 13:04
…ary terms. Auxiliary terms will only be checked if NaN every so many increments rather than every increment. Testing the Cahn-Hilliard application resulted in an ~25% decrease in computation time.
david-montiel-t
requested changes
Aug 28, 2023
src/matrixfree/solveIncrement.cc
Outdated
Comment on lines
+444
to
+450
| if (currentIncrement%userInputs.skip_print_steps==0){ | ||
| if (!numbers::is_finite(solutionSet[fieldIndex]->l2_norm())){ | ||
| snprintf(buffer, sizeof(buffer), "ERROR: field '%s' solution is NAN. exiting.\n\n", | ||
| fields[fieldIndex].name.c_str()); | ||
| pcout<<buffer; | ||
| exit(-1); | ||
| } |
Contributor
There was a problem hiding this comment.
I suggest reverting to checking every time step for the time being.
…wer, it provides users better debugging information.
Contributor
|
Thank you!
…On Mon, Aug 28, 2023 at 6:10 PM landinjm ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/matrixfree/solveIncrement.cc
<#197 (comment)>
:
> + if (currentIncrement%userInputs.skip_print_steps==0){
+ if (!numbers::is_finite(solutionSet[fieldIndex]->l2_norm())){
+ snprintf(buffer, sizeof(buffer), "ERROR: field '%s' solution is NAN. exiting.\n\n",
+ fields[fieldIndex].name.c_str());
+ pcout<<buffer;
+ exit(-1);
+ }
Done
—
Reply to this email directly, view it on GitHub
<#197 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3FA44D634LNBA352X56JTXXUJN7ANCNFSM6AAAAAA37XX23Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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.
Fixing these to more closely resemble the process for explicit terms decreases computation time greatly. These changes have been tested on the Cahn-Hilliard app to produce identical results with an ~25% decrease in computation time.