tmdsimpy.postprocess.continuation.linear_interp

tmdsimpy.postprocess.continuation.linear_interp(XlamP_full, new_values, reference_values=None)

Linearly interpolate solutions to new points.

Parameters:
XlamP_full(M, N) numpy.ndarray

Solution points calculated with continuation. First dimension corresponds to M individual solutions. Second dimension corresponds to degrees of freedom at each solution point (N).

new_values(Minterp,)

New values that XlamP_full should be interpolated to.

reference_values(M,) numpy.ndarray or None, optional

Reference values to compare new_values to corresponding to each row of XlamP_full. If None, then the last column of XlamP_full is used instead. The default is None.

Returns:
XlamP_interp(Minterp,N) numpy.ndarray

Interpolated values. Returns np.nan for rows where new_values is outside of the bounds of reference_values.

See also

hermite_interp

Cubic Hermite Spline interpolation function with similar format.

hermite_upsample

Cubic Hermite Spline interpolation function that adds more points.