Skip to content

Fix element damper evaluation on undefined variables (#32058)#32861

Open
BozoVazic wants to merge 1 commit intoidaholab:nextfrom
BozoVazic:fix-32058-element-damper
Open

Fix element damper evaluation on undefined variables (#32058)#32861
BozoVazic wants to merge 1 commit intoidaholab:nextfrom
BozoVazic:fix-32058-element-damper

Conversation

@BozoVazic
Copy link
Copy Markdown

closes #32058

Reason

Element dampers could still be evaluated on elements where a block-restricted variable to damp is undefined. In that case, element damper data such as solution/increment arrays can be empty, which leads to a MooseArray out-of-bounds access during damping evaluation.

Design

This mirrors the nodal damper fix.

The change adds an element-level guard in ElementDamper to determine whether the damper variable is defined on the current element. ComputeElemDampingThread then:

  • only collects variables for dampers whose variable is defined on the current element,
  • only reinitializes increment data for those variables, and
  • skips computeDamping() for dampers whose variable is undefined there.

A scalar-variable mooseAssert was also added in ElementDamper, analogous to the nodal-side guard.

A regression test was added for the block-restricted elemental bounding-value damper case, and the existing element damper test issue tags were updated so the legacy tests keep #7856 while the new regression test is associated with #32058.

Impact

This does not change the user-facing API. It fixes incorrect element damper evaluation for block-restricted variables and adds regression coverage for that case.

Validation was performed in both execution modes:

  • threaded execution reproduced the failure pre-patch and passed post-fix
  • pure MPI execution reproduced the failure pre-patch and passed post-fix

@BozoVazic
Copy link
Copy Markdown
Author

@GiudGiud I've added fix for element damper - simillar as for nodal damper

GiudGiud
GiudGiud previously approved these changes Apr 30, 2026
Copy link
Copy Markdown
Contributor

@GiudGiud GiudGiud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great fix!

Comment thread framework/src/dampers/ElementDamper.C
@GiudGiud GiudGiud self-assigned this Apr 30, 2026
@GiudGiud GiudGiud dismissed their stale review May 1, 2026 01:58

test failures. looks like damping is not being applied

@moosebuild
Copy link
Copy Markdown
Contributor

Job Test, step Results summary on 7154c8d wanted to post the following:

Framework test summary

Compared against 4e53b3b in job civet.inl.gov/job/3786076.

Added tests

Test Time (s) Memory (MB)
dampers/bounding_value_element_damper.bounding_value_block_restricted 0.74 60.69

Modules test summary

Compared against 4e53b3b in job civet.inl.gov/job/3786076.

No change

@moosebuild
Copy link
Copy Markdown
Contributor

Job Documentation, step Docs: sync website on 7154c8d wanted to post the following:

View the site here

This comment will be updated on new commits.

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.

Block restriction of nodal variables with a damper currently causes a seg fault

3 participants