Skip to content

feat(mesh): add Nastran conversion with result preservation - #67

Open
mnabian wants to merge 7 commits into
NVIDIA:mainfrom
mnabian:feat/nastran-source
Open

mnabian wants to merge 7 commits into
NVIDIA:mainfrom
mnabian:feat/nastran-source

Conversation

@mnabian

@mnabian mnabian commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Add NastranSource and MeshVTKSink to convert Nastran deck/OP2 datasets into native .pmsh, VTU, legacy VTK, or boundary VTP.

  • Discover result fields dynamically, align unambiguous nodal/element tables by ID, and retain other layouts as raw tables.
  • Preserve original connectivity, cards, constraints, and input bytes for exact recovery. VTU/VTK retain quadratic cells; native meshes use linear projections.
  • Support sparse/complex results, nested metadata, and guarded export after mesh transformations.

Support depends on pyNastran and supported element topologies. Embedded originals increase storage and can be disabled. VTP displays boundary fields while retaining the global archive. No customer data is included.

Validation

  • 155 feature tests passed with 96.5% statement coverage; generic VTK tests also pass with NumPy 2.
  • Both local sample datasets round-trip exactly through all four formats; source files recover byte-for-byte.
  • Strict Sphinx and changed-file pre-commit checks pass. Existing unrelated Rust CI and repository-wide Markdown failures are documented.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
  • An issue is linked to this pull request.

Dependencies

pyproject.toml and uv.lock are unchanged from the base branch. Install the optional reader explicitly with pip install 'physicsnemo-curator[mesh]' 'pyNastran>=1.4.1,<1.5'. CI uses invocation-only reader dependencies through uv run --with; existing dependency declarations and default environments remain unchanged.

@codecov-commenter

codecov-commenter commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.21560% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.71%. Comparing base (4111fce) to head (bf348d2).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...o_curator/domains/mesh/sources/_nastran_results.py 93.49% 11 Missing ⚠️
..._curator/domains/mesh/sources/_nastran_geometry.py 94.65% 7 Missing ⚠️
...physicsnemo_curator/domains/mesh/sinks/mesh_vtk.py 97.60% 6 Missing ⚠️
...physicsnemo_curator/domains/mesh/sinks/__init__.py 25.00% 3 Missing ⚠️
..._curator/domains/mesh/sources/_nastran_metadata.py 97.41% 3 Missing ⚠️
...hysicsnemo_curator/domains/mesh/sources/nastran.py 98.47% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
+ Coverage   63.39%   65.71%   +2.31%     
==========================================
  Files          88       93       +5     
  Lines        9488    10359     +871     
==========================================
+ Hits         6015     6807     +792     
- Misses       3473     3552      +79     
Flag Coverage Δ
integration 65.71% <96.21%> (+2.31%) ⬆️
unit 65.71% <96.21%> (+2.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mnabian mnabian changed the title feat(mesh): add Nastran deck and modal OP2 support feat(mesh): add Nastran source and VTK export Oct 16, 2026
@mnabian mnabian changed the title feat(mesh): add Nastran source and VTK export feat(mesh): add Nastran conversion with result preservation Oct 19, 2026
@mnabian
mnabian marked this pull request as ready for review October 19, 2026 22:48

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.

3 participants