Skip to content

boundary_flux: 2D P1 traces crash with a bare KeyError in the lumped line-mass assembly #413

Description

@lmoresi

Found in the PR #404 round-2 review (2026-07-24), pre-existing: the 2D lumped de-smear assembles P2 line masses (vertex-midpoint-vertex triples), so a P1 scalar/velocity trace has no midpoint keys and dies with a bare KeyError: (x, y) (also hit independently while building the #407 regression tests — the workaround was degree=2). With PR #404 merged, the docstring enumerates 'auto selects lumped for 2D traces', which now over-promises for P1. Fix: assemble the P1 two-node line mass when the trace has no midpoints (mirror of the 3D P1/P2 dispatch #404 added), or raise a legible NotImplementedError.

Underworld development team with AI support from Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions