Class LSODAExt

  • All Implemented Interfaces:
    org.apache.commons.math3.ode.FirstOrderIntegrator , org.apache.commons.math3.ode.ODEIntegrator

    
    public class LSODAExt
    extends LSODA
                        

    Extended LSODA solver that supports configurable maximum internal steps. The upstream lsoda-java library hardcodes mxstep=1000000 inside the lsoda() method, ignoring any reflection-based field setting. This subclass overrides integrate() to call the public lsoda() method directly with the desired mxstep value.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      LSODAExt(double minStep, double maxStep, double rtol, double atol, int meth, int miter, int maxSteps) Create an LSODAExt solver with configurable max steps.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      double integrate(FirstOrderDifferentialEquations equations, double t0, Array<double> y0, double t, Array<double> yOut)
      • Methods inherited from class odesolver.LSODA

        FirstOrderSystem, addEventHandler, addStepHandler, clearEventHandlers, clearStepHandlers, getCurrentSignedStepsize, getCurrentStepStart, getEvaluations, getEventHandlers, getJacobianEvaluations, getMaxComponent, getMaxEvaluations, getName, getStepHandlers, getStepsTaken, getTvec, getYvec, lsoda, setMaxEvaluations
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LSODAExt

        LSODAExt(double minStep, double maxStep, double rtol, double atol, int meth, int miter, int maxSteps)
        Create an LSODAExt solver with configurable max steps.
        Parameters:
        minStep - minimum step size (absolute value)
        maxStep - maximum step size (absolute value)
        rtol - relative tolerance
        atol - absolute tolerance
        meth - method flag (12 = nonstiff/stiff auto)
        miter - iteration method (5 = diagonal Jacobian)
        maxSteps - maximum number of internal steps (replaces hardcoded 1000000)
    • Method Detail

      • integrate

         double integrate(FirstOrderDifferentialEquations equations, double t0, Array<double> y0, double t, Array<double> yOut)