OrdinaryDiffEqRosenbrock

Rosenbrock methods for mass matrix differential-algebraic equations (DAEs) and stiff ODEs with singular mass matrices. These methods provide efficient integration for moderately stiff systems with algebraic constraints, offering excellent performance for small to medium-sized DAE problems.

Key Properties

Mass matrix Rosenbrock methods provide:

  • DAE capability for index-1 differential-algebraic equations
  • W-method efficiency using approximate Jacobians for computational savings
  • Mass matrix support for singular and non-diagonal mass matrices
  • Moderate to high order accuracy (2nd to 6th order available)
  • Good stability properties with stiffly accurate behavior
  • Embedded error estimation for adaptive timestepping

When to Use Mass Matrix Rosenbrock Methods

These methods are recommended for:

  • Index-1 DAE systems with moderate stiffness
  • Small to medium constrained systems (< 1000 equations)
  • Semi-explicit DAEs arising from discretized PDEs
  • Problems requiring good accuracy with moderate computational cost
  • DAEs with moderate nonlinearity where W-methods are efficient
  • Electrical circuits and mechanical systems with constraints
Warn

In order to use OrdinaryDiffEqRosenbrock with DAEs that require a non-trivial consistent initialization, a nonlinear solver is required and thus using OrdinaryDiffEqNonlinearSolve is required or you must pass an initializealg with a valid nlsolve choice.

Mathematical Background

Mass matrix DAEs have the form: M du/dt = f(u,t)

Rosenbrock methods linearize around the current solution and solve linear systems of the form: (M/γh - J) k_i = ...

where J is the Jacobian of f and γ is a method parameter.

Solver Selection Guide

  • High tolerances (>1e-2): Rosenbrock23 - efficient low-order method
  • Medium tolerances (1e-8 to 1e-2): Rodas5P - most efficient choice, or Rodas4P for higher reliability
  • Low tolerances (<1e-8): Rodas5Pe or higher-order alternatives

Method families

  • Rodas5P: Recommended - Most efficient 5th-order method for general use
  • Rodas4P: More reliable 4th-order alternative
  • Rosenbrock23: Good for high tolerance problems
  • Rodas5: Standard 5th-order method without embedded pair optimization

Performance Guidelines

When mass matrix Rosenbrock methods excel

  • Small to medium DAE systems (< 1000 equations)
  • Moderately stiff problems where full BDF methods are overkill
  • Problems with efficient Jacobian computation or finite difference approximation
  • Index-1 DAEs with well-conditioned mass matrices
  • Semi-explicit index-1 problems from spatial discretizations

System size considerations

  • Small systems (< 100): Rosenbrock methods often outperform multistep methods
  • Medium systems (100-1000): Good performance with proper linear algebra
  • Large systems (> 1000): Consider BDF methods instead

Important DAE Considerations

Initial conditions

  • Must be consistent with algebraic constraints
  • Consistent initialization may require nonlinear solver
  • Index-1 assumption for reliable performance

Mass matrix requirements

  • Index-1 DAE structure for optimal performance
  • Non-singular leading submatrix for differential variables
  • Well-conditioned constraint equations

Alternative Approaches

Consider these alternatives:

  • Mass matrix BDF methods for larger or highly stiff DAE systems
  • Implicit Runge-Kutta methods for higher accuracy requirements
  • Standard Rosenbrock methods for regular ODEs without constraints
  • IMEX methods if natural explicit/implicit splitting exists

Example Usage

using LinearAlgebra: Diagonal
function rober(du, u, p, t)
    y₁, y₂, y₃ = u
    k₁, k₂, k₃ = p
    du[1] = -k₁ * y₁ + k₃ * y₂ * y₃
    du[2] = k₁ * y₁ - k₃ * y₂ * y₃ - k₂ * y₂^2
    du[3] = y₁ + y₂ + y₃ - 1
    nothing
end
M = Diagonal([1.0, 1.0, 0])  # Singular mass matrix
f = ODEFunction(rober, mass_matrix = M)
prob_mm = ODEProblem(f, [1.0, 0.0, 0.0], (0.0, 1e5), (0.04, 3e7, 1e4))
sol = solve(prob_mm, Rodas5(), reltol = 1e-8, abstol = 1e-8)

Installation

To be able to access the solvers in OrdinaryDiffEqRosenbrock, you must first install them use the Julia package manager:

using Pkg
Pkg.add("OrdinaryDiffEqRosenbrock")

This will only install the solvers listed at the bottom of this page. If you want to explore other solvers for your problem, you will need to install some of the other libraries listed in the navigation bar on the left.

Example usage

using OrdinaryDiffEqRosenbrock

function lorenz!(du, u, p, t)
    du[1] = 10.0 * (u[2] - u[1])
    du[2] = u[1] * (28.0 - u[3]) - u[2]
    du[3] = u[1] * u[2] - (8 / 3) * u[3]
end
u0 = [1.0; 0.0; 0.0]
tspan = (0.0, 100.0)
prob = ODEProblem(lorenz!, u0, tspan)
sol = solve(prob, Rodas5P())

Full list of solvers

