Alias Specifier Interface

An AbstractAliasSpecifier is associated with each SciML problem type that allows solver caches to reuse problem inputs. Alias specifiers hold Union{Bool, Nothing} fields named after the input they control. For example, to tell an ODE solver that it may keep a reference to the initial state, pass solve(prob, alias = ODEAliasSpecifier(alias_u0 = true)).

The common rules are:

  • true permits aliasing the corresponding input;
  • false requests that the solver avoid aliasing the corresponding input;
  • nothing delegates the choice to the solver and algorithm default; and
  • alias = true or alias = false in a specifier constructor applies the same policy to every stored field of that concrete specifier.

Alias specifiers are ownership hints rather than solver guarantees. Solvers may still copy inputs when the algorithm requires a different memory layout or when copying is required for correctness.

SciMLBase.AbstractAliasSpecifierType
abstract type AbstractAliasSpecifier

Base interface for solver aliasing policies.

Alias specifiers are passed through the common alias keyword to tell a solver whether it may keep references to problem inputs instead of copying them into solver-owned storage. Concrete specifiers use Union{Bool, Nothing} fields: true permits aliasing, false requests non-aliasing behavior, and nothing delegates that decision to the solver's default. Constructors that accept alias = true or alias = false apply that value to every aliasable field of the concrete specifier.

Aliasing is a performance and ownership hint. A solver may still copy data when the selected algorithm requires an internal layout or when preserving correctness requires solver-owned storage.

Interface

Concrete subtypes should store one field per aliasable input, named with the alias_ prefix and typed as Union{Bool, Nothing}. Problem constructors and solver caches should treat nothing as "use the algorithm default" rather than as either permission or prohibition. New problem families should document which inputs each field controls and should provide an alias convenience keyword when every stored field can share the same policy.

source
SciMLBase.LinearAliasSpecifierType
LinearAliasSpecifier(; alias_A = nothing, alias_b = nothing, alias = nothing)

Control which LinearProblem inputs a solver may alias.

alias_A controls whether the linear operator or matrix A may be stored by reference, and alias_b controls whether the right-hand side b may be stored by reference. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to both fields.

Keywords

  • alias_A::Union{Bool, Nothing}: alias the A array.
  • alias_b::Union{Bool, Nothing}: alias the b array.
  • alias::Union{Bool, Nothing}: set every field of the LinearAliasSpecifier.
source
SciMLBase.NonlinearAliasSpecifierType
NonlinearAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing, alias = nothing
)

Control which NonlinearProblem inputs a solver may alias.

alias_u0 controls whether the initial guess may be stored by reference, alias_p controls the parameter object, and alias_f controls the nonlinear function wrapper. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all fields.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the nonlinear function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias::Union{Bool, Nothing}: set every field of the NonlinearAliasSpecifier.
source
SciMLBase.ODEAliasSpecifierType
ODEAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing,
    alias_du0 = nothing, alias_tstops = nothing, alias = nothing
)

Control which ODE problem inputs and solver option arrays may be aliased.

alias_u0 controls the initial state, alias_du0 controls an initial derivative array when the problem representation has one, alias_p controls the parameter object, alias_f controls the function object, and alias_tstops controls the tstops vector passed to the solver. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all fields.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the ODE function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias_du0::Union{Bool, Nothing}: alias the du0 array, when present.
  • alias_tstops::Union{Bool, Nothing}: alias the tstops array.
  • alias::Union{Bool, Nothing}: set every field of the ODEAliasSpecifier.
source
SciMLBase.RODEAliasSpecifierType
RODEAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing,
    alias_du0 = nothing, alias_tstops = nothing, alias_noise = nothing,
    alias_jumps = nothing, alias = nothing
)

Control which RODEProblem inputs, noise data, and solver option arrays may be aliased.

