Approximation¶
Methods for approximating functions in spline spaces.

pyiga.approx.
interpolate
(kvs, f, geo=None, nodes=None)¶ Perform interpolation in a spline space.
Returns the coefficients for the interpolant of the function f in the tensor product Bspline basis kvs.
By default, f is assumed to be defined in the parameter domain. If a geometry is passed in geo, interpolation is instead done in physical coordinates.
nodes should be a tensor grid (i.e., a sequence of onedimensional arrays) in the parameter domain specifying the interpolation nodes. If not specified, the Gréville abscissae are used.

pyiga.approx.
project_L2
(kvs, f, f_physical=False, geo=None)¶ Perform \(L_2\)projection into a spline space.
Returns the coefficients for the \(L_2\)projection of the function f into the tensor product Bspline basis kvs. Optionally, a geometry transform geo can be specified to compute the projection in a physical domain.
By default, f is assumed to be defined in the parameter domain. If it is given in physical coordinates, pass f_physical=True. This requires geo to be specified.
This function also supports projection into a hierarchical spline space by passing a
HSpace
object in place of kvs.