llnl / llnl/smith

`SingleMortar` nodal normal shape derivatives miss reference-normalization dependence

Open
#1,643 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
245
Forks
36
Avg merge
8d 23h
Merged PRs (30d)
4

Description

Currently, `EdgeAvgNodalNormal` computes nodal normals using current coordinates for the numerator but reference coordinates for normalization:

- numerator depends on current coordinates x
- denominator depends on reference coordinates xref

Smith now registers shape-displaced reference coordinates with Tribol, so the evaluated normal uses xref = X + shape. That improves value consistency, but the Enzyme Jacobian path treats xref as constant in `ElementEdgeAvgNodalNormalJacobian()`. As a result, derivatives through the reference-normalization factor are not included.

This means shape derivatives can include the path through current coordinates but miss the path through the reference-coordinate normalization:

x = X + shape + u
xref = X + shape
n = n(x, xref)

The current derivative effectively captures dn/dx, but not dn/dxref.

Simplest fix I can think of is to let nodal normals use current coordinates in the denominator, so d/d(shape) matches d/du, but this will be inconsistent with Puso and Laursen (2004).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ElementEdgeAvgNodalNormalJacobian() and compare it with EdgeAvgNodalNormal(), focusing on the reference-coordinate normalization described in the issue. Determine the intended derivative behavior consistently with Puso and Laursen (2004); the work is done when shape derivatives include the relevant xref dependence and the behavior is validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
hpc
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.