SciMLAlgorithms
Definition of the SciMLAlgorithm Interface
SciMLAlgorithms
are defined as types which have dispatches to the function signature:
CommonSolve.solve(prob::SciMLProblem,alg::SciMLAlgorithm;kwargs...)
Algorithm-Specific Arguments
Note that because the keyword arguments of solve
are designed to be common across the whole problem type, algorithms should have the algorithm-specific keyword arguments defined as part of the algorithm constructor. For example, Rodas5
has a choice of autodiff::Bool
which is not common across all ODE solvers, and thus autodiff
is a algorithm-specific keyword argument handled via Rodas5(autodiff=true)
.
Remake
Note that remake
is applicable to SciMLAlgorithm
types, but this is not used in the public API. It's used for solvers to swap out components like ForwardDiff chunk sizes.
Common Algorithm Keyword Arguments
Commonly used algorithm keyword arguments are:
Traits
SciMLBase.isautodifferentiable
— Functionisautodifferentiable(alg::DEAlgorithm)
Trait declaration for whether an algorithm is compatible with direct automatic differentiation, i.e. can have algorithms like ForwardDiff or ReverseDiff attempt to differentiate directly through the solver.
Defaults to false as only pure-Julia algorithms can have this be true.
SciMLBase.allows_arbitrary_number_types
— Functionallowsarbitrarynumber_types(alg::DEAlgorithm)
Trait declaration for whether an algorithm is compatible with direct automatic differentiation, i.e. can have algorithms like ForwardDiff or ReverseDiff attempt to differentiate directly through the solver.
Defaults to false as only pure-Julia algorithms can have this be true.
SciMLBase.allowscomplex
— Functionallowscomplex(alg::DEAlgorithm)
Trait declaration for whether an algorithm is compatible with having complex numbers as the state variables.
Defaults to false.
SciMLBase.isadaptive
— Functionisadaptive(alg::DEAlgorithm)
Trait declaration for whether an algorithm uses adaptivity, i.e. has a non-quasi-static compute graph.
Defaults to true.
is_integrator_adaptive(i::DEIntegrator)
Checks if the integrator is adaptive
SciMLBase.isdiscrete
— Functionisdiscrete(alg::DEAlgorithm)
Trait declaration for whether an algorithm allows for discrete state values, such as integers.
Defaults to false.
Abstract SciML Algorithms
SciMLBase.SciMLAlgorithm
— Typeabstract type SciMLAlgorithm
SciMLBase.DEAlgorithm
— Typeabstract type DEAlgorithm <: SciMLBase.SciMLAlgorithm
SciMLBase.AbstractLinearAlgorithm
— Typeabstract type AbstractLinearAlgorithm <: SciMLBase.SciMLAlgorithm
SciMLBase.AbstractNonlinearAlgorithm
— Typeabstract type AbstractNonlinearAlgorithm <: SciMLBase.SciMLAlgorithm
SciMLBase.AbstractQuadratureAlgorithm
— Typeabstract type AbstractIntegralAlgorithm <: SciMLBase.SciMLAlgorithm
SciMLBase.AbstractOptimizationAlgorithm
— Typeabstract type AbstractOptimizationAlgorithm <: SciMLBase.DEAlgorithm
SciMLBase.AbstractSteadyStateAlgorithm
— Typeabstract type AbstractSteadyStateAlgorithm <: SciMLBase.DEAlgorithm
SciMLBase.AbstractODEAlgorithm
— Typeabstract type AbstractODEAlgorithm <: SciMLBase.DEAlgorithm
SciMLBase.AbstractSecondOrderODEAlgorithm
— Typeabstract type AbstractSecondOrderODEAlgorithm <: SciMLBase.DEAlgorithm
SciMLBase.AbstractRODEAlgorithm
— Typeabstract type AbstractRODEAlgorithm <: SciMLBase.DEAlgorithm
SciMLBase.AbstractSDEAlgorithm
— Typeabstract type AbstractSDEAlgorithm <: SciMLBase.DEAlgorithm
SciMLBase.AbstractDAEAlgorithm
— Typeabstract type AbstractDAEAlgorithm <: SciMLBase.DEAlgorithm
SciMLBase.AbstractDDEAlgorithm
— Typeabstract type AbstractDDEAlgorithm <: SciMLBase.DEAlgorithm
SciMLBase.AbstractSDDEAlgorithm
— Typeabstract type AbstractSDDEAlgorithm <: SciMLBase.DEAlgorithm