Skip to content

Add backtracking to ElementJacobianDamper#32807

Open
Andreas-Lepak wants to merge 1 commit intoidaholab:nextfrom
Andreas-Lepak:element-jacobian-damper-backtracking
Open

Add backtracking to ElementJacobianDamper#32807
Andreas-Lepak wants to merge 1 commit intoidaholab:nextfrom
Andreas-Lepak:element-jacobian-damper-backtracking

Conversation

@Andreas-Lepak
Copy link
Copy Markdown
Collaborator

refs #32806

Reason

ElementJacobianDamper already limits large element Jacobian changes on the displaced mesh, but
its probe path can still encounter a degenerate map when the full trial Newton update inverts an
element. In that case the solve falls back to a timestep cutback instead of trying a smaller
nonlinear update first.

This change adds an opt-in backtracking mode so the damper can reduce the probed update before FE
assembly reaches a DegenerateMap.

Design

  • Add optional use_backtracking, backtrack_factor, and max_backtrack_steps parameters to
    ElementJacobianDamper.
  • Refactor the damper probe into a helper that tests a damped trial update and reports the maximum
    relative JxW change.
  • Treat degenerate-map exceptions during the probe as a signal that the trial damping is too large,
    then iteratively reduce the trial damping until the probe succeeds and the Jacobian increment is
    below max_increment.
  • Always restore displaced node coordinates after a failed probe so the damper does not leave the
    displaced mesh in a modified state.
  • Add a regression test covering the new backtracking path and update the damper documentation.

Impact

This is a backward-compatible enhancement to ElementJacobianDamper.

  • Existing input files are unchanged unless they opt into use_backtracking = true.
  • The new mode improves robustness for large-displacement solves that would otherwise fail probing a
    nonlinear update due to temporary element inversion.
  • No existing APIs are removed or changed incompatibly.

Testing

  • Ran exception_handling.i without backtracking to confirm the existing negative-Jacobian path is
    preserved.
  • Ran exception_handling.i with Dampers/jac/use_backtracking=true to confirm the damper now
    reduces the update without emitting the negative-Jacobian error.
  • Ran git diff --check.

@moosebuild
Copy link
Copy Markdown
Contributor

Job Precheck, step Clang format on b97b5c9 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/docs/PRs/32807/clang_format/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format dba0fc8d126cb8a0d6b4e8eabf8b390a09e4aa91

@Andreas-Lepak Andreas-Lepak force-pushed the element-jacobian-damper-backtracking branch from b97b5c9 to 4b96447 Compare April 22, 2026 20:07
@moosebuild
Copy link
Copy Markdown
Contributor

moosebuild commented Apr 22, 2026

Job Documentation, step Docs: sync website on 28794bd wanted to post the following:

View the site here

This comment will be updated on new commits.

@Andreas-Lepak Andreas-Lepak force-pushed the element-jacobian-damper-backtracking branch from 4b96447 to 8133965 Compare April 22, 2026 23:45
  - add opt-in backtracking parameters
  - retry damped trial updates after DegenerateMap
  - restore node coordinates after failed probes
  - add regression coverage and documentation

  refs idaholab#32806
@Andreas-Lepak Andreas-Lepak force-pushed the element-jacobian-damper-backtracking branch from 8133965 to 28794bd Compare April 23, 2026 14:31
@moosebuild
Copy link
Copy Markdown
Contributor

Job Test, step Results summary on 28794bd wanted to post the following:

Framework test summary

Compared against a5a619e in job civet.inl.gov/job/3763732.

No change

Modules test summary

Compared against a5a619e in job civet.inl.gov/job/3763732.

Added tests

Test Time (s) Memory (MB)
solid_mechanics/test:jacobian_damper.backtrack_negative_jacobian 1.28 127.09

@moosebuild
Copy link
Copy Markdown
Contributor

Job Coverage, step Generate coverage on 28794bd wanted to post the following:

Framework coverage

a5a619 #32807 28794b
Total Total +/- New
Rate 85.88% 85.87% -0.00% -
Hits 132217 132216 -1 0
Misses 21747 21748 +1 0

Diff coverage report

Full coverage report

Modules coverage

Solid mechanics

a5a619 #32807 28794b
Total Total +/- New
Rate 85.38% 85.37% -0.01% 100.00%
Hits 28595 28643 +48 94
Misses 4896 4909 +13 0

Diff coverage report

Full coverage report

Full coverage reports

Reports

This comment will be updated on new commits.

@Andreas-Lepak Andreas-Lepak marked this pull request as ready for review April 23, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants