Interpolators

PyGRO implements several interpolation strategies for the integrated geodesic. The base interpolator class offers a way to compute the integrate geodesic at each value of the affine parameter on the integration interval. Whenever possible, Integrator classes implement dense output tailored to the order of the numerical integration involved in the scheme.

When the dense output for the specific class is not available, it will fall back to cubic interpolation using Hermite polynomials which guarantees third-order accuracy for integrators of order \(p\geq3\).

class pygro.interpolators.DP54DenseOutput(x: ndarray, y: ndarray, k: list[ndarray])[source]View on GitHub

Dense output interpolator for the Dormand-Prince 5(4) method.

class pygro.interpolators.HermiteCubicInterpolator(x: ndarray, y: ndarray, k: list[ndarray])[source]View on GitHub

Implements Hermite cubic interpolation.

This method ensures smooth interpolation by using derivative information.

class pygro.interpolators.Interpolator(x: ndarray, y: ndarray, k: list[ndarray])[source]View on GitHub

Base class for interpolation methods.

Parameters:
  • x (np.ndarray) – Array of x values.

  • y (np.ndarray) – Array of y values.

  • k (list[np.ndarray]) – List of derivative arrays.

class pygro.interpolators.LinearInterpolator(x: ndarray, y: ndarray, k: list[ndarray])[source]View on GitHub

Placeholder for a linear interpolation scheme. Currently not implemented.