Internal Implementation Reference

Private implementation details

The bindings on this page are not public API. They are rendered so that every intentional SciMLBase docstring is checked by Documenter, not to establish an extension contract. Downstream packages must use the public interfaces documented on the other interface pages.

Problem Representation

SciMLBase.AbstractSplitSDEProblemType
abstract type AbstractSplitSDEProblem

Marker supertype for split SDE constructor tags.

Concrete subtypes represent SDEs whose drift is supplied in split form, for example a linear or stiff part plus a nonlinear part. Constructors use these tags to route through the standard SDEProblem storage with a SplitSDEFunction; solvers should generally inspect the function object rather than dispatching on this abstract marker.

source
SciMLBase.AbstractDynamicalSDEProblemType
abstract type AbstractDynamicalSDEProblem

Marker supertype for dynamical SDE constructor tags.

Dynamical SDE constructors preserve the partitioned (v, u) structure at construction time and then store the problem as an SDEProblem with an ArrayPartition state and DynamicalSDEFunction.

source
SciMLBase.StandardSDEProblemType
struct StandardSDEProblem

Legacy marker for the standard SDE problem representation.

The standard SDE layout is represented by SDEProblem itself: drift function, diffusion function, initial state, time span, parameters, noise metadata, and solver keywords. Current SDE constructors do not store a separate problem_type field for this marker, so solver implementations should dispatch on AbstractSDEProblem and the problem's function type instead of depending on StandardSDEProblem.

source
SciMLBase.AbstractIncrementingODEProblemType
abstract type AbstractIncrementingODEProblem

Internal supertype for incrementing ODE constructor tags. Concrete tags record the in-place convention while IncrementingODEProblem converts the input into an ODEProblem with an IncrementingODEFunction.

These tags are available from problem_type on the resulting problem; they are not standalone problem containers. Solvers that require incrementing evaluation may dispatch on the tag or the wrapped function, but ordinary ODE tooling should use the returned ODEProblem interface.

source
SciMLBase.DEElementType
abstract type DEElement

Marker supertype for auxiliary differential equation elements that are stored inside higher-level problem definitions rather than solved directly.

source
SciMLBase.DESensitivityType
abstract type DESensitivity

Marker supertype for sensitivity-problem metadata associated with differential equation definitions.

source
SciMLBase.AbstractWrappedFunctionType
abstract type AbstractWrappedFunction{iip}

Base interface for internal one-variable views of SciML model functions.

Wrapped functions close over all but one argument of a model function so automatic differentiation or finite-difference code can differentiate with respect to time, state, or parameters. The iip type parameter preserves the in-place convention of the wrapped function and is returned by isinplace.

source
SciMLBase.AbstractReactionNetworkType
abstract type AbstractReactionNetwork

Compatibility hook for symbolic reaction-network containers.

SciMLBase does not implement reaction-network modeling directly. This abstract type lets downstream packages identify reaction-network-like systems while still using SciMLBase problem and function wrappers without requiring SciMLBase to depend on a reaction-network package.

source

Construction And Remake

SciMLBase._get_new_A_bFunction
_get_new_A_b(f, p, A, b; kw...) -> Tuple{Any, Any}

A helper function to call get_new_A_b if f isa SymbolicLinearInterface.

source
SciMLBase.UpdateABWrapperType
struct UpdateABWrapper{A, B} <: Function

Simple wrapper struct for deprecated update_A!, update_b! API of SymbolicLinearInterface.

source
SciMLBase._similar_namedtuple_merge_ignore_nothingFunction
_similar_namedtuple_merge_ignore_nothing(
    a::NamedTuple,
    b::NamedTuple
) -> NamedTuple

A utility function which merges two NamedTuples a and b, assuming that the keys of a are a subset of those of b. Values in b take priority over those in a, except if they are nothing. Keys not present in a are assumed to have a value of nothing.

source
SciMLBase._has_type_erased_paramsFunction
_has_type_erased_params(::Type{T}) -> Bool where {T <: AbstractSciMLFunction}

Check if the type T of an AbstractSciMLFunction has any type-erased (abstract) type parameters beyond iip and specialize. Returns true if any field type parameter (index 3 and beyond) is not a concrete type (isconcretetype returns false), indicating that type erasure was applied (e.g. by promote_f for AutoSpecialize compilation caching).

source
SciMLBase._reconstruct_as_typeFunction
_reconstruct_as_type(::Type{TargetType}, source::SourceType) -> TargetType

