Examples
Jupyter notebooks demonstrating findiff in action. These notebooks are
in the examples/ directory of the
repository.
Basic Usage
First and higher-order derivatives on 1D and multi-dimensional grids, general differential operators with constant and variable coefficients, and accuracy control.
Non-Uniform Grids
examples-non-uniform-grids.ipynb
Computing derivatives on grids with non-equidistant spacing, useful when higher resolution is needed in regions of high curvature.
Periodic Boundary Conditions
Derivatives on periodic domains. Demonstrates how wrapping at boundaries produces circulant matrix representations.
Polar Coordinates
Using findiff in non-Cartesian coordinate systems by constructing the Laplacian in polar coordinates from its component derivatives.
Stencils
Inspecting automatic stencils and creating custom stencils for non-standard grid patterns (e.g. diagonal neighbors for the 2D Laplacian).
Vector Calculus
examples-vector-calculus.ipynb
Gradient, divergence, curl and Laplacian using the convenience classes on 3D grids.
Symbolic Representation
Using SymbolicMesh and SymbolicDiff to derive finite difference
schemes symbolically with sympy.