Skip to content

cells_supporting returns an empty fault zone on a 3-D mesh #620

Closed

Description

@lmoresi

cells_supporting(name) walks each labelled point through _cells_on_edge, which is an EDGE walk: in 3-D it takes support-of-support. A conforming surface's labelled points are FACETS (height 1), so in 3-D the walk starts one level too low — support(face) is already the cells, and the second support step lands on nothing. The zone comes back all-False, silently.

The method was only ever exercised in 2-D (add_conforming_surface), where a facet IS an edge and the walk coincides with getSupport. The 3-D case first bites with the Mesh-level conforming sheet (PR #589): a per-cell viscosity assigned from the zone would silently be the background value everywhere.

Fix: dispatch on point height — a facet's support is the cells in any dimension; keep the edge walk for labelled edges (a trace chain). Test: the zone of a placed sheet equals the union of its faces' support cells (test_0862).

Underworld development team with AI support from Claude Code

Activity

  1. lmoresi commented on Oct 7, 2026

    @lmoresi
    MemberAuthor

    Fixed, and now verified rather than read. Probed on development (f4c19cf2):

    $ pytest -q tests/test_0862_conforming_sheet_3d.py
    6 passed in 18.93s
    

    cells_supporting now branches on dimension instead of always taking the edge walk (discretisation_mesh.py:7758):

    fS, fE = dm.getHeightStratum(1)
    ...
    if fS <= p < fE:
        # A FACET's support is the cells, in any dimension -- a 2-D facet is an
        # edge, a 3-D facet is a face. (... the edge walk below returns NOTHING
        # from a 3-D face, silently -- the same trap `_cells_on_edge` documents)
        for c in dm.getSupport(p):
            ...
    else:
        # A labelled EDGE in 3-D (a trace chain): cells are one level further up.
        for c in _cells_on_edge(dm, p):

    So a 3-D conforming surface's labelled facets take getSupport directly, which is what this issue asked for, and the comment names the trap so the next reader does not re-derive it.

    The guard is real, not just the code: test_0862_conforming_sheet_3d.py:106-112 asserts zone.sum() == len(cells) where cells is built independently from each face's own getSupport, so an all-False zone fails rather than passing on a weaker > 0 check — and :107 keeps that > 0 too, which is the symptom this issue reported.

    No PR named this issue; it was carried by the 3-D conforming-sheet work.

    Closed in the untouched-issue triage (48 days, no activity).

  2. lmoresi commented on Oct 12, 2026

    @lmoresi
    MemberAuthor

    Reopened and labelled fixed-in-development, under the policy now in CLAUDE.md:

    While the fix is in an open PR, label the issue fixed-in-PR; when the PR merges, relabel it fixed-in-development, comment with the PR and the merge commit, and leave it open. Issues are closed when development is released to main.

    The fix stands and the evidence above is unchanged — this is a bookkeeping correction, not a reversal. Closing it on merge was wrong because development has not been released, so anyone running the release still has the defect; the label says where the fix is and the release sweep closes it.

  3. added
    fixed-in-development
    on Oct 12, 2026
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

    fixed-in-development

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions