Skip to content

Serialize unsigned connectivity in binary ANSYS meshes - #1579

Open
sjdoane wants to merge 1 commit into
nschloe:mainfrom
sjdoane:codex/ansys-unsigned-connectivity
Open

sjdoane wants to merge 1 commit into
nschloe:mainfrom
sjdoane:codex/ansys-unsigned-connectivity

Conversation

@sjdoane

@sjdoane sjdoane commented Oct 26, 2026 •

Copy link
Copy Markdown

The default binary ANSYS writer raises KeyError: dtype('uint64') for unsigned mesh connectivity, as reported in #1335. This affects supported triangle/tetra cells produced by tools such as pygmsh.

Convert unsigned connectivity into a fresh native int64 array before selecting the existing signed64 binary section. Check that the one-based node IDs fit first, avoiding narrowing or wraparound. Signed and ASCII paths stay unchanged, and input arrays are not modified.

Validation on Python 3.12 / NumPy 2.5.4, macOS arm64:

  • New regressions: 12 failures / 11 passes before; 23 passes after. Combined with the existing ANSYS tests: 41 passes, independently repeated in a separate checkout.
  • An actual pygmsh/Gmsh-generated uint64 triangle surface fails on base and round-trips geometry/connectivity after the fix. Mixed cells, unsigned widths, endianness, read-only inputs, signed controls and binary wire/range boundaries are checked; the reviewer adds 32 independent cases.
  • Changed-file lint, configured Black/isort and diff checks pass. The broader suite remains failing: 686 passed / 75 failed / 10 skipped / 2 errors; the same 77 pre-existing failure/error IDs occur on base, including missing LFS fixtures and existing NumPy 2 formatting failures. The reviewer did not rerun that entire baseline comparison.

This addresses the dtype defect for existing ANSYS-supported cells. The unfiltered example in #1335 also contains already-unsupported vertex/line cells; this change does not add those. Solver import, other platform matrices and hosted CI were not tested locally.

Implementation and independent local review were performed by separate Codex agents.

This branch has not been deployed

No deployments
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.

1 participant