Custom SciML Operators
Abstract Operators
NonlinearSolve.AbstractNonlinearSolveOperator
— TypeAbstractNonlinearSolveOperator <: SciMLBase.AbstractSciMLOperator
NonlinearSolve.jl houses a few custom operators. These will eventually be moved out but till then this serves as the abstract type for them.
Jacobian Operators
NonlinearSolve.JacobianOperator
— TypeJacobianOperator{vjp, iip, T} <: AbstractNonlinearSolveOperator{T}
A Jacobian Operator Provides both JVP and VJP without materializing either (if possible).
This is an internal operator, and is not guaranteed to have a stable API. It might even be moved out of NonlinearSolve.jl in the future, without a deprecation cycle. Usage of this outside NonlinearSolve.jl (by everyone except Avik) is strictly prohibited.
T
denotes if the Jacobian is transposed or not. T = true
means that the Jacobian is transposed, and T = false
means that the Jacobian is not transposed.
Constructor
JacobianOperator(prob::AbstractNonlinearProblem, fu, u; jvp_autodiff = nothing,
vjp_autodiff = nothing, skip_vjp::Val{NoVJP} = False,
skip_jvp::Val{NoJVP} = False) where {NoVJP, NoJVP}
See also NonlinearSolve.VecJacOperator
and NonlinearSolve.JacVecOperator
.
NonlinearSolve.VecJacOperator
— FunctionVecJacOperator(args...; autodiff = nothing, kwargs...)
Constructs a JacobianOperator
which only provides the VJP using the vjp_autodiff = autodiff
.
This is very similar to SparseDiffTools.VecJac
but is geared towards NonlinearProblem
s. For arguments and keyword arguments see JacobianOperator
.
NonlinearSolve.JacVecOperator
— FunctionJacVecOperator(args...; autodiff = nothing, kwargs...)
Constructs a JacobianOperator
which only provides the JVP using the jvp_autodiff = autodiff
.
This is very similar to SparseDiffTools.JacVec
but is geared towards NonlinearProblem
s. For arguments and keyword arguments see JacobianOperator
.
Stateful Jacobian Operators
NonlinearSolve.StatefulJacobianOperator
— TypeStatefulJacobianOperator(jac_op::JacobianOperator, u, p)
Wrapper over a JacobianOperator
which stores the input u
and p
and defines mul!
and *
for computing VJPs and JVPs.
NonlinearSolve.StatefulJacobianNormalFormOperator
— TypeStatefulJacobianNormalFormOperator(vjp_operator, jvp_operator, cache)
This constructs a Normal Form Jacobian Operator, i.e. it constructs the operator corresponding to JᵀJ
where J
is the Jacobian Operator. This is not meant to be directly constructed, rather it is constructed with *
on two StatefulJacobianOperator
s.
Low-Rank Jacobian Operators
NonlinearSolve.BroydenLowRankJacobian
— TypeBroydenLowRankJacobian{T}(U, Vᵀ, idx, cache, alpha)
Low Rank Approximation of the Jacobian Matrix. Currently only used for LimitedMemoryBroyden
. This computes the Jacobian as $U \times V^T$.