numgrids

Working with numerical grids made easy.

_images/three_grids.png

numgrids gives you a high-level, NumPy-friendly API for numerical grids, differentiation matrices, and coordinate transformations — so you can focus on the physics or mathematics of your problem instead of bookkeeping grid indices and scale factors.

Grids & Axes

Equidistant, Chebyshev, logarithmic, and periodic axes, and axes for unbounded domains. Tensor-product grids in any dimension.

Axes
Spectral Differentiation

FFT, Chebyshev, and finite-difference methods — selected automatically. Sparse matrix export for PDE solves.

Differentiation
Curvilinear Coordinates

Built-in spherical, cylindrical, and polar grids with gradient, divergence, curl, and Laplacian.

Curvilinear grids
Boundary Conditions

Dirichlet, Neumann, and Robin BCs at the array level or inside sparse linear systems.

Boundary conditions
Operators & Solvers

Combine operators like formulas, then solve() boundary value problems or eig() eigenvalue problems, with fast direct solvers chosen automatically.

Operators and solvers
Nonlinear Problems

Newton’s method for nonlinear boundary value problems: just write down the residual. Continuation follows solution branches around folds.

Nonlinear problems
Time Evolution

Method-of-lines time stepping for heat, wave and Schrödinger equations, with Dirichlet, Neumann and Robin boundaries, time-dependent boundary values and an exponential integrator.

Time evolution