where TargetType <: AbstractSciMLFunction and SourceType <: AbstractSciMLFunction.

Reconstruct source preserving the non-concrete (erased) type parameters from TargetType while using source's actual concrete types for all other parameters.

Used to preserve type erasure from promote_f/unwrapped_f for AutoSpecialize: the keyword constructor in remake narrows abstract type parameters back to concrete types, and this function restores the erased type parameters (e.g. Union{Nothing, OverrideInitData} for initialization_data) while allowing concrete field types (like the function f) to change freely.

source
SciMLBase.warn_paramtypeFunction
warn_paramtype(p, warn_performance = PERFORMANCE_WARNINGS)

Inspect the type of p and emit a warning if it could hurt performance when used to hold problem parameters.

The warning can be turned off by setting warn_performance to false. To turn it off globally within the active project you can execute the following code, or put it in your startup.jl.

using Preferences, UUIDs
set_preferences!(
    UUID("1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"), "PerformanceWarnings" => false
)
source

Initialization

SciMLBase.evaluate_fFunction

Utility function to evaluate the RHS, adding extra arguments (such as history function for DDEs) wherever necessary.

source
SciMLBase._evaluate_fFunction

Utility function to evaluate the RHS, using the integrator's tmp_cache if it is in-place or simply calling the function if not.

source
SciMLBase._vecFunction
_vec(v) -> Number

A utility function equivalent to Base.vec but also handles Number and AbstractSciMLScalarOperator.

source

Interpolation

SciMLBase.tspan_indicesFunction
tspan_indices(t, tspan) -> Tuple{Int64, Int64}

Return the first and last index of the sorted time vector t whose times lie within tspan. tspan and t may run in either time direction. The returned range is empty if no time point lies within tspan.

source
SciMLBase.interpolationFunction
interpolation(tval, id, idxs, deriv, p)
interpolation(tval, id, idxs, deriv, p, continuity)

Get the value at tval where the solution is known at the times t (sorted), with values u and derivatives ks

source
SciMLBase.interpolation!Function
interpolation!(vals, tvals, id, idxs, deriv, p)
interpolation!(vals, tvals, id, idxs, deriv, p, continuity)

Get the value at tvals where the solution is known at the times t (sorted), with values u and derivatives ks

source
interpolation!(out, tval, id, idxs, deriv, p)
interpolation!(out, tval, id, idxs, deriv, p, continuity)

Get the value at tval where the solution is known at the times t (sorted), with values u and derivatives ks

source
SciMLBase.is_independent_variable_indexFunction
is_independent_variable_index(
    integrator::SciMLBase.DEIntegrator,
    idx
) -> Any

Return whether idx refers to the independent variable of integrator rather than to one of its states. Plot specifications use 0 for the independent variable, and symbolic systems additionally allow naming it.

source

Symbolic Save Selection

SciMLBase.translate_symbolic_save_idxsFunction
translate_symbolic_save_idxs(indp, save_idxs) -> Any

Translate symbolic save_idxs into integer state indexes, preserving the requested order and scalarizing symbolic arrays. Non-symbolic save_idxs (an integer, Colon, etc.) are returned unchanged. A single symbolic entry that resolves to one state is returned as a scalar so it is saved as a scalar timeseries rather than a single-element array.

source
SciMLBase._invalid_save_idxs_symbol_errorFunction
_invalid_save_idxs_symbol_error(indp, var; allow_timeseries_params = true)

Build the ArgumentError for a symbolic entry that cannot be used in save_idxs. Observed quantities get a dedicated message (DifferentialEquations.jl#1036); other non-state / non-timeseries-parameter symbols keep a generic rejection.

source

Diagnostics And Maintenance

SciMLBase.strip_solutionFunction
strip_solution(sol)

Strips a SciMLSolution object and its interpolation of their functions to better accommodate serialization.

source
SciMLBase.controller_kwargsConstant
controller_kwargs

Step size controller keyword arguments that were moved onto the controller objects (PIController, PIDController, IController, PredictiveController). They are no longer accepted by solve/init; passing one produces a CommonKwargError carrying CONTROLLER_KWARG_MESSAGE rather than the generic unrecognized-keyword text.

source
SciMLBase._has_sciml_in_stacktraceFunction
_has_sciml_in_stacktrace()

Check whether any frame in the current exception's stacktrace originates from SciMLBase (e.g. from SciMLFunction wrappers in scimlfunctions.jl). This is used to avoid showing SciML-specific error hints when the error occurs outside of a SciML solver context.

source