Class AbstractStepInterpolator

java.lang.Object
org.apache.commons.math3.ode.sampling.AbstractStepInterpolator
All Implemented Interfaces:
Externalizable, Serializable, StepInterpolator
Direct Known Subclasses:
GraggBulirschStoerStepInterpolator, NordsieckStepInterpolator, RungeKuttaStepInterpolator

public abstract class AbstractStepInterpolator extends Object implements StepInterpolator
This abstract class represents an interpolator over the last step during an ODE integration.

The various ODE integrators provide objects extending this class to the step handlers. The handlers can use these objects to retrieve the state vector at intermediate times between the previous and the current grid points (dense output).

Since:
1.2
See Also:
  • Field Details

    • h

      protected double h
      current time step
    • currentState

      protected double[] currentState
      current state
    • interpolatedTime

      protected double interpolatedTime
      interpolated time
    • interpolatedState

      protected double[] interpolatedState
      interpolated state
    • interpolatedDerivatives

      protected double[] interpolatedDerivatives
      interpolated derivatives
    • interpolatedPrimaryState

      protected double[] interpolatedPrimaryState
      interpolated primary state
    • interpolatedPrimaryDerivatives

      protected double[] interpolatedPrimaryDerivatives
      interpolated primary derivatives
    • interpolatedSecondaryState

      protected double[][] interpolatedSecondaryState
      interpolated secondary state
    • interpolatedSecondaryDerivatives

      protected double[][] interpolatedSecondaryDerivatives
      interpolated secondary derivatives
    • globalPreviousTime

      private double globalPreviousTime
      global previous time
    • globalCurrentTime

      private double globalCurrentTime
      global current time
    • softPreviousTime

      private double softPreviousTime
      soft previous time
    • softCurrentTime

      private double softCurrentTime
      soft current time
    • finalized

      private boolean finalized
      indicate if the step has been finalized or not.
    • forward

      private boolean forward
      integration direction.
    • dirtyState

      private boolean dirtyState
      indicator for dirty state.
    • primaryMapper

      private EquationsMapper primaryMapper
      Equations mapper for the primary equations set.
    • secondaryMappers

      private EquationsMapper[] secondaryMappers
      Equations mappers for the secondary equations sets.
  • Constructor Details

    • AbstractStepInterpolator

      protected AbstractStepInterpolator()
      Simple constructor. This constructor builds an instance that is not usable yet, the reinitialize(double[], boolean, org.apache.commons.math3.ode.EquationsMapper, org.apache.commons.math3.ode.EquationsMapper[]) method should be called before using the instance in order to initialize the internal arrays. This constructor is used only in order to delay the initialization in some cases. As an example, the EmbeddedRungeKuttaIntegrator class uses the prototyping design pattern to create the step interpolators by cloning an uninitialized model and latter initializing the copy.
    • AbstractStepInterpolator

      protected AbstractStepInterpolator(double[] y, boolean forward, EquationsMapper primaryMapper, EquationsMapper[] secondaryMappers)
      Simple constructor.
      Parameters:
      y - reference to the integrator array holding the state at the end of the step
      forward - integration direction indicator
      primaryMapper - equations mapper for the primary equations set
      secondaryMappers - equations mappers for the secondary equations sets
    • AbstractStepInterpolator

      protected AbstractStepInterpolator(AbstractStepInterpolator interpolator)
      Copy constructor.

      The copied interpolator should have been finalized before the copy, otherwise the copy will not be able to perform correctly any derivative computation and will throw a NullPointerException later. Since we don't want this constructor to throw the exceptions finalization may involve and since we don't want this method to modify the state of the copied interpolator, finalization is not done automatically, it remains under user control.

      The copy is a deep copy: its arrays are separated from the original arrays of the instance.

      Parameters:
      interpolator - interpolator to copy from.
  • Method Details