Skip to content

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.

Illustration of a sparse local derivative map

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

  1. Interpolate scattered data: values at points determine an RBF expansion; evaluate the fitted field at new points.
  2. Differentiate a field: apply derivative functionals to an interpolant or a local map.
  3. 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

  1. Solve the first ellipse problem: generate nodes, choose RBF-FD, solve, and measure error at unused points.
  2. Write a symbolic PDE: express the interior and boundary equations independently of the discretization.
  3. 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.
  4. 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

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.