Skip to content

New Grid API#2053

Open
ddudt wants to merge 124 commits into
masterfrom
dd/grids
Open

New Grid API#2053
ddudt wants to merge 124 commits into
masterfrom
dd/grids

Conversation

@ddudt

@ddudt ddudt commented Jan 7, 2026

Copy link
Copy Markdown
Collaborator

Resolves #1840

Restructures and generalizes the Grid classes. The new ABC AbstractGrid that all other grids inherit from does not assume a particular coordinate system. The new ABC AbstractGridFlux is specific to ($\rho,\theta,\zeta$) coordinates and is the parent class of all existing grid classes in flux coordinates. Most of the changes involved moving existing code into one of these new ABCs.

The goal is to allow for new grid classes in the future that represent other coordinate systems, without changing the existing public API.

To-Do:

  • Ensure tests pass
  • Generalize Basis dimensions (no references to flux coords)
  • Include isinstance(grid, AbstractGridCurve) checks wherever appropriate
  • Add 1D grids for Curve objects
  • Add 2D grids for FourierRZToroidalSurface objects
  • Alias flux grid class names like Grid -> CustomGridFlux, etc. (do not deprecate)
  • Update docs/dev_guide/notebooks/grid.ipynb
  • Utility function for LinearGrid._create_nodes?

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement General label for enhancement. Please also tag with "Speed", "Interface", "Functionality", etc functionality New feature or request to do things the code can't do now. interface New feature or request to make the code more usable or compatibility with another code run_benchmarks Run timing benchmarks on this PR against current master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Grid API

7 participants