Examples
Step by step, from a first hierarchy to stencils on patches:
- A first patch hierarchy: the base level, patches and the rules they follow, cell- and node-centered fields.
- Poisson’s equation on cells: the conservative cell-centered solve and its convergence.
- Poisson’s equation on nodes: faces with different conditions, periodic axes, electrodes, solving again, uniform-grid maps, and the solver backends (LU, FFT, PETSc).
- Domains that are not rectangles: an L and a T, with patches at their inner corners.
- Halos: stencils on patches: halo exchange and restriction.
- Regridding: tagging cells, clustering them into patches, and patches that follow a moving feature.
- Edge space: the electric-field space on the edges of the leaf cells.
- Three dimensions: a refined box, the nodal Poisson, the face space and the exact sequence, and the curl–curl equation with AMS.
- Variable coefficients: the operator of an implicit particle step, with a tensor per leaf cell, and the multigrid over the patches that solves it.
- Multigrid over patches: what the multigrid saves against the LU on a growing 3D mesh, its iterations as patches are added, and a coefficient that changes in every step.
- Anisotropic coefficients: a tensor turned against the grid (a magnetized plasma), with and without its off-diagonal terms, and how far the multigrid carries the anisotropy.
- Graded axes: cells that grow smoothly away from a wall
(
axis_nodes), a boundary layer resolved with a few dozen cells, and grading combined with patches. - Quadtree patches:
regrid(method="quadtree"), patches as the equal blocks of a quadtree, refinement by the number of markers per cell (marker_tags), and how much of the mesh a regrid keeps.
Every notebook in tutorials/ is executed when the site is built and published here with its
outputs. Download a notebook from its page to run the steps yourself.
See Building the docs for the cell tags that control what is shown.