Skip to content

Radial Basis Functions Theory

Radial Basis Functions (RBF) use only a distance (typically Euclidean) when constructing the basis. For example, an interpolator for u(x) is given by the linear combination of RBFs

u(x)=i=1Nαiϕ(|xxi|)

where is a norm (we will use Euclidean from here on) and so |xxi|=r is the Euclidean distance (although any norm can be used) and N is the number of data points.

There are several types of RBFs to choose from, some with a tunable shape parameter, ε. Here are some popular ones:

TypeFunction
Polyharmonic Splineϕ(r)=rn where n=1,3,5,7,
Multiquadricϕ(r)=(rε)2+1
Inverse Multiquadricϕ(r)=1/(rε)2+1
Gaussianϕ(r)=e(rε)2

Augmenting with Monomials

The interpolant may be augmented with a polynomial:

u(x)=i=1Nαiϕ(|xxi|)+i=1Npγipi(x)

where Np=(m+dm) is the number of monomials (m is the monomial order and d is the dimension of x) and pi(x) is the monomial term.

For instance, in 2D with m=2, we have Np=6 and

pi(x){1,x,y,x2,xy,y2}

When we require the interpolation to be exact on a set of data points {xi,u(xi)} where i=1,,N, we obtain the following linear system for the interpolation coefficients:

[APPT0][αγ]=[u0]

where

A=[ϕ(|x1x1|)ϕ(|x1xN|)ϕ(|xNx1|)ϕ(|xNxN|)]P=[p1(x1)pN(x1)p1(xN)pN(xN)]

and u is the vector of dependent data points

u=[u(x1)u(xN)]

and α and γ are the interpolation coefficients. Note that the equations relating to PT are included to ensure optimal interpolation and unique solvability, given that conditionally positive radial functions are used and the nodes in the subdomain form a unisolvent set. See (Fasshauer, et al. - Meshfree Approximation Methods with Matlab) and (Wendland, et al. - Scattered Data Approximation).

Polynomial augmentation of the system has two benefits:

  1. Increases accuracy, especially for polynomial fields and near boundaries.

  2. Ensures the linear system has a unique solution for certain types of RBFs (conditionally positive definite).

See (Flyer, et al. - On the role of polynomials in RBF-FD approximations: I. Interpolation and accuracy) for more information on this.

Local Collocation

The traditional Kansa approach used in most RBF methods is based on constructing a unique interpolant for all the nodes in the domain. This involves coupling all nodes in the domain simultaneously and therefore makes it a global method. Such a global approach, while theoretically exact, scales poorly: the resulting dense system becomes prohibitively expensive and increasingly ill-conditioned as the number of nodes grows, particularly in 3D, due to the curse of dimensionality. Instead, RadialBasisFunctions.jl employs a local approach, where each node is influenced only by its k nearest neighbors.

Boundary Conditions

Radial Basis Functions can also be used to solve PDEs with various types of boundary conditions (Dirichlet, Neumann, Robin, etc.), when this is done in a meshless context, special considerations must be made to ensure that all local systems, including those near boundaries, remain well-posed. This package enables different approaches for handling boundary conditions, among them, the Hermite approach is suggested when the PDE is to be solved only at interior nodes. Furthermore, it can also be used to interpolate data near the boundary while including boundary conditions where these are known.

Hermite Approach for Boundary Stencils

When a stencil is centered around an internal node but includes boundary nodes, standard RBF collocation can lead to ill-conditioning and singularity issues. This occurs because applying boundary operators B (such as normal derivatives for Neumann conditions) to the interpolation conditions breaks the symmetry of the local matrix A.

The RBF-HFD (Hermite Finite Difference) method resolves this issue by modifying the basis functions only for stencils near boundaries. Instead of keeping the same basis regardless of boundary conditions and applying the operator to the interpolation conditions (which creates asymmetry), the Hermite approach modifies the basis itself.

For a stencil with mI internal nodes and mB boundary nodes (m=mI+mB), the approximate solution uh (the RBF interpolant) takes the form:

uh(xc)=j=1mIαjϕ(|xcxj|)+j=mI+1mαjB2ϕ(|xcxj|)+k=1Npγkpk(xc)

where xc is the stencil center (evaluation point), αj are RBF coefficients, γk are polynomial coefficients, and B2 denotes the boundary operator applied to the second argument of the kernel (i.e., to xj), and B1 denotes application to the first argument (i.e., to xc). The key insight is that the basis function is changed from ϕ(,xj) to B2ϕ(,xj) for boundary nodes.

The local system becomes:

[AI,IB2AI,BPIB1AB,IB1B2AB,BBPBPIT(BPB)T0][αIαBγ]=[uIg0]

where subscripts I and B denote internal and boundary quantities, respectively. The matrix blocks AI,I, AI,B, AB,I, and AB,B represent RBF evaluations between internal-internal, internal-boundary, boundary-internal, and boundary-boundary nodes. The vectors αI and αB are the RBF coefficients for internal and boundary nodes, γ are the polynomial coefficients, uI contains function values at internal nodes, and g contains boundary condition values. This system is now symmetric and positive definite (for appropriate RBF kernels), ensuring unique solvability regardless of the boundary condition type.

