Skip to content

Stress-history docs agree with the code; the cylinder at resolution 20 - #1233

Merged
lmoresi merged 3 commits into
developmentfrom
docs/stress-history-consistency
Nov 20, 2026
Merged

lmoresi merged 3 commits into
developmentfrom
docs/stress-history-consistency

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

On development after #1231 and #1232 (both merged). Three commits: bb04f26, 809ab8f and d3a224e (the last from the second-desk review). This is documentation only, plus one docstring.

The task was A6 and A7 of the stress-history recommendations. This PR does the part that does not wait on the choice of default. Promoting transport-schemes.md out of draft "with the new defaults" waits for that choice, which is with Louis after the measurements below.

Docs that disagreed with the code

  • transport-schemes.md, adjoint. The guide said the semi-Lagrangian interpolation "is materialised, so … adjointable end to end". The code's _adjoint_support says otherwise: SemiLagrangian and IntegrationPointSemiLagrangian refuse ("the interpolation at the departure points is not materialised as an operator"), while the grid histories are an implicit residual. The guide now says what the code declares, and the "adjoint can differentiate" claim is gone from the SemiLagrangian row.
  • transport-schemes.md, table. The table now includes ForwardSemiLagrangian and the solver-owned Lagrangian, and the family list includes the forward history.
  • vep-transverse-isotropy-faults.md. It said the stress history is "advected to the current particle positions (the Lagrangian stress history)". It now names stress_transport: by default a trace-back, particles only with "lagrangian", and the grid history on a split-fault mesh (On a split-node fault the stress history stays on the grid; tracing flavours are refused (#871) #1232).
  • AdvDiffusionSLCN docstring. It said monotone_mode="clamp" bounds by the k = dim+1 nearest DOFs. It now says the containing cell's closure, which has been the evaluator's default since SLCN trace-back gives a partition-dependent answer (1.6% at np=8 on a 128x128 level set) #682. The old bound survives only behind UW_MONOTONE_CLAMP_BOUND=nearest.

Numbers measured on the defect (A7)

#1231 marks the nodal results taken while the history did not move: the subsystem warning, the guide's #735 and #749 rulings, and the test_1059 re-pin.

New measurement: the cylinder at resolution 20

The confined DFG cylinder at Re 100, Wi 0.5, β 0.5, resolution 20, with the nodal history carrying its stress (#1231). Drag at t 2 (the grid history's own reference is 4.593 at resolution 20 and 4.134 at resolution 80):

history drag at t 2
grid 4.505
nodal 4.985
integration point, unsmoothed 3.370
integration point, c = 0.07 3.046

Waters and King at 1/16, Δt 0.0125 (exact 0.72077 at t 2):

history t 2 t 6.5
integration point, unsmoothed 0.72143 (the most accurate) 0.59863 (rung)
integration point, c = 0.07 0.73262 —
nodal 0.72379 —

The subsystem doc said smoothing "costs nothing" on the cylinder. A dated section now gives these numbers, and the old sentence now says what it holds for (the mode does not grow) and points to them. The adjoint paragraph also names the forward history, whose per-cell fit is not materialised. Measured by H7 (the stress-history desk, a Claude session on a 96-thread Linux workstation: Intel Xeon Gold 6240R, MPICH), serial.

Underworld development team with AI support from Claude Code

@lmoresi

lmoresi commented Nov 19, 2026

Copy link
Copy Markdown
Member Author

Second-desk review of #1233, by H3 (the units desk, a Claude session doing second reviews). I checked the docs against the code at 7dd51a7, the two commits on top of #1232 (fb44b56).

Verdict: the corrections match the code. There are two findings, both small.

Checked against the code

  • Adjoint. Each _adjoint_support declares what the guide now says. Eulerian (and so EulerianSUPG) is an implicit residual whose linearisation is the owning solver's Jacobian. SemiLagrangian and IntegrationPointSemiLagrangian refuse, because the interpolation at the departure points is not materialised. Lagrangian and Lagrangian_Swarm are valid while the particle set is fixed.
  • ForwardSemiLagrangian row. It matches the class docstring: launch points at the integration points, traced forward one step; arrivals fitted per cell to a discontinuous P1 field; read-back smoothing; first order; TODO(DESIGN) for periodic seams and moving meshes.
  • Lagrangian row. It matches stress_transport="lagrangian": the solver creates and populates the swarm, and the history is read through a discontinuous cells proxy, as validated by test_0070.
  • vep-transverse-isotropy-faults.md. It matches the stress_transport docstring and _TRACING_STRESS_TRANSPORTS: a semi-Lagrangian trace-back by default, particles with "lagrangian", and "eulerian" on a mesh with a split-node fault, where the tracing flavours are refused.
  • AdvDiffusionSLCN docstring. It matches functions_unit_system: the clamp bound is the containing cell's closure unless UW_MONOTONE_CLAMP_BOUND=nearest.

Findings

  1. The "costs nothing" claim is still there. stress-transport.md, at the end of "Store smoothing for the integration-point history below Courant one", still reads: "as on the cylinder benchmark, the smoothing is unnecessary and costs nothing if left on". The new dated section says smoothing at c = 0.07 costs about a tenth at resolution 20. The description says the dated section gives these numbers "instead", but the old sentence stays unqualified. It should name the resolution it holds at, or point to the new section.
  2. The adjoint paragraph leaves out ForwardSemiLagrangian. This PR adds it to the table, and its _adjoint_support refuses: the per-cell least-squares fit of the arrivals is not materialised, and which cell an arrival lands in is piecewise constant in the velocity. The paragraph lists the trace-back histories that are not adjointable, and the forward one belongs with them.

I did not rerun the cylinder or the Waters and King numbers; I checked only that the doc gives the numbers the description gives.

Underworld development team with AI support from Claude Code

@lmoresi
lmoresi force-pushed the feature/stress-history-no-fault-crossing branch from fb44b56 to 8cafff6 Compare November 19, 2026 22:19
lmoresi pushed a commit that referenced this pull request Nov 19, 2026
… forward history's adjoint (review of #1233)

Underworld development team with AI support from Claude Code
@lmoresi
lmoresi force-pushed the docs/stress-history-consistency branch from 7dd51a7 to ff38862 Compare November 19, 2026 22:19
@lmoresi
lmoresi force-pushed the feature/stress-history-no-fault-crossing branch from 8cafff6 to 1eadd5f Compare November 19, 2026 23:40
lmoresi pushed a commit that referenced this pull request Nov 19, 2026
… forward history's adjoint (review of #1233)

Underworld development team with AI support from Claude Code
@lmoresi
lmoresi force-pushed the docs/stress-history-consistency branch from ff38862 to 357ad18 Compare November 19, 2026 23:40
lmoresi pushed a commit that referenced this pull request Nov 20, 2026
… forward history's adjoint (review of #1233)

Underworld development team with AI support from Claude Code
@lmoresi
lmoresi force-pushed the docs/stress-history-consistency branch from 357ad18 to 1d31fca Compare November 20, 2026 00:34
…e TI-VEP history, the clamp bound, the guide's table

Underworld development team with AI support from Claude Code
… smoothing costs there

Underworld development team with AI support from Claude Code
… forward history's adjoint (review of #1233)

Underworld development team with AI support from Claude Code
@lmoresi
lmoresi force-pushed the docs/stress-history-consistency branch from 1d31fca to d3a224e Compare November 20, 2026 01:38
@lmoresi
lmoresi changed the base branch from feature/stress-history-no-fault-crossing to development November 20, 2026 01:39
@lmoresi
lmoresi merged commit bdf8cab into development Nov 20, 2026
9 checks passed
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.

2 participants