-
Notifications
You must be signed in to change notification settings - Fork 117
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
Increased auxiliary term performance #197
Conversation
…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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like the idea of removing the NaN check for every time step because because the usere might miss the message if the code breaks between the screen outputs.
src/matrixfree/solveIncrement.cc
Outdated
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); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest reverting to checking every time step for the time being.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…wer, it provides users better debugging information.
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:
***@***.***>
|
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.