Skip to content

Adds PhysicsNeMo-Mesh API Docs#1461

Merged
peterdsharpe merged 7 commits intoNVIDIA:2.0.0-rcfrom
peterdsharpe:psharpe/add-mesh-docs
Mar 2, 2026
Merged

Adds PhysicsNeMo-Mesh API Docs#1461
peterdsharpe merged 7 commits intoNVIDIA:2.0.0-rcfrom
peterdsharpe:psharpe/add-mesh-docs

Conversation

@peterdsharpe
Copy link
Collaborator

PhysicsNeMo Pull Request

Description

Checklist

Dependencies

Review Process

All PRs are reviewed by the PhysicsNeMo team before merging.

Depending on which files are changed, GitHub may automatically assign a maintainer for review.

We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.

AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.

@peterdsharpe peterdsharpe marked this pull request as ready for review February 27, 2026 01:13
@peterdsharpe
Copy link
Collaborator Author

/blossom-ci

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 27, 2026

Greptile Summary

This PR adds a comprehensive Sphinx API documentation section for the PhysicsNeMo-Mesh library (docs/mesh/), covering 16 submodules (core mesh class, I/O, discrete calculus, curvature, geometry, boundaries, neighbors, spatial queries, sampling, transformations, subdivision, smoothing, remeshing, repair, validation, and visualization) plus a top-level index page wired into docs/api_index.rst.

The documentation is well-structured, accurate against the source code, and provides useful conceptual overviews and runnable code examples for each module. One issue was found:

  • Missing mesh initialization in calculus.rst example — the code block uses a mesh variable immediately after imports without ever constructing one, which would produce a NameError if a user tried to run the snippet verbatim. All other pages in this PR correctly instantiate a mesh (typically via sphere_icosahedral.load(...)) before using it.

Important Files Changed

Filename Overview
docs/mesh/index.rst Main landing page for the Mesh API docs; overview, data model, quick-start, key features, and toctree all look accurate and well-structured.
docs/mesh/calculus.rst Code example uses mesh before it is instantiated, causing a NameError if run verbatim; the Mesh import is present but never used to create an object.
docs/mesh/core.rst Correctly documents the Mesh tensorclass with a working example; autoclass:: Mesh under the right currentmodule.
docs/mesh/boundaries.rst Accurate description of boundary detection, facet extraction, and topology checking; methods and module path match the implementation.
docs/mesh/repair.rst Documents the repair pipeline accurately; all functions listed (merge_duplicate_points, remove_degenerate_cells, fix_orientation, fill_holes) are exported from physicsnemo.mesh.repair.
docs/mesh/transformations.rst Covers geometric transformations and projections in a single file with two currentmodule resets; both submodules exist and export the documented symbols.
docs/mesh/visualization.rst Correctly documents draw_mesh under physicsnemo.mesh.visualization.draw_mesh; backends (matplotlib / PyVista) and usage examples match the implementation.

Last reviewed commit: d2ec699

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 27, 2026

Additional Comments (1)

docs/mesh/calculus.rst
mesh used before it is defined in code example

The code block imports Mesh and the calculus functions, but then immediately uses mesh (e.g. mesh.point_data["T"] = ...) without ever constructing a Mesh instance. Running this snippet verbatim produces a NameError: name 'mesh' is not defined.

A mesh creation step is needed before the first use of mesh. For example, inserting the following after the imports would fix it:

from physicsnemo.mesh.primitives.surfaces import sphere_icosahedral
mesh = sphere_icosahedral.load(subdivisions=2)

The same pattern (importing Mesh but creating the instance via sphere_icosahedral.load) is already used consistently in boundaries.rst, curvature.rst, geometry.rst, and other pages in this PR.

@peterdsharpe peterdsharpe changed the base branch from main to 2.0.0-rc February 27, 2026 01:49
@peterdsharpe
Copy link
Collaborator Author

/blossom-ci

Copy link
Collaborator

@megnvidia megnvidia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done. I just have what probably feels like a lot of very minor requested changes.

Copy link
Collaborator

@megnvidia megnvidia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done. I just have what probably feels like a lot of very minor requested changes.

peterdsharpe and others added 5 commits March 2, 2026 16:25
Co-authored-by: megnvidia <mmiranda@nvidia.com>
Co-authored-by: megnvidia <mmiranda@nvidia.com>
@peterdsharpe
Copy link
Collaborator Author

/blossom-ci

@peterdsharpe peterdsharpe requested a review from megnvidia March 2, 2026 21:52
@peterdsharpe peterdsharpe merged commit e15b22d into NVIDIA:2.0.0-rc Mar 2, 2026
1 check passed
@peterdsharpe peterdsharpe deleted the psharpe/add-mesh-docs branch March 2, 2026 22:56
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.

2 participants