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.CachePool — Type
CachePoolSimple 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!
DiffEqCallbacks.IndependentlyLinearizedSolutionChunks — Type
IndependentlyLinearizedSolutionChunksWhen 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.
DiffEqCallbacks.affect! — Function
affect!(integrator, f::AbstractDomainAffect)Apply domain callback f to integrator.
DiffEqCallbacks.allocate_vjp — Function
allocate_vjp(λ, x)
allocate_vjp(x)similar(λ, size(x)) for generic x. This is used to handle non-array parameters!
DiffEqCallbacks.allocate_zeros — Function
allocate_zeros(x)zero.(x) for generic x. This is used to handle non-array parameters!
DiffEqCallbacks.g_weights — Constant
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]
DiffEqCallbacks.gauss_points — Constant
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]
DiffEqCallbacks.gauss_weights — Constant
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]
DiffEqCallbacks.gk_points — Constant
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]
DiffEqCallbacks.gk_weights — Constant
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]
DiffEqCallbacks.isaccepted — Function
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.
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.
DiffEqCallbacks.recursive_add! — Function
recursive_add!(y, x)y .+= x for generic x and y. This is used to handle non-array parameters!
DiffEqCallbacks.recursive_adjoint — Function
recursive_adjoint(y)adjoint(y) for generic y. This is used to handle non-array parameters!
DiffEqCallbacks.recursive_copy — Function
recursive_copy(y)
copy(y) for generic y. This is used to handle non-array parameters!
DiffEqCallbacks.recursive_copyto! — Function
recursive_copyto!(y, x)y[:] .= vec(x) for generic x and y. This is used to handle non-array parameters!
DiffEqCallbacks.recursive_neg! — Function
neg!(x)x .*= -1 for generic x. This is used to handle non-array parameters!
DiffEqCallbacks.recursive_sub! — Function
recursive_sub!(y, x)y .-= x for generic x and y. This is used to handle non-array parameters!
DiffEqCallbacks.recursive_zero! — Function
zero!(x)x .= 0 for generic x. This is used to handle non-array parameters!
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.
DiffEqCallbacks.seek_forward — Function
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().
DiffEqCallbacks.setup — Function
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.
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)).