All Implemented Interfaces:
Serializable

public class Adams extends CachingNumericalIntegrator
The Adams-Bashforth-Moulton numerical estimator as described in https://mathworld.wolfram.com/AdamsMethod.html

Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Author:
Alexander Verbraeck, Peter Jacobs
See Also:
  • Constructor Details

    • Adams

      public Adams(double stepSize, DifferentialEquationInterface equation)
      constructs a new Adams integrator.
      Parameters:
      stepSize - double; the stepSize to use in the estimation.
      equation - DifferentialEquationInterface; the equation to use.
    • Adams

      public Adams(double stepSize, DifferentialEquationInterface equation, NumericalIntegratorType primerIntegrationMethod, int startingSubSteps)
      constructs a new Adams integrator, indicating the starting method and number of substeps.
      Parameters:
      stepSize - double; the stepSize to use in the estimation.
      equation - DifferentialEquationInterface; the equation to use.
      primerIntegrationMethod - NumericalIntegratorType; the primer integrator to use
      startingSubSteps - int; the number of substeps per timestep during starting of the integrator
  • Method Details

    • next

      public double[] next(double x)
      The integrators that extend the CachingNumericalIntegrator calculate the value of y(x+stepSize) just based on the x-value. They retrieve y(x), y(x-stepSize), etc. or y(k), y(k-1) all from the cache.
      Specified by:
      next in class CachingNumericalIntegrator
      Parameters:
      x - double; the x-value to use in the calculation
      Returns:
      the value of y(x+stepSize)