- twopoint::Union{Val, Bool} = Val(false))</code></pre><p>Note that only the functions <code>f_i</code> themselves are required. These functions should be given as <code>f_i!(du,du,u,p,t)</code> or <code>ddu = f_i(du,u,p,t)</code>. See the section on <code>iip</code> for more details on in-place vs out-of-place handling.</p><p>All of the remaining functions are optional for improving or accelerating the usage of <code>f</code>. These include:</p><ul><li><code>cost(du, u, p)</code>: the target to be minimized, similar with the <code>cost</code> function in <code>OptimizationFunction</code>. This is used to define the objective function of the BVP, which can be minimized by optimization solvers.</li><li><code>equality(res, du, u, t)</code>: equality constraints functions for the BVP.</li><li><code>inequality(res, du, u, t)</code>: inequality constraints functions for the BVP.</li><li><code>f_prototype</code>: a prototype matrix matching the type of the ODE/DAE variables in an optimal control problem. For example, in the ODE/DAE that describe the dynamics of the optiml control problem, <code>f_prototype</code> should match the type and size of the ODE/DAE variables in <code>f</code>.</li><li><code>mass_matrix</code>: the mass matrix <code>M_i</code> represented in the ODE function. Can be used to determine that the equation is actually a differential-algebraic equation (DAE) if <code>M</code> is singular. Note that in this case special solvers are required, see the DAE solver page for more details: <a href="https://docs.sciml.ai/DiffEqDocs/stable/solvers/dae_solve/">https://docs.sciml.ai/DiffEqDocs/stable/solvers/dae_solve/</a>. Must be an AbstractArray or an AbstractSciMLOperator. Should be given as a tuple of mass matrices, i.e. <code>(M_1, M_2)</code> for the mass matrices of equations 1 and 2 respectively.</li><li><code>analytic(u0,p,t)</code>: used to pass an analytical solution function for the analytical solution of the ODE. Generally only used for testing and development of the solvers.</li><li><code>tgrad(dT,du,u,p,t)</code> or <code>dT=tgrad(du,u,p,t)</code>: returns <span>$\frac{∂f(du,u,p,t)}{∂t}$</span></li><li><code>jac(J,du,u,p,t)</code> or <code>J=jac(du,u,p,t)</code>: returns <span>$\frac{df}{du}$</span></li><li><code>jvp(Jv,v,u,p,t)</code> or <code>Jv=jvp(v,u,p,t)</code>: returns the directional derivative <span>$\frac{df}{du} v$</span></li><li><code>vjp(Jv,v,u,p,t)</code> or <code>Jv=vjp(v,u,p,t)</code>: returns the adjoint derivative <span>$\frac{df}{du}^∗ v$</span></li><li><code>jac_prototype</code>: a prototype matrix matching the type that matches the Jacobian. For example, if the Jacobian is tridiagonal, then an appropriately sized <code>Tridiagonal</code> matrix can be used as the prototype and integrators will specialize on this structure where possible. Non-structured sparsity patterns should use a <code>SparseMatrixCSC</code> with a correct sparsity pattern for the Jacobian. The default is <code>nothing</code>, which means a dense Jacobian.</li><li><code>paramjac(pJ,du,u,p,t)</code>: returns the parameter Jacobian <span>$\frac{df}{dp}$</span>.</li><li><code>colorvec</code>: a color vector according to the SparseDiffTools.jl definition for the sparsity pattern of the <code>jac_prototype</code>. This specializes the Jacobian construction when using finite differences and automatic differentiation to be computed in an accelerated manner based on the sparsity pattern. Defaults to <code>nothing</code>, which means a color vector will be internally computed on demand when required. The cost of this operation is highly dependent on the sparsity pattern.</li></ul><p><strong>iip: In-Place vs Out-Of-Place</strong></p><p>For more details on this argument, see the ODEFunction documentation.</p><p><strong>specialize: Controlling Compilation and Specialization</strong></p><p>For more details on this argument, see the ODEFunction documentation.</p><p><strong>Fields</strong></p><p>The fields of the DynamicalBVPFunction type directly match the names of the inputs.</p></div><a class="docs-sourcelink" target="_blank" href="https://github.com/SciML/SciMLBase.jl/blob/v2.135.0/src/scimlfunctions.jl#L2385">source</a></section></details></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../bvp_problem/">« Boundary Value Problems</a><a class="docs-footer-nextpage" href="../solve/">Common Solver Options (Solve Keyword Arguments) »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.16.1 on <span class="colophon-date" title="Tuesday 27 January 2026 01:54">Tuesday 27 January 2026</span>. Using Julia version 1.10.10.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0 commit comments