OrdinaryDiffEqRosenbrock.Rosenbrock23Type
Rosenbrock23(; chunk_size = Val{0}(),
               standardtag = Val{true}(),
               autodiff = AutoForwardDiff(),
               concrete_jac = nothing,
               diff_type = Val{:forward}(),
               linsolve = nothing,
               precs = DEFAULT_PRECS,
               step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner-W(olfbrandt) Method. An Order 2/3 L-Stable Rosenbrock-W method which is good for very stiff equations with oscillations at low tolerances. 2nd order stiff-aware interpolation.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify Rosenbrock23(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Shampine L.F. and Reichelt M., (1997) The MATLAB ODE Suite, SIAM Journal of

Scientific Computing, 18 (1), pp. 1-22.

source
OrdinaryDiffEqRosenbrock.Rosenbrock32Type
Rosenbrock32(; chunk_size = Val{0}(),
               standardtag = Val{true}(),
               autodiff = AutoForwardDiff(),
               concrete_jac = nothing,
               diff_type = Val{:forward}(),
               linsolve = nothing,
               precs = DEFAULT_PRECS,
               step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner-W(olfbrandt) Method. An Order 3/2 A-Stable Rosenbrock-W method which is good for mildly stiff equations without oscillations at low tolerances. Note that this method is prone to instability in the presence of oscillations, so use with caution. 2nd order stiff-aware interpolation.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify Rosenbrock32(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Shampine L.F. and Reichelt M., (1997) The MATLAB ODE Suite, SIAM Journal of

Scientific Computing, 18 (1), pp. 1-22.

source
OrdinaryDiffEqRosenbrock.ROS3PType
ROS3P(; - `standardtag`: Specifies whether to use package-specific tags instead of the
            ForwardDiff default function-specific tags. For more information, see
            [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
            Defaults to `Val{true}()`.
        - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
            to specify whether to use automatic differentiation via
            [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
            differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
            Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
            `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
            To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
            `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
        - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
            `nothing`, which means it will be chosen true/false depending on circumstances
            of the solver, such as whether a Krylov subspace method is used for `linsolve`.
        - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
          For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
          `ROS3P(linsolve = KLUFactorization()`).
           When `nothing` is passed, uses `DefaultLinearSolver`.
        - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
          can be used as a left or right preconditioner.
          Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
          function where the arguments are defined as:
            - `W`: the current Jacobian of the nonlinear system. Specified as either
                ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                representation of the operator. Users can construct the W-matrix on demand
                by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                the `jac_prototype`.
            - `du`: the current ODE derivative
            - `u`: the current ODE state
            - `p`: the ODE parameters
            - `t`: the current ODE time
            - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                the last call to `precs`. It is recommended that this is checked to only
                update the preconditioner when `newW == true`.
            - `Plprev`: the previous `Pl`.
            - `Prprev`: the previous `Pr`.
            - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                Solver-dependent and subject to change.
          The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
          To specify one-sided preconditioning, simply return `nothing` for the preconditioner
          which is not used. Additionally, `precs` must supply the dispatch:
          ```julia
          Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
          ```
          which is used in the solver setup phase to construct the integrator
          type with the preconditioners `(Pl,Pr)`.
          The default is `precs=DEFAULT_PRECS` where the default preconditioner function
          is defined as:
          ```julia
          DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
          ```
        step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. 3rd order A-stable and stiffly stable Rosenbrock method. Keeps high accuracy on discretizations of nonlinear parabolic PDEs.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Lang, J. & Verwer, ROS3P—An Accurate Third-Order Rosenbrock Solver Designed for Parabolic Problems J. BIT Numerical Mathematics (2001) 41: 731. doi:10.1023/A:1021900219772
source
OrdinaryDiffEqRosenbrock.Rodas3Type
Rodas3(; - `standardtag`: Specifies whether to use package-specific tags instead of the
             ForwardDiff default function-specific tags. For more information, see
             [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
             Defaults to `Val{true}()`.
         - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
             to specify whether to use automatic differentiation via
             [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
             differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
             Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
             `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
             To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
             `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
         - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
             `nothing`, which means it will be chosen true/false depending on circumstances
             of the solver, such as whether a Krylov subspace method is used for `linsolve`.
         - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
           For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
           `Rodas3(linsolve = KLUFactorization()`).
            When `nothing` is passed, uses `DefaultLinearSolver`.
         - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
           can be used as a left or right preconditioner.
           Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
           function where the arguments are defined as:
             - `W`: the current Jacobian of the nonlinear system. Specified as either
                 ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                 commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                 representation of the operator. Users can construct the W-matrix on demand
                 by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                 the `jac_prototype`.
             - `du`: the current ODE derivative
             - `u`: the current ODE state
             - `p`: the ODE parameters
             - `t`: the current ODE time
             - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                 the last call to `precs`. It is recommended that this is checked to only
                 update the preconditioner when `newW == true`.
             - `Plprev`: the previous `Pl`.
             - `Prprev`: the previous `Pr`.
             - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                 Solver-dependent and subject to change.
           The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
           To specify one-sided preconditioning, simply return `nothing` for the preconditioner
           which is not used. Additionally, `precs` must supply the dispatch:
           ```julia
           Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
           ```
           which is used in the solver setup phase to construct the integrator
           type with the preconditioners `(Pl,Pr)`.
           The default is `precs=DEFAULT_PRECS` where the default preconditioner function
           is defined as:
           ```julia
           DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
           ```
         step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. 3rd order A-stable and stiffly stable Rosenbrock method.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Sandu, Verwer, Van Loon, Carmichael, Potra, Dabdub, Seinfeld, Benchmarking stiff ode solvers for atmospheric chemistry problems-I. implicit vs explicit, Atmospheric Environment, 31(19), 3151-3166, 1997.
source
OrdinaryDiffEqRosenbrock.Rodas23WType
Rodas23W(; chunk_size = Val{0}(),
           standardtag = Val{true}(),
           autodiff = AutoForwardDiff(),
           concrete_jac = nothing,
           diff_type = Val{:forward}(),
           linsolve = nothing,
           precs = DEFAULT_PRECS,
           step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner-W(olfbrandt) Method. An Order 2/3 L-Stable Rosenbrock-W method for stiff ODEs and DAEs in mass matrix form. 2nd order stiff-aware interpolation and additional error test for interpolation.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify Rodas23W(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Steinebach G., Rosenbrock methods within OrdinaryDiffEq.jl - Overview, recent developments and applications - Preprint 2024 https://github.com/hbrs-cse/RosenbrockMethods/blob/main/paper/JuliaPaper.pdf
source
OrdinaryDiffEqRosenbrock.Rodas3PType
Rodas3P(; - `standardtag`: Specifies whether to use package-specific tags instead of the
              ForwardDiff default function-specific tags. For more information, see
              [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
              Defaults to `Val{true}()`.
          - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
              to specify whether to use automatic differentiation via
              [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
              differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
              Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
              `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
              To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
              `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
          - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
              `nothing`, which means it will be chosen true/false depending on circumstances
              of the solver, such as whether a Krylov subspace method is used for `linsolve`.
          - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
            For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
            `Rodas3P(linsolve = KLUFactorization()`).
             When `nothing` is passed, uses `DefaultLinearSolver`.
          - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
            can be used as a left or right preconditioner.
            Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
            function where the arguments are defined as:
              - `W`: the current Jacobian of the nonlinear system. Specified as either
                  ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                  commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                  representation of the operator. Users can construct the W-matrix on demand
                  by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                  the `jac_prototype`.
              - `du`: the current ODE derivative
              - `u`: the current ODE state
              - `p`: the ODE parameters
              - `t`: the current ODE time
              - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                  the last call to `precs`. It is recommended that this is checked to only
                  update the preconditioner when `newW == true`.
              - `Plprev`: the previous `Pl`.
              - `Prprev`: the previous `Pr`.
              - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                  Solver-dependent and subject to change.
            The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
            To specify one-sided preconditioning, simply return `nothing` for the preconditioner
            which is not used. Additionally, `precs` must supply the dispatch:
            ```julia
            Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
            ```
            which is used in the solver setup phase to construct the integrator
            type with the preconditioners `(Pl,Pr)`.
            The default is `precs=DEFAULT_PRECS` where the default preconditioner function
            is defined as:
            ```julia
            DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
            ```
          step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. 3rd order A-stable and stiffly stable Rosenbrock method with a stiff-aware 3rd order interpolant and additional error test for interpolation. Keeps accuracy on discretizations of linear parabolic PDEs.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Steinebach G., Rosenbrock methods within OrdinaryDiffEq.jl - Overview, recent developments and applications - Preprint 2024 https://github.com/hbrs-cse/RosenbrockMethods/blob/main/paper/JuliaPaper.pdf
source
OrdinaryDiffEqRosenbrock.Rodas4Type
Rodas4(; - `standardtag`: Specifies whether to use package-specific tags instead of the
             ForwardDiff default function-specific tags. For more information, see
             [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
             Defaults to `Val{true}()`.
         - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
             to specify whether to use automatic differentiation via
             [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
             differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
             Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
             `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
             To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
             `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
         - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
             `nothing`, which means it will be chosen true/false depending on circumstances
             of the solver, such as whether a Krylov subspace method is used for `linsolve`.
         - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
           For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
           `Rodas4(linsolve = KLUFactorization()`).
            When `nothing` is passed, uses `DefaultLinearSolver`.
         - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
           can be used as a left or right preconditioner.
           Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
           function where the arguments are defined as:
             - `W`: the current Jacobian of the nonlinear system. Specified as either
                 ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                 commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                 representation of the operator. Users can construct the W-matrix on demand
                 by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                 the `jac_prototype`.
             - `du`: the current ODE derivative
             - `u`: the current ODE state
             - `p`: the ODE parameters
             - `t`: the current ODE time
             - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                 the last call to `precs`. It is recommended that this is checked to only
                 update the preconditioner when `newW == true`.
             - `Plprev`: the previous `Pl`.
             - `Prprev`: the previous `Pr`.
             - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                 Solver-dependent and subject to change.
           The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
           To specify one-sided preconditioning, simply return `nothing` for the preconditioner
           which is not used. Additionally, `precs` must supply the dispatch:
           ```julia
           Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
           ```
           which is used in the solver setup phase to construct the integrator
           type with the preconditioners `(Pl,Pr)`.
           The default is `precs=DEFAULT_PRECS` where the default preconditioner function
           is defined as:
           ```julia
           DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
           ```
         step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. A 4th order A-stable stiffly stable Rosenbrock method with a stiff-aware 3rd order interpolant

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • E. Hairer, G. Wanner, Solving ordinary differential equations II, stiff and differential-algebraic problems. Computational mathematics (2nd revised ed.), Springer (1996)
source
OrdinaryDiffEqRosenbrock.Rodas42Type
Rodas42(; - `standardtag`: Specifies whether to use package-specific tags instead of the
              ForwardDiff default function-specific tags. For more information, see
              [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
              Defaults to `Val{true}()`.
          - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
              to specify whether to use automatic differentiation via
              [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
              differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
              Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
              `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
              To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
              `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
          - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
              `nothing`, which means it will be chosen true/false depending on circumstances
              of the solver, such as whether a Krylov subspace method is used for `linsolve`.
          - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
            For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
            `Rodas42(linsolve = KLUFactorization()`).
             When `nothing` is passed, uses `DefaultLinearSolver`.
          - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
            can be used as a left or right preconditioner.
            Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
            function where the arguments are defined as:
              - `W`: the current Jacobian of the nonlinear system. Specified as either
                  ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                  commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                  representation of the operator. Users can construct the W-matrix on demand
                  by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                  the `jac_prototype`.
              - `du`: the current ODE derivative
              - `u`: the current ODE state
              - `p`: the ODE parameters
              - `t`: the current ODE time
              - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                  the last call to `precs`. It is recommended that this is checked to only
                  update the preconditioner when `newW == true`.
              - `Plprev`: the previous `Pl`.
              - `Prprev`: the previous `Pr`.
              - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                  Solver-dependent and subject to change.
            The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
            To specify one-sided preconditioning, simply return `nothing` for the preconditioner
            which is not used. Additionally, `precs` must supply the dispatch:
            ```julia
            Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
            ```
            which is used in the solver setup phase to construct the integrator
            type with the preconditioners `(Pl,Pr)`.
            The default is `precs=DEFAULT_PRECS` where the default preconditioner function
            is defined as:
            ```julia
            DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
            ```
          step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. A 4th order A-stable stiffly stable Rosenbrock method with a stiff-aware 3rd order interpolant

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • E. Hairer, G. Wanner, Solving ordinary differential equations II, stiff and differential-algebraic problems. Computational mathematics (2nd revised ed.), Springer (1996)
source
OrdinaryDiffEqRosenbrock.Rodas4PType
Rodas4P(; - `standardtag`: Specifies whether to use package-specific tags instead of the
              ForwardDiff default function-specific tags. For more information, see
              [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
              Defaults to `Val{true}()`.
          - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
              to specify whether to use automatic differentiation via
              [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
              differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
              Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
              `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
              To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
              `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
          - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
              `nothing`, which means it will be chosen true/false depending on circumstances
              of the solver, such as whether a Krylov subspace method is used for `linsolve`.
          - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
            For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
            `Rodas4P(linsolve = KLUFactorization()`).
             When `nothing` is passed, uses `DefaultLinearSolver`.
          - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
            can be used as a left or right preconditioner.
            Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
            function where the arguments are defined as:
              - `W`: the current Jacobian of the nonlinear system. Specified as either
                  ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                  commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                  representation of the operator. Users can construct the W-matrix on demand
                  by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                  the `jac_prototype`.
              - `du`: the current ODE derivative
              - `u`: the current ODE state
              - `p`: the ODE parameters
              - `t`: the current ODE time
              - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                  the last call to `precs`. It is recommended that this is checked to only
                  update the preconditioner when `newW == true`.
              - `Plprev`: the previous `Pl`.
              - `Prprev`: the previous `Pr`.
              - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                  Solver-dependent and subject to change.
            The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
            To specify one-sided preconditioning, simply return `nothing` for the preconditioner
            which is not used. Additionally, `precs` must supply the dispatch:
            ```julia
            Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
            ```
            which is used in the solver setup phase to construct the integrator
            type with the preconditioners `(Pl,Pr)`.
            The default is `precs=DEFAULT_PRECS` where the default preconditioner function
            is defined as:
            ```julia
            DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
            ```
          step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. 4th order A-stable stiffly stable Rosenbrock method with a stiff-aware 3rd order interpolant. 4th order on linear parabolic problems and 3rd order accurate on nonlinear parabolic problems (as opposed to lower if not corrected).

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Steinebach, G., Rentrop, P., An adaptive method of lines approach for modelling flow and transport in rivers. Adaptive method of lines , Wouver, A. Vande, Sauces, Ph., Schiesser, W.E. (ed.),S. 181-205,Chapman & Hall/CRC, 2001,
  • Steinebach, G., Oder-reduction of ROW-methods for DAEs and method of lines applications. Preprint-Nr. 1741, FB Mathematik, TH Darmstadt, 1995.
source
OrdinaryDiffEqRosenbrock.Rodas4P2Type
Rodas4P2(; chunk_size = Val{0}(),
           standardtag = Val{true}(),
           autodiff = AutoForwardDiff(),
           concrete_jac = nothing,
           diff_type = Val{:forward}(),
           linsolve = nothing,
           precs = DEFAULT_PRECS,
           step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner-W(olfbrandt) Method. A 4th order L-stable stiffly stable Rosenbrock method with a stiff-aware 3rd order interpolant. 4th order on linear parabolic problems and 3rd order accurate on nonlinear parabolic problems. It is an improvement of Roadas4P and in case of inexact Jacobians a second order W method.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify Rodas4P2(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Steinebach G., Improvement of Rosenbrock-Wanner Method RODASP, In: Reis T., Grundel S., Schöps S. (eds) Progress in Differential-Algebraic Equations II. Differential-Algebraic Equations Forum. Springer, Cham., 165-184, 2020.
source
OrdinaryDiffEqRosenbrock.Rodas5Type
Rodas5(; - `standardtag`: Specifies whether to use package-specific tags instead of the
             ForwardDiff default function-specific tags. For more information, see
             [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
             Defaults to `Val{true}()`.
         - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
             to specify whether to use automatic differentiation via
             [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
             differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
             Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
             `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
             To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
             `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
         - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
             `nothing`, which means it will be chosen true/false depending on circumstances
             of the solver, such as whether a Krylov subspace method is used for `linsolve`.
         - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
           For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
           `Rodas5(linsolve = KLUFactorization()`).
            When `nothing` is passed, uses `DefaultLinearSolver`.
         - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
           can be used as a left or right preconditioner.
           Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
           function where the arguments are defined as:
             - `W`: the current Jacobian of the nonlinear system. Specified as either
                 ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                 commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                 representation of the operator. Users can construct the W-matrix on demand
                 by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                 the `jac_prototype`.
             - `du`: the current ODE derivative
             - `u`: the current ODE state
             - `p`: the ODE parameters
             - `t`: the current ODE time
             - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                 the last call to `precs`. It is recommended that this is checked to only
                 update the preconditioner when `newW == true`.
             - `Plprev`: the previous `Pl`.
             - `Prprev`: the previous `Pr`.
             - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                 Solver-dependent and subject to change.
           The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
           To specify one-sided preconditioning, simply return `nothing` for the preconditioner
           which is not used. Additionally, `precs` must supply the dispatch:
           ```julia
           Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
           ```
           which is used in the solver setup phase to construct the integrator
           type with the preconditioners `(Pl,Pr)`.
           The default is `precs=DEFAULT_PRECS` where the default preconditioner function
           is defined as:
           ```julia
           DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
           ```
         step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. A 5th order A-stable stiffly stable Rosenbrock method with a stiff-aware 4th order interpolant.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Di Marzo G. RODAS5(4) – Méthodes de Rosenbrock d’ordre 5(4) adaptées aux problemes différentiels-algébriques. MSc mathematics thesis, Faculty of Science, University of Geneva, Switzerland.
source
OrdinaryDiffEqRosenbrock.Rodas5PType
Rodas5P(; chunk_size = Val{0}(),
          standardtag = Val{true}(),
          autodiff = AutoForwardDiff(),
          concrete_jac = nothing,
          diff_type = Val{:forward}(),
          linsolve = nothing,
          precs = DEFAULT_PRECS,
          step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner-W(olfbrandt) Method. A 5th order A-stable stiffly stable Rosenbrock method with a stiff-aware 4th order interpolant. Has improved stability in the adaptive time stepping embedding.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify Rodas5P(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Steinebach G. Construction of Rosenbrock–Wanner method Rodas5P and numerical benchmarks within the Julia Differential Equations package. In: BIT Numerical Mathematics, 63(2), 2023
source
OrdinaryDiffEqRosenbrock.Rodas5PeType
Rodas5Pe(; chunk_size = Val{0}(),
           standardtag = Val{true}(),
           autodiff = AutoForwardDiff(),
           concrete_jac = nothing,
           diff_type = Val{:forward}(),
           linsolve = nothing,
           precs = DEFAULT_PRECS,
           step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner-W(olfbrandt) Method. Variant of Ropdas5P with modified embedded scheme.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify Rodas5Pe(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Steinebach G. Rosenbrock methods within OrdinaryDiffEq.jl - Overview, recent developments and applications - Preprint 2024 https://github.com/hbrs-cse/RosenbrockMethods/blob/main/paper/JuliaPaper.pdf
source
OrdinaryDiffEqRosenbrock.Rodas5PrType
Rodas5Pr(; chunk_size = Val{0}(),
           standardtag = Val{true}(),
           autodiff = AutoForwardDiff(),
           concrete_jac = nothing,
           diff_type = Val{:forward}(),
           linsolve = nothing,
           precs = DEFAULT_PRECS,
           step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner-W(olfbrandt) Method. Variant of Ropdas5P with additional residual control.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify Rodas5Pr(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Steinebach G. Rosenbrock methods within OrdinaryDiffEq.jl - Overview, recent developments and applications - Preprint 2024 https://github.com/hbrs-cse/RosenbrockMethods/blob/main/paper/JuliaPaper.pdf
source
OrdinaryDiffEqRosenbrock.RosenbrockW6S4OSType
RosenbrockW6S4OS(; chunk_size = Val{0}(),
                   standardtag = Val{true}(),
                   autodiff = AutoForwardDiff(),
                   concrete_jac = nothing,
                   diff_type = Val{:forward}(),
                   linsolve = nothing,
                   precs = DEFAULT_PRECS)

Rosenbrock-Wanner-W(olfbrandt) Method. A 4th order L-stable Rosenbrock-W method (fixed step only).

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify RosenbrockW6S4OS(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing

References

https://doi.org/10.1016/j.cam.2009.09.017

source
OrdinaryDiffEqRosenbrock.ROS2Type
ROS2(; - `standardtag`: Specifies whether to use package-specific tags instead of the
           ForwardDiff default function-specific tags. For more information, see
           [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
           Defaults to `Val{true}()`.
       - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
           to specify whether to use automatic differentiation via
           [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
           differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
           Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
           `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
           To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
           `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
       - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
           `nothing`, which means it will be chosen true/false depending on circumstances
           of the solver, such as whether a Krylov subspace method is used for `linsolve`.
       - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
         For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
         `ROS2(linsolve = KLUFactorization()`).
          When `nothing` is passed, uses `DefaultLinearSolver`.
       - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
         can be used as a left or right preconditioner.
         Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
         function where the arguments are defined as:
           - `W`: the current Jacobian of the nonlinear system. Specified as either
               ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
               commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
               representation of the operator. Users can construct the W-matrix on demand
               by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
               the `jac_prototype`.
           - `du`: the current ODE derivative
           - `u`: the current ODE state
           - `p`: the ODE parameters
           - `t`: the current ODE time
           - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
               the last call to `precs`. It is recommended that this is checked to only
               update the preconditioner when `newW == true`.
           - `Plprev`: the previous `Pl`.
           - `Prprev`: the previous `Pr`.
           - `solverdata`: Optional extra data the solvers can give to the `precs` function.
               Solver-dependent and subject to change.
         The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
         To specify one-sided preconditioning, simply return `nothing` for the preconditioner
         which is not used. Additionally, `precs` must supply the dispatch:
         ```julia
         Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
         ```
         which is used in the solver setup phase to construct the integrator
         type with the preconditioners `(Pl,Pr)`.
         The default is `precs=DEFAULT_PRECS` where the default preconditioner function
         is defined as:
         ```julia
         DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
         ```)

Rosenbrock-Wanner Method. A 2nd order L-stable Rosenbrock method with 2 internal stages.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver

References

  • J. G. Verwer et al. (1999): A second-order Rosenbrock method applied to photochemical dispersion problems https://doi.org/10.1137/S1064827597326651
source
OrdinaryDiffEqRosenbrock.ROS2PRType
ROS2PR(; - `standardtag`: Specifies whether to use package-specific tags instead of the
             ForwardDiff default function-specific tags. For more information, see
             [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
             Defaults to `Val{true}()`.
         - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
             to specify whether to use automatic differentiation via
             [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
             differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
             Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
             `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
             To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
             `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
         - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
             `nothing`, which means it will be chosen true/false depending on circumstances
             of the solver, such as whether a Krylov subspace method is used for `linsolve`.
         - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
           For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
           `ROS2PR(linsolve = KLUFactorization()`).
            When `nothing` is passed, uses `DefaultLinearSolver`.
         - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
           can be used as a left or right preconditioner.
           Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
           function where the arguments are defined as:
             - `W`: the current Jacobian of the nonlinear system. Specified as either
                 ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                 commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                 representation of the operator. Users can construct the W-matrix on demand
                 by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                 the `jac_prototype`.
             - `du`: the current ODE derivative
             - `u`: the current ODE state
             - `p`: the ODE parameters
             - `t`: the current ODE time
             - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                 the last call to `precs`. It is recommended that this is checked to only
                 update the preconditioner when `newW == true`.
             - `Plprev`: the previous `Pl`.
             - `Prprev`: the previous `Pr`.
             - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                 Solver-dependent and subject to change.
           The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
           To specify one-sided preconditioning, simply return `nothing` for the preconditioner
           which is not used. Additionally, `precs` must supply the dispatch:
           ```julia
           Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
           ```
           which is used in the solver setup phase to construct the integrator
           type with the preconditioners `(Pl,Pr)`.
           The default is `precs=DEFAULT_PRECS` where the default preconditioner function
           is defined as:
           ```julia
           DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
           ```)

Rosenbrock-Wanner Method. 2nd order stiffly accurate Rosenbrock method with 3 internal stages with (Rinf=0). For problems with medium stiffness the convergence behaviour is very poor and it is recommended to use ROS2S instead.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver

References

  • Rang, Joachim (2014): The Prothero and Robinson example: Convergence studies for Runge-Kutta and Rosenbrock-Wanner methods. https://doi.org/10.24355/dbbs.084-201408121139-0
source
OrdinaryDiffEqRosenbrock.ROS2SType
ROS2S(; chunk_size = Val{0}(),
        standardtag = Val{true}(),
        autodiff = AutoForwardDiff(),
        concrete_jac = nothing,
        diff_type = Val{:forward}(),
        linsolve = nothing,
        precs = DEFAULT_PRECS)

Rosenbrock-Wanner-W(olfbrandt) Method. 2nd order stiffly accurate Rosenbrock-Wanner W-method with 3 internal stages with B_PR consistent of order 2 with (Rinf=0).

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify ROS2S(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing

References

  • Rang, Joachim (2014): The Prothero and Robinson example: Convergence studies for Runge-Kutta and Rosenbrock-Wanner methods. https://doi.org/10.24355/dbbs.084-201408121139-0
source
OrdinaryDiffEqRosenbrock.ROS3Type
ROS3(; - `standardtag`: Specifies whether to use package-specific tags instead of the
           ForwardDiff default function-specific tags. For more information, see
           [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
           Defaults to `Val{true}()`.
       - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
           to specify whether to use automatic differentiation via
           [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
           differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
           Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
           `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
           To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
           `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
       - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
           `nothing`, which means it will be chosen true/false depending on circumstances
           of the solver, such as whether a Krylov subspace method is used for `linsolve`.
       - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
         For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
         `ROS3(linsolve = KLUFactorization()`).
          When `nothing` is passed, uses `DefaultLinearSolver`.
       - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
         can be used as a left or right preconditioner.
         Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
         function where the arguments are defined as:
           - `W`: the current Jacobian of the nonlinear system. Specified as either
               ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
               commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
               representation of the operator. Users can construct the W-matrix on demand
               by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
               the `jac_prototype`.
           - `du`: the current ODE derivative
           - `u`: the current ODE state
           - `p`: the ODE parameters
           - `t`: the current ODE time
           - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
               the last call to `precs`. It is recommended that this is checked to only
               update the preconditioner when `newW == true`.
           - `Plprev`: the previous `Pl`.
           - `Prprev`: the previous `Pr`.
           - `solverdata`: Optional extra data the solvers can give to the `precs` function.
               Solver-dependent and subject to change.
         The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
         To specify one-sided preconditioning, simply return `nothing` for the preconditioner
         which is not used. Additionally, `precs` must supply the dispatch:
         ```julia
         Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
         ```
         which is used in the solver setup phase to construct the integrator
         type with the preconditioners `(Pl,Pr)`.
         The default is `precs=DEFAULT_PRECS` where the default preconditioner function
         is defined as:
         ```julia
         DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
         ```)

Rosenbrock-Wanner Method. 3rd order L-stable Rosenbrock method with 3 internal stages with an embedded strongly A-stable 2nd order method.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver

References

  • E. Hairer, G. Wanner, Solving ordinary differential equations II, stiff and differential-algebraic problems. Computational mathematics (2nd revised ed.), Springer (1996)
source
OrdinaryDiffEqRosenbrock.ROS3PRType
ROS3PR(; - `standardtag`: Specifies whether to use package-specific tags instead of the
             ForwardDiff default function-specific tags. For more information, see
             [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
             Defaults to `Val{true}()`.
         - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
             to specify whether to use automatic differentiation via
             [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
             differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
             Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
             `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
             To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
             `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
         - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
             `nothing`, which means it will be chosen true/false depending on circumstances
             of the solver, such as whether a Krylov subspace method is used for `linsolve`.
         - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
           For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
           `ROS3PR(linsolve = KLUFactorization()`).
            When `nothing` is passed, uses `DefaultLinearSolver`.
         - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
           can be used as a left or right preconditioner.
           Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
           function where the arguments are defined as:
             - `W`: the current Jacobian of the nonlinear system. Specified as either
                 ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                 commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                 representation of the operator. Users can construct the W-matrix on demand
                 by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                 the `jac_prototype`.
             - `du`: the current ODE derivative
             - `u`: the current ODE state
             - `p`: the ODE parameters
             - `t`: the current ODE time
             - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                 the last call to `precs`. It is recommended that this is checked to only
                 update the preconditioner when `newW == true`.
             - `Plprev`: the previous `Pl`.
             - `Prprev`: the previous `Pr`.
             - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                 Solver-dependent and subject to change.
           The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
           To specify one-sided preconditioning, simply return `nothing` for the preconditioner
           which is not used. Additionally, `precs` must supply the dispatch:
           ```julia
           Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
           ```
           which is used in the solver setup phase to construct the integrator
           type with the preconditioners `(Pl,Pr)`.
           The default is `precs=DEFAULT_PRECS` where the default preconditioner function
           is defined as:
           ```julia
           DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
           ```)

Rosenbrock-Wanner Method. 3nd order stiffly accurate Rosenbrock method with 3 internal stages with B_PR consistent of order 3, which is strongly A-stable with Rinf~=-0.73.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver

References

  • Rang, Joachim (2014): The Prothero and Robinson example: Convergence studies for Runge-Kutta and Rosenbrock-Wanner methods. https://doi.org/10.24355/dbbs.084-201408121139-0
source
OrdinaryDiffEqRosenbrock.Scholz4_7Type
Scholz4_7(; - `standardtag`: Specifies whether to use package-specific tags instead of the
                ForwardDiff default function-specific tags. For more information, see
                [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
                Defaults to `Val{true}()`.
            - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
                to specify whether to use automatic differentiation via
                [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
                differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
                Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
                `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
                To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
                `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
            - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
                `nothing`, which means it will be chosen true/false depending on circumstances
                of the solver, such as whether a Krylov subspace method is used for `linsolve`.
            - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
              For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
              `Scholz4_7(linsolve = KLUFactorization()`).
               When `nothing` is passed, uses `DefaultLinearSolver`.
            - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
              can be used as a left or right preconditioner.
              Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
              function where the arguments are defined as:
                - `W`: the current Jacobian of the nonlinear system. Specified as either
                    ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                    commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                    representation of the operator. Users can construct the W-matrix on demand
                    by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                    the `jac_prototype`.
                - `du`: the current ODE derivative
                - `u`: the current ODE state
                - `p`: the ODE parameters
                - `t`: the current ODE time
                - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                    the last call to `precs`. It is recommended that this is checked to only
                    update the preconditioner when `newW == true`.
                - `Plprev`: the previous `Pl`.
                - `Prprev`: the previous `Pr`.
                - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                    Solver-dependent and subject to change.
              The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
              To specify one-sided preconditioning, simply return `nothing` for the preconditioner
              which is not used. Additionally, `precs` must supply the dispatch:
              ```julia
              Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
              ```
              which is used in the solver setup phase to construct the integrator
              type with the preconditioners `(Pl,Pr)`.
              The default is `precs=DEFAULT_PRECS` where the default preconditioner function
              is defined as:
              ```julia
              DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
              ```)

Rosenbrock-Wanner Method. 3nd order stiffly accurate Rosenbrock method with 3 internal stages with B_PR consistent of order 3, which is strongly A-stable with Rinf~=-0.73. Convergence with order 4 for the stiff case, but has a poor accuracy.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver

References

  • Rang, Joachim (2014): The Prothero and Robinson example: Convergence studies for Runge-Kutta and Rosenbrock-Wanner methods. https://doi.org/10.24355/dbbs.084-201408121139-0
source
OrdinaryDiffEqRosenbrock.ROS34PW1aType
ROS34PW1a(; chunk_size = Val{0}(),
            standardtag = Val{true}(),
            autodiff = AutoForwardDiff(),
            concrete_jac = nothing,
            diff_type = Val{:forward}(),
            linsolve = nothing,
            precs = DEFAULT_PRECS)

Rosenbrock-Wanner-W(olfbrandt) Method. A 4th order L-stable Rosenbrock-W method.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify ROS34PW1a(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing

References

@article{rang2005new, title={New Rosenbrock W-methods of order 3 for partial differential algebraic equations of index 1}, author={Rang, Joachim and Angermann, L}, journal={BIT Numerical Mathematics}, volume={45}, pages={761–787}, year={2005}, publisher={Springer}}

source
OrdinaryDiffEqRosenbrock.ROS34PW1bType
ROS34PW1b(; chunk_size = Val{0}(),
            standardtag = Val{true}(),
            autodiff = AutoForwardDiff(),
            concrete_jac = nothing,
            diff_type = Val{:forward}(),
            linsolve = nothing,
            precs = DEFAULT_PRECS)

Rosenbrock-Wanner-W(olfbrandt) Method. A 4th order L-stable Rosenbrock-W method.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify ROS34PW1b(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing

References

@article{rang2005new, title={New Rosenbrock W-methods of order 3 for partial differential algebraic equations of index 1}, author={Rang, Joachim and Angermann, L}, journal={BIT Numerical Mathematics}, volume={45}, pages={761–787}, year={2005}, publisher={Springer}}

source
OrdinaryDiffEqRosenbrock.ROS34PW2Type
ROS34PW2(; chunk_size = Val{0}(),
           standardtag = Val{true}(),
           autodiff = AutoForwardDiff(),
           concrete_jac = nothing,
           diff_type = Val{:forward}(),
           linsolve = nothing,
           precs = DEFAULT_PRECS)

Rosenbrock-Wanner-W(olfbrandt) Method. A 4th order stiffy accurate Rosenbrock-W method for PDAEs.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify ROS34PW2(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing

References

@article{rang2005new, title={New Rosenbrock W-methods of order 3 for partial differential algebraic equations of index 1}, author={Rang, Joachim and Angermann, L}, journal={BIT Numerical Mathematics}, volume={45}, pages={761–787}, year={2005}, publisher={Springer}}

source
OrdinaryDiffEqRosenbrock.ROS34PW3Type
ROS34PW3(; chunk_size = Val{0}(),
           standardtag = Val{true}(),
           autodiff = AutoForwardDiff(),
           concrete_jac = nothing,
           diff_type = Val{:forward}(),
           linsolve = nothing,
           precs = DEFAULT_PRECS)

Rosenbrock-Wanner-W(olfbrandt) Method. A 4th order strongly A-stable (Rinf~0.63) Rosenbrock-W method.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify ROS34PW3(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing

References

@article{rang2005new, title={New Rosenbrock W-methods of order 3 for partial differential algebraic equations of index 1}, author={Rang, Joachim and Angermann, L}, journal={BIT Numerical Mathematics}, volume={45}, pages={761–787}, year={2005}, publisher={Springer}}

source
OrdinaryDiffEqRosenbrock.ROS34PRwType
ROS34PRw(; chunk_size = Val{0}(),
           standardtag = Val{true}(),
           autodiff = AutoForwardDiff(),
           concrete_jac = nothing,
           diff_type = Val{:forward}(),
           linsolve = nothing,
           precs = DEFAULT_PRECS)

Rosenbrock-Wanner-W(olfbrandt) Method. 3rd order stiffly accurate Rosenbrock-Wanner W-method with 4 internal stages, B_PR consistent of order 2. The order of convergence decreases if medium stiff problems are considered.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify ROS34PRw(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing

References

  • Joachim Rang, Improved traditional Rosenbrock–Wanner methods for stiff ODEs and DAEs, Journal of Computational and Applied Mathematics, https://doi.org/10.1016/j.cam.2015.03.010
source
OrdinaryDiffEqRosenbrock.ROS3PRLType
ROS3PRL(; - `standardtag`: Specifies whether to use package-specific tags instead of the
              ForwardDiff default function-specific tags. For more information, see
              [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
              Defaults to `Val{true}()`.
          - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
              to specify whether to use automatic differentiation via
              [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
              differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
              Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
              `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
              To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
              `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
          - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
              `nothing`, which means it will be chosen true/false depending on circumstances
              of the solver, such as whether a Krylov subspace method is used for `linsolve`.
          - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
            For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
            `ROS3PRL(linsolve = KLUFactorization()`).
             When `nothing` is passed, uses `DefaultLinearSolver`.
          - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
            can be used as a left or right preconditioner.
            Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
            function where the arguments are defined as:
              - `W`: the current Jacobian of the nonlinear system. Specified as either
                  ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                  commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                  representation of the operator. Users can construct the W-matrix on demand
                  by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                  the `jac_prototype`.
              - `du`: the current ODE derivative
              - `u`: the current ODE state
              - `p`: the ODE parameters
              - `t`: the current ODE time
              - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                  the last call to `precs`. It is recommended that this is checked to only
                  update the preconditioner when `newW == true`.
              - `Plprev`: the previous `Pl`.
              - `Prprev`: the previous `Pr`.
              - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                  Solver-dependent and subject to change.
            The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
            To specify one-sided preconditioning, simply return `nothing` for the preconditioner
            which is not used. Additionally, `precs` must supply the dispatch:
            ```julia
            Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
            ```
            which is used in the solver setup phase to construct the integrator
            type with the preconditioners `(Pl,Pr)`.
            The default is `precs=DEFAULT_PRECS` where the default preconditioner function
            is defined as:
            ```julia
            DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
            ```)

Rosenbrock-Wanner Method. 3rd order stiffly accurate Rosenbrock method with 4 internal stages, B_PR consistent of order 2 with Rinf=0. The order of convergence decreases if medium stiff problems are considered, but it has good results for very stiff cases.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver

References

  • Rang, Joachim (2014): The Prothero and Robinson example: Convergence studies for Runge-Kutta and Rosenbrock-Wanner methods. https://doi.org/10.24355/dbbs.084-201408121139-0
source
OrdinaryDiffEqRosenbrock.ROS3PRL2Type
ROS3PRL2(; - `standardtag`: Specifies whether to use package-specific tags instead of the
               ForwardDiff default function-specific tags. For more information, see
               [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
               Defaults to `Val{true}()`.
           - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
               to specify whether to use automatic differentiation via
               [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
               differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
               Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
               `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
               To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
               `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
           - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
               `nothing`, which means it will be chosen true/false depending on circumstances
               of the solver, such as whether a Krylov subspace method is used for `linsolve`.
           - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
             For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
             `ROS3PRL2(linsolve = KLUFactorization()`).
              When `nothing` is passed, uses `DefaultLinearSolver`.
           - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
             can be used as a left or right preconditioner.
             Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
             function where the arguments are defined as:
               - `W`: the current Jacobian of the nonlinear system. Specified as either
                   ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                   commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                   representation of the operator. Users can construct the W-matrix on demand
                   by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                   the `jac_prototype`.
               - `du`: the current ODE derivative
               - `u`: the current ODE state
               - `p`: the ODE parameters
               - `t`: the current ODE time
               - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                   the last call to `precs`. It is recommended that this is checked to only
                   update the preconditioner when `newW == true`.
               - `Plprev`: the previous `Pl`.
               - `Prprev`: the previous `Pr`.
               - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                   Solver-dependent and subject to change.
             The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
             To specify one-sided preconditioning, simply return `nothing` for the preconditioner
             which is not used. Additionally, `precs` must supply the dispatch:
             ```julia
             Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
             ```
             which is used in the solver setup phase to construct the integrator
             type with the preconditioners `(Pl,Pr)`.
             The default is `precs=DEFAULT_PRECS` where the default preconditioner function
             is defined as:
             ```julia
             DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
             ```)

Rosenbrock-Wanner Method. 3rd order stiffly accurate Rosenbrock method with 4 internal stages, B_PR consistent of order 3. The order of convergence does NOT decreases if medium stiff problems are considered as it does for ROS3PRL.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver

References

  • Rang, Joachim (2014): The Prothero and Robinson example: Convergence studies for Runge-Kutta and Rosenbrock-Wanner methods. https://doi.org/10.24355/dbbs.084-201408121139-0
source
OrdinaryDiffEqRosenbrock.ROK4aType
ROK4a(; chunk_size = Val{0}(),
        standardtag = Val{true}(),
        autodiff = AutoForwardDiff(),
        concrete_jac = nothing,
        diff_type = Val{:forward}(),
        linsolve = nothing,
        precs = DEFAULT_PRECS)

Rosenbrock-Wanner-W(olfbrandt) Method. 4rd order L-stable Rosenbrock-Krylov method with 4 internal stages, with a 3rd order embedded method which is strongly A-stable with Rinf~=0.55. (when using exact Jacobians)

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify ROK4a(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing

References

  • Tranquilli, Paul and Sandu, Adrian (2014): Rosenbrock–Krylov Methods for Large Systems of Differential Equations https://doi.org/10.1137/130923336
source
OrdinaryDiffEqRosenbrock.RosShamp4Type
RosShamp4(; - `standardtag`: Specifies whether to use package-specific tags instead of the
                ForwardDiff default function-specific tags. For more information, see
                [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
                Defaults to `Val{true}()`.
            - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
                to specify whether to use automatic differentiation via
                [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
                differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
                Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
                `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
                To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
                `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
            - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
                `nothing`, which means it will be chosen true/false depending on circumstances
                of the solver, such as whether a Krylov subspace method is used for `linsolve`.
            - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
              For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
              `RosShamp4(linsolve = KLUFactorization()`).
               When `nothing` is passed, uses `DefaultLinearSolver`.
            - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
              can be used as a left or right preconditioner.
              Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
              function where the arguments are defined as:
                - `W`: the current Jacobian of the nonlinear system. Specified as either
                    ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                    commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                    representation of the operator. Users can construct the W-matrix on demand
                    by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                    the `jac_prototype`.
                - `du`: the current ODE derivative
                - `u`: the current ODE state
                - `p`: the ODE parameters
                - `t`: the current ODE time
                - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                    the last call to `precs`. It is recommended that this is checked to only
                    update the preconditioner when `newW == true`.
                - `Plprev`: the previous `Pl`.
                - `Prprev`: the previous `Pr`.
                - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                    Solver-dependent and subject to change.
              The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
              To specify one-sided preconditioning, simply return `nothing` for the preconditioner
              which is not used. Additionally, `precs` must supply the dispatch:
              ```julia
              Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
              ```
              which is used in the solver setup phase to construct the integrator
              type with the preconditioners `(Pl,Pr)`.
              The default is `precs=DEFAULT_PRECS` where the default preconditioner function
              is defined as:
              ```julia
              DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
              ```)

Rosenbrock-Wanner Method. An A-stable 4th order Rosenbrock method.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver

References

  • L. F. Shampine, Implementation of Rosenbrock Methods, ACM Transactions on Mathematical Software (TOMS), 8: 2, 93-113. doi:10.1145/355993.355994
source
OrdinaryDiffEqRosenbrock.Veldd4Type
Veldd4(; - `standardtag`: Specifies whether to use package-specific tags instead of the
             ForwardDiff default function-specific tags. For more information, see
             [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
             Defaults to `Val{true}()`.
         - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
             to specify whether to use automatic differentiation via
             [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
             differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
             Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
             `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
             To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
             `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
         - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
             `nothing`, which means it will be chosen true/false depending on circumstances
             of the solver, such as whether a Krylov subspace method is used for `linsolve`.
         - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
           For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
           `Veldd4(linsolve = KLUFactorization()`).
            When `nothing` is passed, uses `DefaultLinearSolver`.
         - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
           can be used as a left or right preconditioner.
           Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
           function where the arguments are defined as:
             - `W`: the current Jacobian of the nonlinear system. Specified as either
                 ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                 commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                 representation of the operator. Users can construct the W-matrix on demand
                 by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                 the `jac_prototype`.
             - `du`: the current ODE derivative
             - `u`: the current ODE state
             - `p`: the ODE parameters
             - `t`: the current ODE time
             - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                 the last call to `precs`. It is recommended that this is checked to only
                 update the preconditioner when `newW == true`.
             - `Plprev`: the previous `Pl`.
             - `Prprev`: the previous `Pr`.
             - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                 Solver-dependent and subject to change.
           The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
           To specify one-sided preconditioning, simply return `nothing` for the preconditioner
           which is not used. Additionally, `precs` must supply the dispatch:
           ```julia
           Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
           ```
           which is used in the solver setup phase to construct the integrator
           type with the preconditioners `(Pl,Pr)`.
           The default is `precs=DEFAULT_PRECS` where the default preconditioner function
           is defined as:
           ```julia
           DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
           ```
         step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. A 4th order D-stable Rosenbrock method.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • van Veldhuizen, D-stability and Kaps-Rentrop-methods, M. Computing (1984) 32: 229. doi:10.1007/BF02243574
source
OrdinaryDiffEqRosenbrock.Velds4Type
Velds4(; chunk_size = Val{0}(),
         standardtag = Val{true}(),
         autodiff = AutoForwardDiff(),
         concrete_jac = nothing,
         diff_type = Val{:forward}(),
         linsolve = nothing,
         precs = DEFAULT_PRECS,
         step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner-W(olfbrandt) Method. A 4th order A-stable Rosenbrock method.

Keyword Arguments

  • standardtag: Specifies whether to use package-specific tags instead of the ForwardDiff default function-specific tags. For more information, see this blog post. Defaults to Val{true}().
  • autodiff: Uses ADTypes.jl to specify whether to use automatic differentiation via ForwardDiff.jl or finite differencing via FiniteDiff.jl. Defaults to AutoForwardDiff() for automatic differentiation, which by default uses chunksize = 0, and thus uses the internal ForwardDiff.jl algorithm for the choice. To use FiniteDiff.jl, the AutoFiniteDiff() ADType can be used, which has a keyword argument fdtype with default value Val{:forward}(), and alternatives Val{:central}() and Val{:complex}().
  • concrete_jac: Specifies whether a Jacobian should be constructed. Defaults to nothing, which means it will be chosen true/false depending on circumstances of the solver, such as whether a Krylov subspace method is used for linsolve.
  • linsolve: Any LinearSolve.jl compatible linear solver. For example, to use KLU.jl, specify Velds4(linsolve = KLUFactorization()). When nothing is passed, uses DefaultLinearSolver.
  • precs: Any LinearSolve.jl-compatible preconditioner can be used as a left or right preconditioner. Preconditioners are specified by the Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata) function where the arguments are defined as:
    • W: the current Jacobian of the nonlinear system. Specified as either $I - \gamma J$ or $I/\gamma - J$ depending on the algorithm. This will commonly be a WOperator type defined by OrdinaryDiffEq.jl. It is a lazy representation of the operator. Users can construct the W-matrix on demand by calling convert(AbstractMatrix,W) to receive an AbstractMatrix matching the jac_prototype.
    • du: the current ODE derivative
    • u: the current ODE state
    • p: the ODE parameters
    • t: the current ODE time
    • newW: a Bool which specifies whether the W matrix has been updated since the last call to precs. It is recommended that this is checked to only update the preconditioner when newW == true.
    • Plprev: the previous Pl.
    • Prprev: the previous Pr.
    • solverdata: Optional extra data the solvers can give to the precs function. Solver-dependent and subject to change.
    The return is a tuple (Pl,Pr) of the LinearSolve.jl-compatible preconditioners. To specify one-sided preconditioning, simply return nothing for the preconditioner which is not used. Additionally, precs must supply the dispatch:
    Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
    which is used in the solver setup phase to construct the integrator type with the preconditioners (Pl,Pr). The default is precs=DEFAULT_PRECS where the default preconditioner function is defined as:
    DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • van Veldhuizen, D-stability and Kaps-Rentrop-methods, M. Computing (1984) 32: 229. doi:10.1007/BF02243574
source
OrdinaryDiffEqRosenbrock.GRK4TType
GRK4T(; - `standardtag`: Specifies whether to use package-specific tags instead of the
            ForwardDiff default function-specific tags. For more information, see
            [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
            Defaults to `Val{true}()`.
        - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
            to specify whether to use automatic differentiation via
            [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
            differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
            Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
            `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
            To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
            `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
        - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
            `nothing`, which means it will be chosen true/false depending on circumstances
            of the solver, such as whether a Krylov subspace method is used for `linsolve`.
        - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
          For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
          `GRK4T(linsolve = KLUFactorization()`).
           When `nothing` is passed, uses `DefaultLinearSolver`.
        - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
          can be used as a left or right preconditioner.
          Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
          function where the arguments are defined as:
            - `W`: the current Jacobian of the nonlinear system. Specified as either
                ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                representation of the operator. Users can construct the W-matrix on demand
                by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                the `jac_prototype`.
            - `du`: the current ODE derivative
            - `u`: the current ODE state
            - `p`: the ODE parameters
            - `t`: the current ODE time
            - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                the last call to `precs`. It is recommended that this is checked to only
                update the preconditioner when `newW == true`.
            - `Plprev`: the previous `Pl`.
            - `Prprev`: the previous `Pr`.
            - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                Solver-dependent and subject to change.
          The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
          To specify one-sided preconditioning, simply return `nothing` for the preconditioner
          which is not used. Additionally, `precs` must supply the dispatch:
          ```julia
          Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
          ```
          which is used in the solver setup phase to construct the integrator
          type with the preconditioners `(Pl,Pr)`.
          The default is `precs=DEFAULT_PRECS` where the default preconditioner function
          is defined as:
          ```julia
          DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
          ```
        step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. An efficient 4th order Rosenbrock method.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Kaps, P. & Rentrop, Generalized Runge-Kutta methods of order four with stepsize control for stiff ordinary differential equations. P. Numer. Math. (1979) 33: 55. doi:10.1007/BF01396495
source
OrdinaryDiffEqRosenbrock.GRK4AType
GRK4A(; - `standardtag`: Specifies whether to use package-specific tags instead of the
            ForwardDiff default function-specific tags. For more information, see
            [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
            Defaults to `Val{true}()`.
        - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
            to specify whether to use automatic differentiation via
            [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
            differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
            Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
            `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
            To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
            `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
        - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
            `nothing`, which means it will be chosen true/false depending on circumstances
            of the solver, such as whether a Krylov subspace method is used for `linsolve`.
        - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
          For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
          `GRK4A(linsolve = KLUFactorization()`).
           When `nothing` is passed, uses `DefaultLinearSolver`.
        - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
          can be used as a left or right preconditioner.
          Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
          function where the arguments are defined as:
            - `W`: the current Jacobian of the nonlinear system. Specified as either
                ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                representation of the operator. Users can construct the W-matrix on demand
                by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                the `jac_prototype`.
            - `du`: the current ODE derivative
            - `u`: the current ODE state
            - `p`: the ODE parameters
            - `t`: the current ODE time
            - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                the last call to `precs`. It is recommended that this is checked to only
                update the preconditioner when `newW == true`.
            - `Plprev`: the previous `Pl`.
            - `Prprev`: the previous `Pr`.
            - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                Solver-dependent and subject to change.
          The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
          To specify one-sided preconditioning, simply return `nothing` for the preconditioner
          which is not used. Additionally, `precs` must supply the dispatch:
          ```julia
          Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
          ```
          which is used in the solver setup phase to construct the integrator
          type with the preconditioners `(Pl,Pr)`.
          The default is `precs=DEFAULT_PRECS` where the default preconditioner function
          is defined as:
          ```julia
          DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
          ```
        step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. An A-stable 4th order Rosenbrock method. Essentially "anti-L-stable" but efficient.

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • Kaps, P. & Rentrop, Generalized Runge-Kutta methods of order four with stepsize control for stiff ordinary differential equations. P. Numer. Math. (1979) 33: 55. doi:10.1007/BF01396495
source
OrdinaryDiffEqRosenbrock.Ros4LStabType
Ros4LStab(; - `standardtag`: Specifies whether to use package-specific tags instead of the
                ForwardDiff default function-specific tags. For more information, see
                [this blog post](https://www.stochasticlifestyle.com/improved-forwarddiff-jl-stacktraces-with-package-tags/).
                Defaults to `Val{true}()`.
            - `autodiff`: Uses [ADTypes.jl](https://sciml.github.io/ADTypes.jl/stable/) 
                to specify whether to use automatic differentiation via
                [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) or finite
                differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl). 
                Defaults to `AutoForwardDiff()` for automatic differentiation, which by default uses
                `chunksize = 0`, and thus uses the internal ForwardDiff.jl algorithm for the choice.
                To use `FiniteDiff.jl`, the `AutoFiniteDiff()` ADType can be used, which has a keyword argument
                `fdtype` with default value `Val{:forward}()`, and alternatives `Val{:central}()` and `Val{:complex}()`.
            - `concrete_jac`: Specifies whether a Jacobian should be constructed. Defaults to
                `nothing`, which means it will be chosen true/false depending on circumstances
                of the solver, such as whether a Krylov subspace method is used for `linsolve`.
            - `linsolve`: Any [LinearSolve.jl](https://github.com/SciML/LinearSolve.jl) compatible linear solver.
              For example, to use [KLU.jl](https://github.com/JuliaSparse/KLU.jl), specify
              `Ros4LStab(linsolve = KLUFactorization()`).
               When `nothing` is passed, uses `DefaultLinearSolver`.
            - `precs`: Any [LinearSolve.jl-compatible preconditioner](https://docs.sciml.ai/LinearSolve/stable/basics/Preconditioners/)
              can be used as a left or right preconditioner.
              Preconditioners are specified by the `Pl,Pr = precs(W,du,u,p,t,newW,Plprev,Prprev,solverdata)`
              function where the arguments are defined as:
                - `W`: the current Jacobian of the nonlinear system. Specified as either
                    ``I - \gamma J`` or ``I/\gamma - J`` depending on the algorithm. This will
                    commonly be a `WOperator` type defined by OrdinaryDiffEq.jl. It is a lazy
                    representation of the operator. Users can construct the W-matrix on demand
                    by calling `convert(AbstractMatrix,W)` to receive an `AbstractMatrix` matching
                    the `jac_prototype`.
                - `du`: the current ODE derivative
                - `u`: the current ODE state
                - `p`: the ODE parameters
                - `t`: the current ODE time
                - `newW`: a `Bool` which specifies whether the `W` matrix has been updated since
                    the last call to `precs`. It is recommended that this is checked to only
                    update the preconditioner when `newW == true`.
                - `Plprev`: the previous `Pl`.
                - `Prprev`: the previous `Pr`.
                - `solverdata`: Optional extra data the solvers can give to the `precs` function.
                    Solver-dependent and subject to change.
              The return is a tuple `(Pl,Pr)` of the LinearSolve.jl-compatible preconditioners.
              To specify one-sided preconditioning, simply return `nothing` for the preconditioner
              which is not used. Additionally, `precs` must supply the dispatch:
              ```julia
              Pl, Pr = precs(W, du, u, p, t, ::Nothing, ::Nothing, ::Nothing, solverdata)
              ```
              which is used in the solver setup phase to construct the integrator
              type with the preconditioners `(Pl,Pr)`.
              The default is `precs=DEFAULT_PRECS` where the default preconditioner function
              is defined as:
              ```julia
              DEFAULT_PRECS(W, du, u, p, t, newW, Plprev, Prprev, solverdata) = nothing, nothing
              ```
            step_limiter! = OrdinaryDiffEq.trivial_limiter!)

Rosenbrock-Wanner Method. A 4th order A-stable stiffly stable Rosenbrock method with a stiff-aware 3rd order interpolant

Keyword Arguments

  • chunk_size: TBD
  • standardtag: TBD
  • autodiff: boolean to control if the Jacobian should be computed via AD or not
  • concrete_jac: function of the form jac!(J, u, p, t)
  • diff_type: TBD
  • linsolve: custom solver for the inner linear systems
  • precs: custom preconditioner for the inner linear solver
  • step_limiter!: function of the form limiter!(u, integrator, p, t)

References

  • E. Hairer, G. Wanner, Solving ordinary differential equations II, stiff and differential-algebraic problems. Computational mathematics (2nd revised ed.), Springer (1996)
source