SciMLSolutions
Definition of the SciMLSolution Interface
All SciMLSolution
types are a subset of some AbstractArray
. Types with time series (like ODESolution
) are subtypes of RecursiveArrayTools.AbstractVectorOfArray
and RecursiveArrayTools.AbstractDiffEqArray
where appropriate. Types without a time series (like OptimizationSolution
) are directly subsets of AbstractArray
.
Array Interface
Instead of working on the Vector{uType}
directly, we can use the provided array interface.
sol[j]
to access the value at timestep j
(if the timeseries was saved), and
sol.t[j]
to access the value of t
at timestep j
. For multi-dimensional systems, this will address first by component and lastly by time, and thus
sol[i,j]
will be the i
th component at timestep j
. Hence, sol[j][i] == sol[i, j]
. This is done because Julia is column-major, so the leading dimension should be contiguous in memory. If the independent variables had shape (for example, was a matrix), then i
is the linear index. We can also access solutions with shape:
sol[i,k,j]
gives the [i,k]
component of the system at timestep j
. The colon operator is supported, meaning that
sol[i,:]
gives the timeseries for the i
th component.
Common Field Names
u
: the solution valuest
: the independent variable values, matching the length of the solution, if applicableresid
: the residual of the solution, if applicableoriginal
: the solution object from the original solver, if it's a wrapper algorithmretcode
: see the documentation section on return codesprob
: the problem that was solvedalg
: the algorithm used to solve the problem
Return Codes (RetCodes)
The solution types have a retcode
field which returns a symbol signifying the error state of the solution. The retcodes are as follows:
:Default
: The solver did not set retcodes.:Success
: The integration completed without erroring or the steady state solver fromSteadyStateDiffEq
found the steady state.:Terminated
: The integration is terminated withterminate!(integrator)
. Note that this may occur by usingTerminateSteadyState
from the callback libraryDiffEqCallbacks
.:MaxIters
: The integration exited early because it reached its maximum number of iterations.:DtLessThanMin
: The timestep method chose a stepsize which is smaller than the allowed minimum timestep, and exited early.:Unstable
: The solver detected that the solution was unstable and exited early.:InitialFailure
: The DAE solver could not find consistent initial conditions.:ConvergenceFailure
: The internal implicit solvers failed to converge.:Failure
: General uncategorized failures or errors.
Traits
SciMLSolution API
Abstract SciML Solutions
SciMLBase.SciMLSolution
— TypeUnion of all base solution types.
Uses a Union so that solution types can be <: AbstractArray
SciMLBase.AbstractNoTimeSolution
— Typeabstract type AbstractNoTimeSolution{T, N} <: AbstractArray{T, N}
SciMLBase.AbstractTimeseriesSolution
— Typeabstract type AbstractTimeseriesSolution{T, N, A} <: AbstractDiffEqArray{T, N, A}
SciMLBase.AbstractNoiseProcess
— Typeabstract type AbstractNoiseProcess{T, N, A, isinplace} <: AbstractDiffEqArray{T, N, A}
SciMLBase.AbstractEnsembleSolution
— Typeabstract type AbstractEnsembleSolution{T, N, A} <: AbstractVectorOfArray{T, N, A}
SciMLBase.AbstractLinearSolution
— Typeabstract type AbstractLinearSolution{T, N} <: SciMLBase.AbstractNoTimeSolution{T, N}
SciMLBase.AbstractNonlinearSolution
— Typeabstract type AbstractNonlinearSolution{T, N} <: SciMLBase.AbstractNoTimeSolution{T, N}
Missing docstring for SciMLBase.AbstractQuadratureSolution
. Check Documenter's build log for details.
SciMLBase.AbstractSteadyStateSolution
— Typeabstract type AbstractNonlinearSolution{T, N} <: SciMLBase.AbstractNoTimeSolution{T, N}
SciMLBase.AbstractAnalyticalSolution
— Typeabstract type AbstractAnalyticalSolution{T, N, S} <: SciMLBase.AbstractTimeseriesSolution{T, N, S}
SciMLBase.AbstractODESolution
— Typeabstract type AbstractODESolution{T, N, S} <: SciMLBase.AbstractTimeseriesSolution{T, N, S}
SciMLBase.AbstractDDESolution
— Typeabstract type AbstractDDESolution{T, N, S} <: SciMLBase.AbstractODESolution{T, N, S}
SciMLBase.AbstractRODESolution
— Typeabstract type AbstractRODESolution{T, N, S} <: SciMLBase.AbstractODESolution{T, N, S}
SciMLBase.AbstractDAESolution
— Typeabstract type AbstractDAESolution{T, N, S} <: SciMLBase.AbstractODESolution{T, N, S}