API
Structs
DataInterpolationsND.NDInterpolation — Type
NDInterpolation(u, interp_dims; cache = EmptyCache())The interpolation object containing the interpolation dimensions and the data to interpolate u. Given the number of interpolation dimensions N_in, for first N_in dimensions of u the size of u along that dimension must match the length of t of the corresponding interpolation dimension.
Arguments
interp_dims: A tuple of identically typed interpolation dimensions.u: The array to be interpolated.
Keyword Arguments
cache: Optional global cache
DataInterpolationsND.LinearInterpolationDimension — Type
LinearInterpolationDimension(t; t_eval = similar(t, 0),
extrapolation::ExtrapolationType.T = ExtrapolationType.Linear)Interpolation dimension for linear interpolation between the data points. Both sides default to ExtrapolationType.Linear. If t has a single point, the interpolation is constant along this dimension for every extrapolation mode, and derivatives along it are zero.
Arguments
t: The time points for this interpolation dimension.
Keyword arguments
extrapolation: AnExtrapolationTypemode applied on both sides of this dimension.t_eval: A vector (like) of time evaluation points for efficient evaluation of multiple points, seeeval_unstructuredandeval_grid. Defaults to no points.
DataInterpolationsND.ConstantInterpolationDimension — Type
ConstantInterpolationDimension(t; t_eval = similar(t, 0), left = true,
extrapolation::ExtrapolationType.T = ExtrapolationType.Constant)Interpolation dimension for constant interpolation between the data points. Both sides default to ExtrapolationType.Constant; all supported modes hold the edge value. If t has a single point, the interpolation is constant along this dimension for every extrapolation mode, and derivatives along it are zero.
Arguments
t: The time points for this interpolation dimension.
Keyword arguments
left: Whether the interpolation looks to the left of the evaluationtfor the value. Defaults totrue.extrapolation: AnExtrapolationTypemode applied on both sides of this dimension.t_eval: A vector (like) of time evaluation points for efficient evaluation of multiple points, seeeval_unstructuredandeval_grid. Defaults to no points.
DataInterpolationsND.BSplineInterpolationDimension — Type
BSplineInterpolationDimension(
t, degree;
t_eval = similar(t, 0),
max_derivative_order_eval::Integer = 0,
multiplicities::Union{AbstractVector{<:Integer}, Nothing} = nothing,
extrapolation::ExtrapolationType.T = ExtrapolationType.Extension)Interpolation dimension for BSpline or NURBS interpolation between the data points, used for evaluating the BSpline basis functions. Both sides default to ExtrapolationType.Extension. ExtrapolationType.Linear extends the boundary tangent and is not supported with NURBSWeights. t must contain at least two knots; otherwise an ArgumentError is thrown.
Arguments
t: The time points for this interpolation dimension, in this context also known as knots.degree: The degree of the basis functions
Keyword arguments
extrapolation: AnExtrapolationTypemode applied on both sides of this dimension.t_eval: A vector (like) of time evaluation points for efficient evaluation of multiple points, seeeval_unstructuredandeval_grid. Defaults to no points.max_derivative_order_eval: The maximum derivative order for which the basis functions will be precomputed foreval_unstructuredandeval_grid.multiplicities: The multiplicities of the knotst. Defaults to multiplicities for an open/clamped knot vector.
DataInterpolationsND.NURBSWeights — Type
NURBSWeights(weights::AbstractArray)Weights associated with the control points to define a NURBS geometry.
Extrapolation
Every dimension constructor accepts extrapolation::ExtrapolationType.T, which applies the selected mode on both sides of that dimension. The defaults are Linear for linear dimensions, Constant for constant dimensions, and Extension for spline dimensions.
DataInterpolationsND.ExtrapolationType — Module
ExtrapolationTypeExtrapolation modes for each interpolation dimension, using the naming convention of DataInterpolations.jl. The extrapolation::ExtrapolationType.T keyword sets the mode for both sides of a dimension. Different dimensions can use different modes.
ExtrapolationType.Constant: hold the boundary value. Derivatives along an axis strictly outside its grid are zero; derivatives at the boundary use the interpolation.ExtrapolationType.Linear: extend the boundary tangent. This is the default for linear dimensions. For constant dimensions the tangent is zero. Not supported withNURBSWeights.ExtrapolationType.Extension: extend the boundary interpolation polynomial. This is the default for spline dimensions. Constant dimensions default toConstant.
The mode type is ExtrapolationType.T. Other DataInterpolations.jl extrapolation modes are not supported.
DataInterpolationsND.ExtrapolationType.T — Type
Enum type for the extrapolation modes in ExtrapolationType.
DataInterpolationsND.ExtrapolationType.Constant — Constant
Hold the boundary value outside the grid, with zero derivatives along the held axis.
DataInterpolationsND.ExtrapolationType.Linear — Constant
Extend the boundary tangent outside the grid; unsupported with NURBSWeights.
DataInterpolationsND.ExtrapolationType.Extension — Constant
Continue the boundary interpolation polynomial outside the grid.
Multi-point evaluation
DataInterpolationsND.eval_unstructured — Function
function eval_unstructured(
interp::NDInterpolation{N_in};
derivative_orders::NTuple{N_in, <:Integer} = ntuple(_ -> 0, N_in)) where {N_in}Evaluate the interpolation in the unstructured set of points defined by t_eval in the interpolation dimensions out of place. That is, t_eval must have the same length for each interpolation dimension and the interpolation is evaluated at the zip if these t_eval.
Keyword arguments
derivative_orders: The partial derivative order for each interpolation dimension. Defaults to0for each.
DataInterpolationsND.eval_unstructured! — Function
function eval_unstructured!(
out::AbstractArray,
interp::NDInterpolation{N_in};
derivative_orders::NTuple{N_in, <:Integer} = ntuple(_ -> 0, N_in)) where {N_in}Evaluate the interpolation in the unstructured set of points defined by t_eval in the interpolation dimensions in place. That is, t_eval must have the same length for each interpolation dimension and the interpolation is evaluated at the zip if these t_eval.
Keyword arguments
derivative_orders: The partial derivative order for each interpolation dimension. Defaults to0for each.
DataInterpolationsND.eval_grid — Function
function eval_grid(
interp::NDInterpolation{N_in};
derivative_orders::NTuple{N_in, <:Integer} = ntuple(_ -> 0, N_in)) where {N_in}Evaluate the interpolation in the Cartesian product of the t_eval of the interpolation dimensions out of place.
Keyword arguments
derivative_orders: The partial derivative order for each interpolation dimension. Defaults to0for each.
DataInterpolationsND.eval_grid! — Function
function eval_grid!(
out::AbstractArray,
interp::NDInterpolation{N_in};
derivative_orders::NTuple{N_in, <:Integer} = ntuple(_ -> 0, N_in)) where {N_in}Evaluate the interpolation in the Cartesian product of the t_eval of the interpolation dimensions in place.
Keyword arguments
derivative_orders: The partial derivative order for each interpolation dimension. Defaults to0for each.