From mathematical ideas to working code¶
Choose a question below, then follow the equation or interpolation formula into Python objects and a result you can inspect. The lessons target RBFLAB 0.5.0 or newer. Start with installation and your first PDE on an ellipse if you have not used the library before.

A field from data
Fit values, choose a kernel, then evaluate and differentiate.

A PDE from equations
Name the boundary, write the equations, choose a method, and solve.

Your own algorithm
Build local weights and sparse maps, then assemble the equation yourself.
The cards illustrate the three routes; each lesson identifies its actual cloud, operator, and numerical check. For geometry without a PDE, see mesh generation.
Start from data¶
- Interpolate scattered data: values at points determine an RBF expansion; evaluate the fitted field at new points.
- Differentiate a field: apply derivative functionals to an interpolant or a local map.
- Define a custom kernel: turn a symbolic radial formula into a kernel with the derivatives your calculation needs.
This route needs no PDE. It distinguishes measured values, expansion coefficients, and derivative weights as they arise.
Start from a PDE¶
- Solve the first ellipse problem: generate nodes, choose RBF-FD, solve, and measure error at unused points.
- Write a symbolic PDE: express the interior and boundary equations independently of the discretization.
- Compare global collocation, LHI, and RBF-FD: see which unknowns each method solves for. The individual global, LHI, and one-stencil RBF-FD lessons derive the constructions.
- Advance heat in time: see how a spatial sparse matrix enters a time-stepping formula.
The symbolic problem is an equation-driven interface. RBFFD and LHI can
assemble supported scalar problems from it. For a local construction you can
control term by term, follow the next route.
Build a numerical method¶
The local vocabulary is space → sampled functionals and trial functions →
target operators → sparse blocks → your algorithm. Functionals to
operators introduces Samples and
LocalApproximation. Then one stencil derives RBF-FD weights,
while local Hermite interpolation adds value, PDE, and boundary
functionals. Choose LHI centers explains their distinct roles.
Use LHI and heat from matrices to assemble a stationary solve and time loop from named blocks. Assemble your own PDE combines derivative maps with SciPy. These lessons show where RBFLAB supplies weights and where your code supplies forcing, boundary values, matrix algebra, and time integration. The cavity algorithm is an experimental coupled-flow construction, with its own stated limitations.
Global interpolation and collocation use dense coefficient systems. Specialized Stokes fields and the cavity use additional coupled-system machinery; the shared local functional interface does not yet replace every coupled solver.
Apply the ideas on curved and 3D domains¶
- Poisson with holes: label an obstacle boundary and solve.
- Mixed boundaries on an ellipse: assign Dirichlet, Neumann, and Robin equations to arcs.
- Heat on a flower: prescribe nonzero transient boundary data.
- Poisson inside a 3D ball: carry the geometry and operator into 3D.
Each application includes its domain or node image and a numerical recipe. The teaching guide offers lesson sequences and exercises. For conditioning, error interpretation, and refinement, use the mathematical foundations and validation guide.
Short code fragments need an installed rbflab package. Commands of the form
python -m examples... run from a source checkout; examples are not installed
as a Python subpackage. Plots require rbflab[examples]. See
installation and capabilities for the
optional C++ and PyTorch backends and their supported methods.