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

Evaluate residual and Jacobian together #19444

Closed
lindsayad opened this issue Nov 21, 2021 · 0 comments · Fixed by #19971
Closed

Evaluate residual and Jacobian together #19444

lindsayad opened this issue Nov 21, 2021 · 0 comments · Fixed by #19971
Assignees
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: task An enhancement to the software.

Comments

@lindsayad
Copy link
Member

lindsayad commented Nov 21, 2021

Reason

In #18563 I use AD to help compute coefficients for the Rhie-Chow velocity irrespective of whether I'm currently computing the residual and the Jacobian. At a minimum this roughly doubles the number of "Jacobian" evaluations (for line_search = none, worse for other line searches). By evaluating the residual and Jacobian together, for line_search = none, I would cut the number of Jacobian-like evaluations from 2n + 1 to n + 1 (where n is the number of nonlinear iterations and the 1 comes from the final residual evaluation).

Design

I don't know yet. We won't use SNES though (but we'll definitely use KSP and PC).

Impact

Speed up #18563 a lot. Could potentially help other AD-based applications as well. It could not help in some cases where 1) the cost of an additional Jacobian evaluation, at the end of the nonlinear solve when determining final convergence, is very high, or 2) if we are using line searches other than none.

@lindsayad lindsayad added the T: task An enhancement to the software. label Nov 21, 2021
@lindsayad lindsayad self-assigned this Nov 21, 2021
@lindsayad lindsayad added this to To do in FY22 NEAMS MP - TA Support via automation Nov 21, 2021
@lindsayad lindsayad added the P: normal A defect affecting operation with a low possibility of significantly affects. label Jan 6, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Feb 14, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Feb 16, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Feb 16, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Feb 16, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Feb 19, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Feb 21, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Mar 30, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Apr 5, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Apr 29, 2022
@lindsayad lindsayad moved this from To do to In progress in FY22 NEAMS MP - TA Support May 9, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue May 13, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Jun 6, 2022
lindsayad added a commit to lindsayad/moose that referenced this issue Jun 7, 2022
FY22 NEAMS MP - TA Support automation moved this from In progress to Done Jun 9, 2022
recuero added a commit to recuero/moose that referenced this issue Jun 15, 2022
…lab#19444)

These lines of code make assessment cases leveraging mortar constraints to
model gap heat transfer. It appears that problem variables (temperature) are
not properly intitialized when reinitializing face materials from the mortar
constraint loop. The ultimate cause of this issue is not known, but it's not
straightforward to reproduce in a MOOSE regression test.
crb3874 pushed a commit to crb3874/moose_colin that referenced this issue Jun 27, 2022
crb3874 pushed a commit to crb3874/moose_colin that referenced this issue Jun 27, 2022
…lab#19444)

These lines of code make assessment cases leveraging mortar constraints to
model gap heat transfer. It appears that problem variables (temperature) are
not properly intitialized when reinitializing face materials from the mortar
constraint loop. The ultimate cause of this issue is not known, but it's not
straightforward to reproduce in a MOOSE regression test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: task An enhancement to the software.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant