arXiv:2610.25484math.NAOct 2026

Manuscript Offprint

arXiv:2610.25484

KernelPack-JAX: a meshless differentiable GPU framework for node generation and forward and inverse PDE problems

Alberto Cattaneo, M. Keith Ballard, Robert M. Kirby, Grady B. Wright, Varun Shankar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Alberto Cattaneo a^{a}, M. Keith Ballard b^{b}, Robert M. Kirby a,c^{a,c}, Grady B. Wright d^{d} and Varun Shankar a,∗^{a,*}

a^{a}Kahlert School of Computing, University of Utah, Salt Lake City, UT, 84112, USA

b^{b}Materials and Manufacturing Directorate, Composite Performance, Air Force Research Laboratory, Wright-Patterson AFB, OH, 45324, USA

c^{c}Scientific Computing and Imaging Institute, University of Utah, Salt Lake City, UT, 84112, USA

d^{d}Department of Mathematics, Boise State University, Boise, ID, USA

ARTICLE INFO

Keywords:

radial basis functions

RBF-FD

node generation

partition of unity

differentiable programming

inverse problems

GPU

2020 MSC: 65D12

65M70

65M32

65N35

65N21

65Y05

Abstract

We present KernelPack-JAX, a meshless, differentiable, GPU framework in JAX for solving forward and inverse PDE problems in domains whose boundaries, including internal obstacles, are given only by samples of their smooth pieces. Our node generator is based on a new stacked representation of piecewise-smooth boundaries, in which a parametric partition of unity of each smooth piece induces the supports of a curl-free implicit partition of unity of the whole boundary. This representation keeps the edges and corners of the boundary and classifies every point of space without a global fit. Boundary and interior nodes are then selected by a parallel greedy independent-set algorithm that reproduces sequential Poisson-disk sampling exactly. We discretize elliptic and parabolic problems with radial basis function-generated finite differences (RBF-FD) on stencils selected by a new visibility heuristic to avoid crossing the boundary, with ghost nodes for the boundary conditions. In addition, our framework exposes a GPU sparse direct solver to JAX as a differentiable linear solve, so that Jacobians of time-dependent problems cost a small multiple of a forward solve. We derive error estimates that separate consistency from stability and bound the parameter error by the forward error. We demonstrate high-order convergence for Darcy flow, reaction–diffusion, and advection–diffusion in 2D and 3D domains, including one with an internal obstacle, and show that the recovered parameters largely follow the forward errors. We also present timings for every stage.

1. Introduction

Many applications require the solution of partial differential equations (PDEs) in domains whose geometry is known only through data, such as points sampled from medical images [2, 154] or from images of porous rock [19], scanned surfaces [14, 94], or the output of another computation. Many of these PDEs also contain parameters that must be recovered from measurements of the solution [151], such as the permeability of an aquifer or a reservoir [27, 119, 168], the rates of reactions in models of blood clotting [61, 97], or a velocity field. We consider such forward and inverse problems in two and three dimensions, in domains whose piecewise-smooth boundaries have edges and corners and may include internal obstacles. Our framework is designed to satisfy four criteria. First, the input should be only samples of the smooth pieces of the boundary, from which we generate node sets that respect a prescribed spacing h and keep the edges and corners. Second, the discretization should be of high order and stable near the boundary, even in nonconvex domains. Third, derivatives of the discrete solution with respect to the parameters should cost little more than the solution itself. Fourth, every stage should run in parallel on the GPU.

Meshless methods suit such problems, since they need only nodes in the domain and on its boundary. Radial basis function-generated finite differences (RBF-FD) approximate differential operators on scattered nodes by local interpolation on stencils [29, 144, 155, 166], and have matured into a high-order method for PDEs in complex domains [53, 60, 64, 65]. Flyer, Fornberg, Bayona, and Barnett showed that polyharmonic splines [46] augmented with polynomials converge at the order set by the polynomial degree, with no shape parameter to choose [10, 58]. Bayona [8] explained the roles of the two parts of the basis, and Bayona, Flyer, and Fornberg [9] analyzed the accuracy near domain boundaries. RBF-FD has been applied to nonlinear transport on the sphere [59] and to the Navier–Stokes

*Corresponding author

shankar@cs.utah.edu (V. Shankar)

ORCID(s):

Cattaneo, Ballard, Kirby, Wright, and Shankar: Preprint submitted to Elsevier

