Class AbstractFieldStepInterpolator<T extends RealFieldElement<T>>

    • Constructor Detail

      • AbstractFieldStepInterpolator

        protected AbstractFieldStepInterpolator​(boolean isForward,
                                                FieldODEStateAndDerivative<T> globalPreviousState,
                                                FieldODEStateAndDerivative<T> globalCurrentState,
                                                FieldODEStateAndDerivative<T> softPreviousState,
                                                FieldODEStateAndDerivative<T> softCurrentState,
                                                FieldEquationsMapper<T> equationsMapper)
        Simple constructor.
        Parameters:
        isForward - 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
        equationsMapper - mapper for ODE equations primary and secondary components
    • Method Detail

      • getGlobalPreviousState

        public FieldODEStateAndDerivative<T> getGlobalPreviousState()
        Get the previous global grid point state.
        Returns:
        previous global grid point state
      • getGlobalCurrentState

        public FieldODEStateAndDerivative<T> getGlobalCurrentState()
        Get the current global grid point state.
        Returns:
        current global grid point state
      • getInterpolatedState

        public FieldODEStateAndDerivative<T> getInterpolatedState​(T time)
        Get the state at interpolated time.

        Setting the time outside of the current step is allowed, but should be used with care since the accuracy of the interpolator will probably be very poor far from this step. This allowance has been added to simplify implementation of search algorithms near the step endpoints.

        Specified by:
        getInterpolatedState in interface FieldStepInterpolator<T extends RealFieldElement<T>>
        Parameters:
        time - time of the interpolated point
        Returns:
        state at interpolated time
      • isForward

        public boolean isForward()
        Check if the natural integration direction is forward.

        This method provides the integration direction as specified by the integrator itself, it avoid some nasty problems in degenerated cases like null steps due to cancellation at step initialization, step control or discrete events triggering.

        Specified by:
        isForward in interface FieldStepInterpolator<T extends RealFieldElement<T>>
        Returns:
        true if the integration variable (time) increases during integration
      • computeInterpolatedStateAndDerivatives

        protected abstract FieldODEStateAndDerivative<T> computeInterpolatedStateAndDerivatives​(FieldEquationsMapper<T> equationsMapper,
                                                                                                T time,
                                                                                                T theta,
                                                                                                T thetaH,
                                                                                                T oneMinusThetaH)
                                                                                         throws MaxCountExceededException
        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.
        Parameters:
        equationsMapper - 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
        Throws:
        MaxCountExceededException - if the number of functions evaluations is exceeded