Skip to content

3D NVB refinement count diverges across PETSc patch versions from an identical base mesh (5198 vs 4816) #387

Description

@lmoresi

Found while unblocking #378's CI. The 3D adapt gate (test_0842) refines an identical 1472-cell tetrahedral base mesh to 5198 cells on the reference toolchain (source-built PETSc 3.25.0, macOS) and 4816 cells on CI (conda-forge PETSc 3.25.3, ubuntu) — a 382-cell difference from the same input.

Within either environment the refinement is partition-independent (identical counts at np1/np2/np4 locally; CI is serial) and structurally sound (CI's FMG-vs-GAMG + label-survival test passes on its 4816-cell child). So this is not a correctness failure of the refinement contract — but the coordinate-driven metric marking (r < 0.18 thresholds on computed centroids) is floating-point sensitive, and the conformity closure amplifies flipped cells into a materially different mesh. Worth understanding whether the divergence is (a) benign FP-at-threshold amplification, (b) a PETSc 3.25.0→3.25.3 behaviour change in the transform machinery, or (c) an unintended sensitivity in the tagged-state seeding — (c) would weaken the determinism story and matter for reproducibility across machines.

The gate test now logs base/child counts everywhere and pins the exact count only in the reference toolchain (see #378).

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