Page 1 of 45 equations [57, 135], has been run on multiple GPUs [21], and its parameters have been studied systematically [89, 99]. Our own work has contributed RBF-FD methods for PDEs on surfaces [51, 139, 141], overlapped stencils [136], hyperviscosity stabilization of advection-dominated problems [137, 142], building on [66], and methods for domains with moving boundaries [140]. In a complex domain, RBF-FD replaces the generation of a mesh [69, 124, 146] by two other tasks, the generation of nodes and the closure of the discretization at the boundary. When the PDE contains unknown parameters, a third task is the computation of derivatives of the discrete solution with respect to them.

Node generation for meshless methods has received much attention in the past decade, and Suchde, Jacquemin, and Davydov [152] give a recent survey. Advancing-front methods, which Löhner and Oñate [102, 103] introduced for filling space with points, were made fast and of variable density by Fornberg and collaborators [63, 133], with related algorithms in [158, 170]. Slak and Kosec [147] developed a dimension-independent generator of Poisson-disk type, which underlies the Medusa library [148] and has been parallelized [43] and extended to parametric surfaces [47] and to multi-patch NURBS models (including CAD models) [48]; Jacquemin, Suchde, and Bordas [88] generate and adapt point clouds directly from CAD descriptions. All of these methods take the boundary from an exact or CAD description. In contrast, our earlier node generator [138], on which the present work builds directly, starts from a small number of seed nodes on the boundary. It fits each smooth closed boundary and each embedded object with a parameter-free, high-order parametric model built from spherical RBF interpolants, which supplies the boundary nodes, the normals, and an inside test, and it fills the domain by Poisson-disk sampling in a single pass. The generator has O(N)O(N) complexity in two and three dimensions and modifies the node set locally when embedded objects move, which our high-order RBF-FD method for advection-diffusion on time-varying domains relies on [140].

A boundary given only by samples, however, may have edges and corners, which no single smooth interpolant represents [56], and classifying points then requires an implicit model of the whole boundary. Radial basis function implicits [26, 157], including Hermite interpolants of points and normals [107], partition-of-unity implicit surfaces [118], and in particular the curl-free partition of unity (CFPU) of Drake, Fuselier, and Wright [45], reconstruct accurate implicit models from oriented points. Our approach is to combine a parametric partition of unity on each smooth piece with a CFPU representation of the whole boundary that shares its supports. This extends the generator of [138] to piecewise-smooth boundaries, including internal obstacles, given by samples of their smooth pieces. Our node generator then samples on the GPU through greedy independent sets, computed by the parallel greedy algorithm of Blelloch, Fineman, and Shun [17, 55], and thus belongs to the literature on parallel Poisson-disk sampling [22, 49, 50, 68, 162].

The second task is the closure at the boundary, where one-sided stencils reduce the accuracy of RBF-FD and can destabilize it [9]. Ghost nodes outside the domain allow both the PDE and the boundary condition to be enforced at the boundary nodes [54, 62, 64, 138, 140]. In nonconvex domains, however, the Euclidean nearest neighbors of a node next to a thin wall can lie on the other side of it. We therefore select our stencils by visibility against the implicit model of the boundary, in the spirit of earlier stencil selection for meshless methods [12, 36–38, 120]. The closure also determines stability. Although the error and stability of nodal meshless methods have been analyzed extensively [39, 40, 134, 156], the stability of collocation on scattered nodes remains open, so we measure it empirically.

The third task, the computation of derivatives with respect to parameters, arises in inverse problems. Global or local RBF collocation and the method of fundamental solutions have been used for coefficient identification [41], inverse heat conduction and source problems [84, 90], Cauchy problems [30], and PDE-constrained optimal control [121]. However, global collocation [92] and the method of fundamental solutions lead to dense and often ill-conditioned systems, which limits them to small problems. Physics-informed neural networks [93, 130] and their Kolmogorov–Arnold variants [145] treat forward and inverse problems alike by training a network on the residual of the PDE and the data, and they do not require a mesh or a node set. In this paper, however, we seek parameters whose error decreases at a prescribed order under refinement and can be bounded by the forward error. We therefore follow the classical approach of PDE-constrained parameter estimation, which differentiates a discretization and solves the resulting nonlinear least-squares problem by Gauss–Newton or Levenberg–Marquardt iterations [73, 74, 81, 91, 153, 159].

Derivatives with respect to the parameters can come from adjoints [127], which dolfin-adjoint derives automatically for finite elements [52, 112], or from automatic differentiation. JAX [23] has led to differentiable solvers for finite differences and finite volumes [15, 82, 95], finite elements [28, 167], and RBF collocation [116], and to implicit differentiation [18] and differentiable linear solvers [101, 128]. For high-order RBF-FD in complex three-dimensional domains, the cost of the derivatives lies in sparse linear solves and long time loops. Reverse-mode differentiation stores every step of a time loop unless it is checkpointed [71, 72, 160], and automatic differentiation does not pass through

Cattaneo, Ballard, Kirby, Wright, and Shankar: Preprint submitted to Elsevier

Page 2 of 45

Table 1

Capabilities of related software, as reported in the cited papers and documentation. A bullet ( ∙\bullet ) means yes, a circle ( ∘\circ ) partly, and a dash ( −- ) no or not documented. The column Geometry refers to domains given by samples or CAD descriptions of piecewise-smooth boundaries in two and three dimensions, which the finite element and neural network frameworks handle through meshes or constructive solid geometry. The column Inverse marks frameworks that support parameter recovery or optimal control.

GeometryNodesHigh-order meshlessGPUDifferentiable
solveInverse
Medusa [148]●●●---
RBF [80]○●●---
RadialBasisFunctions.jl [11]○●●○○-
Compadre [96]--●●--
OpenFPM [86]--●●--
Updes [116]○--●●●
DeepXDE [104]○--●○●
PhysicsNeMo [125]●--●○●
JAX-FEM [167]○--●●●
fea-in-jax [6]○--●●●
JAX-Fluids [15]○--●●○
Firedrake, pyadjoint [76, 112]○--○●●
ΦFlow\Phi_{Flow} [83]○--●●●
KernelPack-JAX●●●●●●

a sparse direct factorization. Our framework therefore exposes the factorization of a GPU sparse direct solver to JAX with its own derivative rules [70], so that derivatives reuse the factors of the forward solve.

To our knowledge, no existing framework goes from samples of the smooth boundary pieces to node sets, high-order meshless operators, sparse solves, and parameter recovery on the GPU, with derivatives through the operators, the solves, and the time loops (Table 1). We present KernelPack-JAX, a JAX framework that does this, with the following contributions.

  • A stacked boundary representation, in which a parametric partition of unity of local polyharmonic interpolants represents each smooth piece (the parametric layer) and a curl-free partition of unity represents the whole boundary implicitly (the implicit layer). Each parametric support induces exactly one implicit ball, so the two layers share one hierarchy of supports and are refined together. Internal obstacles are represented in the same way as the outer wall (Section 2), and an extension of the implicit layer into the volume classifies every point of space without a global fit (Section 2.5).

  • Parallel node generation, which treats boundary thinning and the dart throwing of interior nodes as greedy independent sets of conflict graphs, computed by the parallel greedy algorithm of [17] extended to sets that must contain given nodes; the result equals the sequential one (Section 2.7).

  • Stencil selection for nonconvex domains by the nearest nodes in a distance measured inside the domain, with visibility [120] decided against the implicit layer. This selection discourages coupling across walls and is Euclidean wherever the nearest nodes are visible (Section 3.2).

  • Differentiable sparse direct solves on the GPU through cuDSS [115], in forward or reverse mode. Time-dependent problems use the third-order semi-implicit backward differentiation formula (SBDF3) [4], with hyperviscosity for advection [66, 137] (Section 3).

  • Parameter recovery through the discretization, with Jacobians that cost a small multiple of a forward solve and memory independent of the number of time steps (Section 4).

  • Error estimates that specialize the stability–consistency framework of [134] to the ghost-node closure with Neumann and Dirichlet rows, the standard IMEX argument to SBDF3, and least-squares perturbation theory [16, 161] to the recovered parameters, which bound the parameter error by the forward error divided by the smallest singular value of the Jacobian (Section 5).

We demonstrate our framework in a curved channel in two dimensions (the H-channel) and in a box with a superelliptic cap in three dimensions (the treasure chest), for Darcy flow, reaction–diffusion, advection–diffusion, and the corresponding inverse problems, with RBF-FD of orders 2, 4, and 6. In a final example, we recover reaction laws

Cattaneo, Ballard, Kirby, Wright, and Shankar: Preprint submitted to Elsevier

Page 3 of 45 from solutions carried by a flow around an internal obstacle, a smaller, rotated copy of the box. The forward solutions converge at high order, and the recovered parameters largely follow the forward errors within the bound of our estimates, except for transport with p = 2 in the treasure chest.

Section 2 presents the stacked boundary representation and our node generator, Section 3 the forward discretization, our stencil selection, and the differentiable solves, and Section 4 the recovery of parameters. Section 5 derives error estimates, Section 6 presents the numerical results, and Section 7 concludes. The appendices contain the node generator parameters, code listings, proofs, and experimental details.

References (100)

Couldn't load all references. Reload the page to try again.