Skip to content

Increased auxiliary term performance#197

Merged
david-montiel-t merged 3 commits intoprisms-center:masterfrom
landinjm:master
Aug 28, 2023
Merged

Increased auxiliary term performance#197
david-montiel-t merged 3 commits intoprisms-center:masterfrom
landinjm:master

Conversation

@landinjm
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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