Class GraggBulirschStoerStateInterpolator

  • All Implemented Interfaces:
    Serializable, ODEStateInterpolator

    public class GraggBulirschStoerStateInterpolator
    extends AbstractODEStateInterpolator
    This class implements an interpolator for the Gragg-Bulirsch-Stoer integrator.

    This interpolator compute dense output inside the last step produced by a Gragg-Bulirsch-Stoer integrator.

    This implementation is basically a reimplementation in Java of the odex fortran code by E. Hairer and G. Wanner. The redistribution policy for this code is available here, for convenience, it is reproduced below.

    Copyright (c) 2004, Ernst Hairer

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    See Also:
    GraggBulirschStoerIntegrator, Serialized Form
    • Constructor Detail

      • GraggBulirschStoerStateInterpolator

        public GraggBulirschStoerStateInterpolator​(boolean forward,
                                                   ODEStateAndDerivative globalPreviousState,
                                                   ODEStateAndDerivative globalCurrentState,
                                                   ODEStateAndDerivative softPreviousState,
                                                   ODEStateAndDerivative softCurrentState,
                                                   EquationsMapper mapper,
                                                   double[][] yMidDots,
                                                   int mu)
        Simple constructor.
        Parameters:
        forward - integration direction indicator
        globalPreviousState - start of the global step
        globalCurrentState - end of the global step
        softPreviousState - start of the restricted step
        softCurrentState - end of the restricted step
        mapper - equations mapper for the all equations
        yMidDots - scaled derivatives at the middle of the step $\tau$ (element k is $h^{k} d^{k}y(\tau)/dt^{k}$ where h is step size...)
        mu - degree of the interpolation polynomial
    • Method Detail

      • estimateError

        public double estimateError​(double[] scale)
        Estimate interpolation error.
        Parameters:
        scale - scaling array
        Returns:
        estimate of the interpolation error
      • computeInterpolatedStateAndDerivatives

        protected ODEStateAndDerivative computeInterpolatedStateAndDerivatives​(EquationsMapper mapper,
                                                                               double time,
                                                                               double theta,
                                                                               double thetaH,
                                                                               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 AbstractODEStateInterpolator
        Parameters:
        mapper - mapper for ODE equations primary and secondary components
        time - interpolation time
        theta - normalized interpolation abscissa within the step (theta is zero at the previous time step and one at the current time step)
        thetaH - time gap between the previous time and the interpolated time
        oneMinusThetaH - time gap between the interpolated time and the current time
        Returns:
        interpolated state and derivatives