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 largestksuch that the multivariate functionPhi(x) = phi(||x||)isktimes continuously differentiable. It is used to decide whether a differential operator of ordermmay be evaluated at the center of a kernel, which requiressmoothness(kernel) >= m. The fallback for user-defined kernels is the conservative value0. - Added
fill_distancefunction (#187). - Added support for RBF-FD (#182).
- Added
differentiation_matrixto assemble the matrix of a differential operator (sparse forRBFFDBasis, 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_interpolateand the typeMultiscaleInterpolation(#180). - Allow applying differential operators to an
Interpolationto get a callable object that evaluates the operator at any point (#179). - Added support for methods from
LinearSolve.jlinsolve_stationary(#178). - Added support for methods from
LinearSolve.jlininterpolate(#176). - Added a keyword argument
factorization_methodtointerpolate,interpolation_matrix, andleast_squares_matrixto allow for different factorization methods (#130).
Fixed
- Derivatives of radial-symmetric kernels are now evaluated through the chain rule on the scalar radial profile
phiinstead of by differentiatingx -> Phi(kernel, x)directly. Previously, thesave_callworkaround perturbed the argument byepsat the kernel center to keep automatic differentiation from producingNaNat the singularity ofnorm. 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' / rsuffers catastrophic cancellation atr = eps, so every diagonal entry of aLaplacianorEllipticOperatorcollocation matrix carried anO(10%)error. For example,LaplacianofWendlandKernel{2}(3, shape_parameter = 0.4)at the center returned-5.52instead 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.WendlandKernelwithk = 0,Matern12Kernel,RieszKernelwithbeta <= 1), a non-existent derivative was silently returned as a value pointing along the first coordinate direction. Such calls now throw anArgumentError. save_callmutated its argument, so derivatives at the center errored for immutable input vectors such asSVector. These now work.
- Second-order operators were badly wrong at the center. The radial formula
Changed
- Several performance improvements reducing allocations, using threaded loops, using
KDTreefor nearest-neighbor searches, and computing the separation distance lazily (#191). - Speed up
LagrangeBasisconstruction (and hence also the RBF-FDRBFFDLagrangeBasiscache) 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 aKDTreefrom NearestNeighbors.jl instead of a brute-forceO(N^2)distance scan, reducing the overall neighborhood search to roughlyO(N log N)(#189). - Define slicing for
NodeSets and deprecatevalues_along_dim(#139). - Fix order of
PolyharmonicSplineKernelto return an integer (#127).
Changes when updating to v0.3 from v0.2.x
Added
- General floating point support (#121).
Changed
- The functions
random_hypersphereandrandom_hypersphere_boundarynot require aTuplefor the argumentcenter. Before, e.g., aVectorwas 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
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 ofcentersandnodesetneeds to be swapped in theinterpolatefunction. Alternatively, use the newStandardBasis(#100).