alias_noise controls the noise process or noise prototype data, and alias_jumps controls jump process data when the problem is wrapped in a jump problem. Other fields follow the differential-equation alias convention. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all fields.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the RODE function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias_du0::Union{Bool, Nothing}: alias the du0 array, when present.
  • alias_tstops::Union{Bool, Nothing}: alias the tstops array.
  • alias_noise::Union{Bool, Nothing}: alias the noise process.
  • alias_jumps::Union{Bool, Nothing}: alias jump process data.
  • alias::Union{Bool, Nothing}: set every field of the RODEAliasSpecifier.
source
SciMLBase.SDEAliasSpecifierType
SDEAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing,
    alias_tstops = nothing, alias_jumps = nothing, alias = nothing
)

Control which SDEProblem inputs and solver option arrays may be aliased.

alias_u0 controls the initial state, alias_p controls the parameter object, alias_f controls the SDE function object, alias_tstops controls the tstops vector, and alias_jumps controls jump process data when the problem is wrapped in a jump problem. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all stored fields.

The constructor also accepts alias_du0 for compatibility with related differential-equation alias constructors; SDEAliasSpecifier does not store a separate du0 alias field.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the SDE function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias_tstops::Union{Bool, Nothing}: alias the tstops array.
  • alias_jumps::Union{Bool, Nothing}: alias jump process data.
  • alias::Union{Bool, Nothing}: set every stored field of the SDEAliasSpecifier.
source
SciMLBase.DAEAliasSpecifierType
DAEAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing,
    alias_du0 = nothing, alias_tstops = nothing, alias = nothing
)

Control which DAEProblem inputs and solver option arrays may be aliased.

alias_u0 controls the initial state, alias_du0 controls the initial derivative array, alias_p controls the parameter object, alias_f controls the DAE function object, and alias_tstops controls the tstops vector. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all fields.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the DAE function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias_du0::Union{Bool, Nothing}: alias the du0 array.
  • alias_tstops::Union{Bool, Nothing}: alias the tstops array.
  • alias::Union{Bool, Nothing}: set every field of the DAEAliasSpecifier.
source
SciMLBase.DDEAliasSpecifierType
DDEAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing,
    alias_du0 = nothing, alias_tstops = nothing, alias = nothing
)

Control which DDEProblem inputs and solver option arrays may be aliased.

alias_u0 controls the initial state, alias_p controls the parameter object, alias_f controls the DDE function object, and alias_tstops controls the tstops vector. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all stored fields.

The constructor also accepts alias_du0 for compatibility with related differential-equation alias constructors; DDEAliasSpecifier does not store a separate du0 alias field.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the DDE function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias_tstops::Union{Bool, Nothing}: alias the tstops array.
  • alias::Union{Bool, Nothing}: set every stored field of the DDEAliasSpecifier.
source
SciMLBase.SDDEAliasSpecifierType
SDDEAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing, alias_du0 = nothing,
    alias_tstops = nothing, alias_jumps = nothing, alias = nothing
)

Control which SDDEProblem inputs and solver option arrays may be aliased.

alias_u0 controls the initial state, alias_p controls the parameter object, alias_f controls the SDDE function object, alias_tstops controls the tstops vector, and alias_jumps controls jump process data when the problem is wrapped in a jump problem. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all stored fields.

The constructor also accepts alias_du0 for compatibility with related differential-equation alias constructors; SDDEAliasSpecifier does not store a separate du0 alias field.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the SDDE function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias_tstops::Union{Bool, Nothing}: alias the tstops array.
  • alias_jumps::Union{Bool, Nothing}: alias jump process data.
  • alias::Union{Bool, Nothing}: set every stored field of the SDDEAliasSpecifier.
source
SciMLBase.BVPAliasSpecifierType
BVPAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing,
    alias_du0 = nothing, alias_tstops = nothing, alias = nothing
)

Control which BVP problem inputs and solver option arrays may be aliased.

alias_u0 controls the initial mesh/state guess, alias_du0 controls an initial derivative guess when the problem representation has one, alias_p controls the parameter object, alias_f controls the BVP function object, and alias_tstops controls the tstops vector. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all fields.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the BVP function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias_du0::Union{Bool, Nothing}: alias the du0 array, when present.
  • alias_tstops::Union{Bool, Nothing}: alias the tstops array.
  • alias::Union{Bool, Nothing}: set every field of the BVPAliasSpecifier.
source
SciMLBase.OptimizationAliasSpecifierType
OptimizationAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing, alias = nothing
)

Control which OptimizationProblem inputs a solver may alias.

alias_u0 controls the initial optimizer state, alias_p controls the parameter or data object, and alias_f controls the optimization function object. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all fields.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the optimization function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias::Union{Bool, Nothing}: set every field of the OptimizationAliasSpecifier.
source
SciMLBase.IntegralAliasSpecifierType
IntegralAliasSpecifier(alias_p = nothing, alias_f = nothing, alias = nothing)

Control which IntegralProblem inputs a solver may alias.

alias_p controls the parameter object and alias_f controls the integrand function object. A value of nothing delegates to the solver default. Pass the third alias argument as true or false to apply the same policy to both fields.

Arguments

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the integrand function object.
  • alias::Union{Bool, Nothing}: set every field of the IntegralAliasSpecifier.
source
SciMLBase.DiscreteAliasSpecifierType
DiscreteAliasSpecifier(; alias_p = nothing, alias_f = nothing, alias_u0 = nothing, alias = nothing)

Control which DiscreteProblem inputs a solver may alias.

alias_u0 controls the initial state, alias_p controls the parameter object, and alias_f controls the recurrence function object. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all stored fields.

The constructor also accepts alias_du0 for compatibility with related differential-equation alias constructors; DiscreteAliasSpecifier does not store a separate du0 alias field.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the discrete function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias::Union{Bool, Nothing}: set every stored field of the DiscreteAliasSpecifier.
source
SciMLBase.ImplicitDiscreteAliasSpecifierType
ImplicitDiscreteAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing, alias = nothing
)

Control which ImplicitDiscreteProblem inputs a solver may alias.

alias_u0 controls the initial state, alias_p controls the parameter object, and alias_f controls the implicit discrete function object. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all stored fields.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the implicit discrete function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias::Union{Bool, Nothing}: set every stored field of the ImplicitDiscreteAliasSpecifier.
source
SciMLBase.AnalyticalAliasSpecifierType
AnalyticalAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing, alias_du0 = nothing,
    alias_tstops = nothing, alias = nothing
)

Control which AnalyticalProblem inputs and solver option arrays may be aliased.

alias_u0 controls the initial state, alias_du0 controls an initial derivative array when present, alias_p controls the parameter object, alias_f controls the analytical function object, and alias_tstops controls the tstops vector. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all fields.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the analytical function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias_du0::Union{Bool, Nothing}: alias the du0 array, when present.
  • alias_tstops::Union{Bool, Nothing}: alias the tstops array.
  • alias::Union{Bool, Nothing}: set every field of the AnalyticalAliasSpecifier.
source
SciMLBase.SteadyStateAliasSpecifierType
SteadyStateAliasSpecifier(;
    alias_p = nothing, alias_f = nothing, alias_u0 = nothing,
    alias_du0 = nothing, alias_tstops = nothing, alias = nothing
)

Control which SteadyStateProblem inputs and solver option arrays may be aliased.

alias_u0 controls the initial state, alias_du0 controls an initial derivative array when present, alias_p controls the parameter object, alias_f controls the steady-state function object, and alias_tstops controls the tstops vector used by ODE-derived steady-state workflows. A value of nothing delegates to the solver default. Set alias = true or alias = false to apply the same policy to all fields.

Keywords

  • alias_p::Union{Bool, Nothing}: alias the parameter object.
  • alias_f::Union{Bool, Nothing}: alias the steady-state function object.
  • alias_u0::Union{Bool, Nothing}: alias the u0 array.
  • alias_du0::Union{Bool, Nothing}: alias the du0 array, when present.
  • alias_tstops::Union{Bool, Nothing}: alias the tstops array.
  • alias::Union{Bool, Nothing}: set every field of the SteadyStateAliasSpecifier.
source