Skip to content

2D boundary-flux recovery: degree-3 traces return silently WRONG flux (P3 edge DOFs collapse onto one coordinate key) #459

Closed

Description

@lmoresi

Found by the PR #456 adversarial review, pre-existing (byte-identical wrong values on development before that batch — not a regression from the P1/P2 dispatch fix).

Defect

boundary_flux on a 2D wall with a degree-3 field returns finite but wrong values: probe measured flux in the range −0.57…−0.74 against an exact −1.0. Mechanism: both P3 edge DOFs report the same edge-point coordinate from the coordinate section, so _key() collapses them onto one dictionary key in nodeR — one reaction silently overwrites the other — and the recovery then proceeds down the P2 (vertex-midpoint-vertex) path as if nothing were wrong. The new mixed-trace guard cannot catch it because the keys collapse cleanly.

Fix direction

_desmear should reject traces whose field reports more boundary DOFs than distinct coordinate keys (a cheap, exact detection of the collapse), or explicitly reject trace degree > 2 with a legible NotImplementedError, until a genuine P3 line-mass is worth implementing.

Probe: pr456_probes/probe3_p3_trace.py / probe3b_p3_old_vs_new.py from the review session (session scratchpad; reproduce with a degree-3 Poisson on a StructuredQuadBox, unit flux through the top wall).

Underworld development team with AI support from Claude Code

Activity

  1. added
    bug
    on Jul 28, 2026
  2. lmoresi commented on Aug 13, 2026

    @lmoresi
    MemberAuthor

    Fixed by PR #537, merged as 0b574ac. Three compounding defects (unread second edge reaction, coordinate-key collapse, P2 mass on a P3 trace): degree-3 flux error 4.35e-1 → 3.1e-4 with P1/P2 bit-identical; the collapse guard is now a permanent refusal shared by the 2-D and 3-D branches; np2/np4 verified. Follow-up noted on the PR: a P3 velocity through boundary_normal_traction now refuses legibly rather than computing garbage — proper support is separate work if ever needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions