Changelog

KernelInterpolation.jl follows the interpretation of semantic versioning (semver) used in the Julia ecosystem. Notable changes will be documented in this file for human readability.

Changes in the v0.3 lifecycle

Added

  • Added smoothness(kernel), returning the largest k such that the multivariate function Phi(x) = phi(||x||) is k times continuously differentiable. It is used to decide whether a differential operator of order m may be evaluated at the center of a kernel, which requires smoothness(kernel) >= m. The fallback for user-defined kernels is the conservative value 0.
  • Added fill_distance function (#187).
  • Added support for RBF-FD (#182).
  • Added differentiation_matrix to assemble the matrix of a differential operator (sparse for RBFFDBasis, dense for kernel collocation), and added polynomial augmentation to the collocation PDE assembly (solve_stationary, operator_matrix, pde_boundary_matrix) so that conditionally positive definite kernels are augmented automatically (#182).
  • Add multiscale interpolation functionality with the function multiscale_interpolate and the type MultiscaleInterpolation (#180).
  • Allow applying differential operators to an Interpolation to get a callable object that evaluates the operator at any point (#179).
  • Added support for methods from LinearSolve.jl in solve_stationary (#178).
  • Added support for methods from LinearSolve.jl in interpolate (#176).
  • Added a keyword argument factorization_method to interpolate, interpolation_matrix, and least_squares_matrix to allow for different factorization methods (#130).

Fixed

  • Derivatives of radial-symmetric kernels are now evaluated through the chain rule on the scalar radial profile phi instead of by differentiating x -> Phi(kernel, x) directly. Previously, the save_call workaround perturbed the argument by eps at the kernel center to keep automatic differentiation from producing NaN at the singularity of norm. That had three consequences, all of which are fixed:
    • Second-order operators were badly wrong at the center. The radial formula Delta Phi = phi'' + (d - 1) phi' / r suffers catastrophic cancellation at r = eps, so every diagonal entry of a Laplacian or EllipticOperator collocation matrix carried an O(10%) error. For example, Laplacian of WendlandKernel{2}(3, shape_parameter = 0.4) at the center returned -5.52 instead of the correct -7.04. Solutions of PDE examples change accordingly, and are generally more accurate.
    • For kernels that are not differentiable at the origin (smoothness == 0, e.g. WendlandKernel with k = 0, Matern12Kernel, RieszKernel with beta <= 1), a non-existent derivative was silently returned as a value pointing along the first coordinate direction. Such calls now throw an ArgumentError.
    • save_call mutated its argument, so derivatives at the center errored for immutable input vectors such as SVector. These now work.

Changed

  • Several performance improvements reducing allocations, using threaded loops, using KDTree for nearest-neighbor searches, and computing the separation distance lazily (#191).
  • Speed up LagrangeBasis construction (and hence also the RBF-FD RBFFDLagrangeBasis cache) by assembling and factorizing the augmented interpolation matrix once per node set and solving for all cardinal functions with a single multiple-right-hand-side solve, instead of re-assembling and re-factorizing it for each cardinal function (#190).
  • Speed up RBF-FD stencil selection (KNearestNeighbors, RadiusSearch) by using a KDTree from NearestNeighbors.jl instead of a brute-force O(N^2) distance scan, reducing the overall neighborhood search to roughly O(N log N) (#189).
  • Define slicing for NodeSets and deprecate values_along_dim (#139).
  • Fix order of PolyharmonicSplineKernel to return an integer (#127).

Changes when updating to v0.3 from v0.2.x

Added

  • General floating point support (#121).

Changed

  • The functions random_hypersphere and random_hypersphere_boundary not require a Tuple for the argument center. Before, e.g., a Vector was allowed (#121).
  • The element type of NodeSets will now always be converted to a floating point type, i.e., also when integer values are passed. This is more consistent for an interpolation framework makes many things easier. A similar approach is also used in the Meshes.jl/CoordRefSystems.jl ecosystem (#121).

Changes in the v0.2 lifecycle

Added

  • Added support for general RNG in random_* functions (#106).
  • Added LagrangeBasis (#103).

Changed

  • Use OrdinaryDiffEqRosenbrock.jl instead of OrdinaryDiffEq.jl in the examples and documentation (#108).
  • Fix seriestype for 1D plots (#101).

Changes when updating to v0.2 from v0.1.x

Added

  • Added tutorial on noisy data (#95).
  • Added L2 regularization (#94).
  • Added least squares approximation (#93, #97).

Changed

  • Add interface for general bases and add StandardBasis. This is breaking for least squares approximations because the order of centers and nodeset needs to be swapped in the interpolate function. Alternatively, use the new StandardBasis (#100).

Changes in the v0.1 lifecycle

Added

  • Added tutorial to documentation (#66).
  • Added PartialDerivativeOperator (#65).
  • Added compactly supported Wu kernels (#64).
  • Added compatibility for PointSets from Meshes.jl (#63).