LLNL / serac

Serac is a high order nonlinear thermomechanical simulation code
BSD 3-Clause "New" or "Revised" License
178 stars 31 forks source link

Add isoparametric derivatives to domain integral #1106

Closed samuelpmishLLNL closed 3 months ago

samuelpmishLLNL commented 4 months ago

This PR introduces an interface breaking change that modifies the qfunction signature for DomainIntegrals.

Specifically, before this PR the second qfunction argument for DomainIntegral was a vector pointing to the quadrature point's spatial position. In BoundaryIntegral, the second argument is a tuple of

  1. the spatial position of the quadrature point
  2. the derivative of the quadrature point position w.r.t. isoparametric coordinates

This was problematic for 2 main reasons:

  1. The signatures for qfunctions were inconsistent between DomainIntegral and BoundaryIntegral, which is confusing for users.
  2. some applications need $\displaystyle \frac{\partial X}{\partial \xi}$ (e.g. TMOP / element quality, SUPG ... ) and there was no way to get that info before this PR.

So, these changes make the second argument of DomainIntegral qfunctions a tuple that includes $\displaystyle \frac{\partial X}{\partial \xi}$, addressing the issues listed above.


The new qfunction signature for DomainIntegrals looks like

auto qf = [](
  // time
  double t, 

  // a tuple of the quadrature point position and dX_dxi
  tuple< tensor< double, dim >, tensor< double, dim, dim > > position,

  // optional struct of internal variables
  StateType & state,

  // any parameter fields requested
  auto ... params
) {
  // ...
}
codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.67%. Comparing base (b1bedfe) to head (8f0a14c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1106 +/- ## =========================================== + Coverage 90.63% 90.67% +0.04% =========================================== Files 162 163 +1 Lines 14464 14538 +74 =========================================== + Hits 13109 13183 +74 Misses 1355 1355 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

samuelpmishLLNL commented 3 months ago

I don't know why the lassen build is failing, the error message points to a syntax error isn't present in the actual source code.

I remember seeing this kind of problem on our lassen CI jobs in the past, but I don't remember the cause / solution.