We remark that the Hermite approach is only applied to stencils that include boundary nodes. For internal stencils far from boundaries, the standard RBF formulation remains unchanged, maintaining computational efficiency where boundary effects are not present.

Constructing an Operator

In the Radial Basis Function - Finite Difference method (RBF-FD), a stencil is built to approximate derivatives using the same neighborhoods/subdomains of N points. <!– This is used in the [[MeshlessMultiphysics.jl]] package. –> For example, if L represents a linear differential operator, one can express the differentiation of the field variable u at the center of the subdomain xc in terms of some weights w and the field variable values on all the nodes within the subdomain as

Lu(xc)=i=1Nwiu(xi)

We can find w by satisfying

i=1Nwiϕj(xi)=Lϕj(xc)

for each basis function ϕj (where ϕj(xi)=ϕ(|xixj|)) and j=1,,N, and if you wish to augment with monomials, we also must satisfy

i=1Npλipj(xi)=Lpj(xc)

which leads to an overdetermined problem

min(12wAwwLϕ), subject to Pw=Lp

which is practically solved as a linear system for the weights w as

[APPT0][wλ]=[LϕLp]

where λ are treated as Lagrange multipliers and are discarded after solving the linear system. The vectors are defined as

Lϕ=[Lϕ(|x1xc|)Lϕ(|xNxc|)]Lp=[Lp1(xc)LpNp(xc)]

where Lϕ is the vector of the operator applied to each RBF basis function evaluated at the stencil nodes, and Lp is the vector of the operator applied to each polynomial basis function.

Hermite Operator Construction

When constructing operators for stencils near boundaries using the Hermite approach, the system is modified to:

[AI,IB2AI,BPIB1AB,IB1B2AB,BBPBPIT(BPB)T0][wIwBλ]=[L1ϕ(xc,XI)L1B2ϕ(xc,XB)Lp(xc)]

where L1 denotes the differential operator applied to the first argument of the kernel, XI is the set of internal nodes in the stencil, and XB is the set of boundary nodes in the stencil. This yields weight vectors wI and wB that properly account for boundary conditions while maintaining symmetry. The global system assembly then proceeds as:

Luh(xi)=jXi,Iwj(xi)u(xj)+jXi,Bwj(xi)g(xj)

where g(xj) represents the boundary condition values at boundary nodes.

Constructing an Operator Treating Boundary Nodes as Unknowns

In some applications, particularly multi-region or coupled problems, it may be advantageous to solve the governing equation at boundary nodes as well, treating all nodes (interior and boundary) as unknowns in the global system. When this strategy is adopted, an alternative implementation to the Hermite approach becomes available and the usual interpolation scheme can be preserved.

Rather than modifying the basis functions for boundary nodes, this approach maintains the standard RBF basis {ϕ(|xxj|)} for all nodes regardless of their position. When treating boundary nodes as unknowns in the global system, the operator construction simplifies significantly. The key distinctions are:

  • When the stencil includes boundary nodes but the evaluation point is interior: Apply the standard RBF-FD method unchanged. Boundary neighbors contribute as regular unknowns with no special treatment.

  • When the evaluation point itself is on the boundary: Instead of modifying basis functions, modify the right-hand side of the local system. For a boundary point xc (the stencil center) with operator B, construct the RHS as Bϕ(xc) and Bp(xc) rather than using the standard differential operator.

This means the collocation matrix A always uses the standard kernel evaluation:

[A]ij=ϕ(|xixj|)

maintaining symmetry trivially. The local system for a boundary evaluation point becomes:

[APPT0][wλ]=[Bϕ(xc)Bp(xc)]

This approach is significantly simpler than the Hermite method and stencil classification depends only on the evaluation point type, the same RBF basis is used everywhere, and interior stencils with boundary neighbors require no special treatment.

References

  • Fasshauer, G. E., & McCourt, M. (2015). Kernel-based Approximation Methods using MATLAB. World Scientific. https://doi.org/10.1142/9335

  • Flyer, N., Fornberg, B., Bayona, V., & Barnett, G. A. (2016). On the role of polynomials in RBF-FD approximations: I. Interpolation and accuracy. Journal of Computational Physics, 321, 21-38. https://doi.org/10.1016/j.jcp.2016.05.026

  • Shankar, V., Wright, G. B., Kirby, R. M., & Fogelson, A. L. (2015). A radial basis function (RBF)-finite difference (FD) method for diffusion and reaction-diffusion equations on surfaces. Journal of Scientific Computing, 63(3), 745-768. https://doi.org/10.1007/s10915-014-9914-1

  • Wendland, H. (2004). Scattered Data Approximation. Cambridge University Press. https://doi.org/10.1017/CBO9780511617539

  • Wright, G. B., & Fornberg, B. (2006). Scattered node compact finite difference-type formulas generated from radial basis functions. Journal of Computational Physics, 212(1), 99-123. https://doi.org/10.1016/j.jcp.2005.05.030