Class MidpointStepInterpolator

All Implemented Interfaces:
Externalizable, Serializable, StepInterpolator

class MidpointStepInterpolator extends RungeKuttaStepInterpolator
This class implements a step interpolator for second order Runge-Kutta integrator.

This interpolator computes dense output inside the last step computed. The interpolation equation is consistent with the integration scheme :

  • Using reference point at step start:
    y(tn + θ h) = y (tn) + θ h [(1 - θ) y'1 + θ y'2]
  • Using reference point at step end:
    y(tn + θ h) = y (tn + h) + (1-θ) h [θ y'1 - (1+θ) y'2]

where θ belongs to [0 ; 1] and where y'1 and y'2 are the two evaluations of the derivatives already computed during the step.

Since:
1.2
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serializable version identifier
      See Also:
  • Constructor Details

  • Method Details

    • doCopy

      protected StepInterpolator doCopy()
      Really copy the finalized instance.

      This method is called by AbstractStepInterpolator.copy() after the step has been finalized. It must perform a deep copy to have an new instance completely independent for the original instance.

      Specified by:
      doCopy in class AbstractStepInterpolator
      Returns:
      a copy of the finalized instance
    • computeInterpolatedStateAndDerivatives

      protected void computeInterpolatedStateAndDerivatives(double theta, double oneMinusThetaH)
      Compute the state and derivatives at the interpolated time. This is the main processing method that should be implemented by the derived classes to perform the interpolation.
      Specified by:
      computeInterpolatedStateAndDerivatives in class AbstractStepInterpolator
      Parameters:
      theta - normalized interpolation abscissa within the step (theta is zero at the previous time step and one at the current time step)
      oneMinusThetaH - time gap between the interpolated time and the current time