Class AdamsFieldIntegrator<T extends CalculusFieldElement<T>>

    • Constructor Detail

      • AdamsFieldIntegrator

        public AdamsFieldIntegrator​(Field<T> field,
                                    String name,
                                    int nSteps,
                                    int order,
                                    double minStep,
                                    double maxStep,
                                    double scalAbsoluteTolerance,
                                    double scalRelativeTolerance)
                             throws MathIllegalArgumentException
        Build an Adams integrator with the given order and step control parameters.
        Parameters:
        field - field to which the time and state vector elements belong
        name - name of the method
        nSteps - number of steps of the method excluding the one being computed
        order - order of the method
        minStep - minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
        maxStep - maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
        scalAbsoluteTolerance - allowed absolute error
        scalRelativeTolerance - allowed relative error
        Throws:
        MathIllegalArgumentException - if order is 1 or less
      • AdamsFieldIntegrator

        public AdamsFieldIntegrator​(Field<T> field,
                                    String name,
                                    int nSteps,
                                    int order,
                                    double minStep,
                                    double maxStep,
                                    double[] vecAbsoluteTolerance,
                                    double[] vecRelativeTolerance)
                             throws IllegalArgumentException
        Build an Adams integrator with the given order and step control parameters.
        Parameters:
        field - field to which the time and state vector elements belong
        name - name of the method
        nSteps - number of steps of the method excluding the one being computed
        order - order of the method
        minStep - minimal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
        maxStep - maximal step (sign is irrelevant, regardless of integration direction, forward or backward), the last step can be smaller than this
        vecAbsoluteTolerance - allowed absolute error
        vecRelativeTolerance - allowed relative error
        Throws:
        IllegalArgumentException - if order is 1 or less
    • Method Detail

      • initializeHighOrderDerivatives

        protected Array2DRowFieldMatrix<T> initializeHighOrderDerivatives​(T h,
                                                                          T[] t,
                                                                          T[][] y,
                                                                          T[][] yDot)
        Initialize the high order scaled derivatives at step start.
        Specified by:
        initializeHighOrderDerivatives in class MultistepFieldIntegrator<T extends CalculusFieldElement<T>>
        Parameters:
        h - step size to use for scaling
        t - first steps times
        y - first steps states
        yDot - first steps derivatives
        Returns:
        Nordieck vector at first step (h2/2 y''n, h3/6 y'''n ... hk/k! y(k)n)
      • updateHighOrderDerivativesPhase2

        public void updateHighOrderDerivativesPhase2​(T[] start,
                                                     T[] end,
                                                     Array2DRowFieldMatrix<T> highOrder)
        Update the high order scaled derivatives Adams integrators (phase 2).

        The complete update of high order derivatives has a form similar to: \[ r_{n+1} = (s_1(n) - s_1(n+1)) P^{-1} u + P^{-1} A P r_n \] this method computes the (s1(n) - s1(n+1)) P-1 u part.

        Phase 1 of the update must already have been performed.

        Parameters:
        start - first order scaled derivatives at step start
        end - first order scaled derivatives at step end
        highOrder - high order scaled derivatives, will be modified (h2/2 y'', ... hk/k! y(k))
        See Also:
        updateHighOrderDerivativesPhase1(Array2DRowFieldMatrix)
      • errorEstimation

        protected abstract double errorEstimation​(T[] previousState,
                                                  T predictedTime,
                                                  T[] predictedState,
                                                  T[] predictedScaled,
                                                  FieldMatrix<T> predictedNordsieck)
        Estimate error.
        Parameters:
        previousState - state vector at step start
        predictedTime - time at step end
        predictedState - predicted state vector at step end
        predictedScaled - predicted value of the scaled derivatives at step end
        predictedNordsieck - predicted value of the Nordsieck vector at step end
        Returns:
        estimated normalized local discretization error
        Since:
        2.0
      • finalizeStep

        protected abstract org.hipparchus.ode.nonstiff.AdamsFieldStateInterpolator<T> finalizeStep​(T stepSize,
                                                                                                   T[] predictedState,
                                                                                                   T[] predictedScaled,
                                                                                                   Array2DRowFieldMatrix<T> predictedNordsieck,
                                                                                                   boolean isForward,
                                                                                                   FieldODEStateAndDerivative<T> globalPreviousState,
                                                                                                   FieldODEStateAndDerivative<T> globalCurrentState,
                                                                                                   FieldEquationsMapper<T> equationsMapper)
        Finalize the step.
        Parameters:
        stepSize - step size used in the scaled and Nordsieck arrays
        predictedState - predicted state at end of step
        predictedScaled - predicted first scaled derivative
        predictedNordsieck - predicted Nordsieck vector
        isForward - integration direction indicator
        globalPreviousState - start of the global step
        globalCurrentState - end of the global step
        equationsMapper - mapper for ODE equations primary and secondary components
        Returns:
        step interpolator
        Since:
        2.0