Skip to content
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

Merged
merged 3 commits into from
Aug 28, 2023

Conversation

landinjm
Copy link
Contributor

  1. Auxiliary terms have dirichlet boundaries applied every increment regardless of input boundary conditions
  2. NaN solutions are checked every increment

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.

landinjm 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.
Copy link
Contributor

@david-montiel-t david-montiel-t left a 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.

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);
}
Copy link
Contributor

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.

Copy link
Contributor Author

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.
@david-montiel-t
Copy link
Contributor

david-montiel-t commented Aug 28, 2023 via email

@david-montiel-t david-montiel-t merged commit c1a97ab into prisms-center:master Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants