Internal Implementations

The bindings on this page are implementation details used by DiffEqCallbacks itself. They are not supported extension points or stable user-facing APIs. Do not build downstream packages on them; use the documented callback constructors instead.

DiffEqCallbacks.CachePoolType
CachePool

Simple memory-reusing cache that allows us to grow a cache and keep re-using those pieces of memory (in our case, typically u vectors) until the solve is finished. Note that this datastructure is not thread-safe!

source
DiffEqCallbacks.IndependentlyLinearizedSolutionChunksType
IndependentlyLinearizedSolutionChunks

When constructing an IndependentlyLinearizedSolution via the IndependentlyLinearizingCallback, we use this indermediate structure to reduce allocations and collect the unknown number of timesteps that the solve will generate.

source
DiffEqCallbacks.g_weightsConstant
g_weights::Vector{Vector{Float64}}

Precomputed respective Gaussian node weights up to degree 2*10-1 = 19. Computed using QuadGK.jl with the command [kronrod(i,-1,1)[3] for i in 1:10]

source
DiffEqCallbacks.gauss_pointsConstant
gauss_points::Vector{Vector{Float64}}

Precomputed Gaussian nodes up to degree 2*10-1 = 19. Computed using FastGaussQuadrature.jl with the command [gausslegendre(i)[1] for i in 1:10]

source
DiffEqCallbacks.gauss_weightsConstant
gauss_weights::Vector{Vector{Float64}}

Precomputed Gaussian node weights up to degree 2*10-1 = 19. Computed using FastGaussQuadrature.jl with the command [gausslegendre(i)[2] for i in 1:10]

source
DiffEqCallbacks.gk_pointsConstant
gk_points::Vector{Vector{Float64}}

Precomputed Gaussian-Kronrod nodes up to degree 3*10-1 = 29. Computed using QuadGK.jl with the command [kronrod(i,-1,1)[1] for i in 1:10]

source
DiffEqCallbacks.gk_weightsConstant
gk_weights::Vector{Vector{Float64}}

Precomputed Gaussian-Kronrod node weights up to degree 3*10-1 = 29. Computed using QuadGK.jl with the command [kronrod(i,-1,1)[2] for i in 1:10]

source
DiffEqCallbacks.isacceptedFunction
isaccepted(u, abstol, f::AbstractDomainAffect, args...)

Return whether u is an acceptable state vector at the next time point given absolute tolerance abstol, callback f, and other optional arguments.

source
DiffEqCallbacks.modify_u!Function
modify_u!(integrator, f::AbstractDomainAffect)

Modify current state vector u of integrator if required, and return whether it actually was modified.

source
DiffEqCallbacks.sample!Function
sample!(out::Matrix{S}, ils::IndependentlyLinearizedSolution, ts::Vector{T}, deriv_idx::Int = 0)

Batch-sample ils at the given timepoints for the given derivative level, storing into out.

source
DiffEqCallbacks.seek_forwardFunction
seek_forward(ils::IndependentlyLinearizedSolution, cursor::ILSStateCursor, t_target)

Seek the given cursor forward until it contains t_target. Does not seek backward, use seek() for the more general formulation, this form is optimized for the inner loop of iterate().

source
DiffEqCallbacks.setupFunction
setup(f::AbstractDomainAffect, integrator, ::Val{iip}) where {iip}

Setup callback f and return an arbitrary tuple whose elements are used as additional arguments in checking whether time step is accepted.

source
DiffEqCallbacks.store!Function
store!(ilsc::IndependentlyLinearizedSolutionChunks, t, us, u_mask)

Store a new us matrix (one row per derivative level) into our ilsc, but only the values identified by the given u_mask. The us matrix should be of the size (num_us(ilsc), num_derivatives(ilsc)).

source