Internal Abstract Types
Solvers
BoundaryValueDiffEqCore.AbstractBoundaryValueDiffEqAlgorithm — Type
AbstractBoundaryValueDiffEqAlgorithmAbstract type for all boundary value problem algorithms.
Core Internal Interfaces
BoundaryValueDiffEqCore.AbstractBoundaryValueDiffEqCache — Type
AbstractBoundaryValueDiffEqCacheAbstract Type for all BoundaryValueDiffEqCore Caches.
Interface Functions
SciMLBase.isinplace(cache): whether or not the solver is inplace.Base.eltype(cache): get the element type of the cache.
BoundaryValueDiffEqCore.AbstractErrorControl — Type
AbstractErrorControlAbstract type for different error control methods.
BoundaryValueDiffEqCore.DiffCacheNeeded — Type
DiffCacheNeededTrait value indicating that a Jacobian backend needs a DiffCache.
BoundaryValueDiffEqCore.EvalSol — Type
EvalSol(u, t, cache)Internal interpolatable solution wrapper used while forming collocation residuals and optimization objectives.
BoundaryValueDiffEqCore.NoDiffCacheNeeded — Type
NoDiffCacheNeededTrait value indicating that a Jacobian backend does not need a DiffCache.
BoundaryValueDiffEqCore.__FastShortcutNonlinearPolyalg — Function
__FastShortcutNonlinearPolyalg(T = Float64; concrete_jac = nothing, linsolve = nothing,
autodiff = nothing)Build the default nonlinear solver polyalgorithm used when a BVP algorithm does not supply an explicit nonlinear solver.
BoundaryValueDiffEqCore.__Fix3 — Type
__Fix3(f, x)Callable helper that fixes the third argument of a three-argument function.
BoundaryValueDiffEqCore.__add_singular_term! — Function
__add_singular_term!(K, singular_term, y, t)Helper function to add the singular term contribution S * y / t to K for t > 0. Used in collocation residual computation for singular BVPs of the form y' = S*y/t + f(t,y).
BoundaryValueDiffEqCore.__any_sparse_ad — Function
__any_sparse_ad(ad_or_jac_alg) -> BoolReturn whether an AD backend or BVPJacobianAlgorithm contains an AutoSparse backend.
BoundaryValueDiffEqCore.__build_cost — Function
__build_cost(fun, cache, mesh, M; tune_parameters = false, p = nothing)Build the objective function used by optimization-based BVP solves from a user supplied cost functional.
BoundaryValueDiffEqCore.__build_solution — Function
__build_solution(prob, odesol, nonlinear_or_optimization_solution)Combine the interpolating ODE-style solution with the internal nonlinear or optimization solver result and propagate the appropriate retcode.
BoundaryValueDiffEqCore.__cache_trait — Function
__cache_trait(ad_or_jac_alg)Return DiffCacheNeeded() or NoDiffCacheNeeded() for an AD backend or BVPJacobianAlgorithm.
BoundaryValueDiffEqCore.__concrete_kwargs — Function
__concrete_kwargs(nlsolve, optimize, nlsolve_kwargs, optimize_kwargs[, bvp_verbose])Select and normalize the keyword arguments forwarded to the active internal nonlinear or optimization solver.
BoundaryValueDiffEqCore.__concrete_solve_algorithm — Function
__concrete_solve_algorithm(prob, nlsolve_alg, optimize_alg)Automatic solver choosing according to the input solver. If none of the solvers are specified, we use nonlinear solvers from NonlinearSolve.jl. If both of the nonlinear solver and optimization solver are specified, we throw an error. If only one of the nonlinear solver and optimization solver is specified, we use that solver.
BoundaryValueDiffEqCore.__construct_internal_problem — Function
__construct_internal_problemConstructs the internal problem according to the specified boundary value problem and the selected algorithm. Depending on the formulation, it returns either a NonlinearProblem or an OptimizationProblem.
BoundaryValueDiffEqCore.__default_coloring_algorithm — Function
__default_coloring_algorithm(diffmode)Return the sparse matrix coloring algorithm associated with diffmode, or the package default when none is specified.
BoundaryValueDiffEqCore.__default_nonsparse_ad — Function
__default_nonsparse_ad(x_or_type)Choose the default dense AD backend for an input value or element type.
BoundaryValueDiffEqCore.__default_sparse_ad — Function
__default_sparse_ad(x_or_type)Choose the default sparse AD backend for an input value or element type.
BoundaryValueDiffEqCore.__default_sparsity_detector — Function
__default_sparsity_detector(diffmode)Return the sparsity detector associated with diffmode, or the package default when none is specified.
BoundaryValueDiffEqCore.__extract_mesh — Function
__extract_mesh(u₀, t₀, t₁, n)Takes the input initial guess and returns the mesh.
BoundaryValueDiffEqCore.__extract_problem_details — Function
__extract_problem_details(prob; kwargs...)Extract solver setup information from a BVP, including in-place status, state element type, state dimension, subinterval count, and starting state.
BoundaryValueDiffEqCore.__extract_u0 — Function
__extract_u0(u₀, t₀)Takes the input initial guess and returns the value at the starting mesh point.
BoundaryValueDiffEqCore.__flatten_initial_guess — Function
__flatten_initial_guess(u₀) -> Union{AbstractMatrix, AbstractVector, Nothing}Flattens the initial guess into a matrix. For a function u₀, it returns nothing. For no initial guess, it returns vec(u₀).
BoundaryValueDiffEqCore.__get_bcresid_prototype — Function
__get_bcresid_prototype(prob, u)Construct the boundary condition residual prototype and its shape metadata for prob.
BoundaryValueDiffEqCore.__get_non_sparse_ad — Function
__get_non_sparse_ad(ad)Return the dense AD backend inside AutoSparse, or return non-sparse backends unchanged.
BoundaryValueDiffEqCore.__has_initial_guess — Function
__has_initial_guess(u₀) -> BoolReturns true if the input has an initial guess.
BoundaryValueDiffEqCore.__initial_guess — Function
__initial_guess(f, p, t; tune_parameters = false)Evaluate an initial guess function with the supported (p, t) calling convention.
BoundaryValueDiffEqCore.__initial_guess_length — Function
__initial_guess_length(u₀) -> IntReturns the length of the initial guess. If the initial guess is a function or no initial guess is supplied, it returns -1.
BoundaryValueDiffEqCore.__initial_guess_on_mesh — Function
__initial_guess_on_mesh(u₀, mesh, p, alias_u0::Bool)Returns the initial guess on the mesh. For DiffEqArray assumes that the mesh is the same as the mesh of the DiffEqArray.
BoundaryValueDiffEqCore.__internal_nlsolve_problem — Function
__internal_nlsolve_problem(prob, resid_prototype, u0, args...; kwargs...)Construct the internal NonlinearProblem or NonlinearLeastSquaresProblem for a BVP discretization.
BoundaryValueDiffEqCore.__internal_optimization_problem — Function
__internal_optimization_problem(prob, args...; kwargs...)Construct the internal OptimizationProblem for optimization-based BVP solves.
BoundaryValueDiffEqCore.__internal_solve — Function
__internal_solve(prob, alg; kwargs...)Dispatch to the appropriate solve entry point for internal nonlinear, nonlinear least squares, and optimization problems.
BoundaryValueDiffEqCore.__materialize_jacobian_algorithm — Function
__materialize_jacobian_algorithm(nlsolve, jac_alg)Normalize a user supplied AD backend or Jacobian algorithm into a BVPJacobianAlgorithm. When jac_alg is not supplied, the nonlinear solver's jacobian_ad field is used if it exists.
BoundaryValueDiffEqCore.__maybe_allocate_diffcache — Function
__maybe_allocate_diffcache(x, chunksize, jac_alg)Allocate a DiffCache for x when jac_alg requires one; otherwise return x.
BoundaryValueDiffEqCore.__maybe_matmul! — Function
__maybe_matmul!(z, A, b, alpha = one(eltype(z)), beta = zero(eltype(z)))Compute z = alpha * A * b + beta * z, using a fallback loop for array types where mul! is not appropriate.
BoundaryValueDiffEqCore.__needs_diffcache — Function
__needs_diffcache(ad_or_jac_alg) -> BoolReturn whether the AD backend needs a PreallocationTools.DiffCache during residual or Jacobian evaluation.
BoundaryValueDiffEqCore.__resize! — Function
__resize!(x, n, M)Resizes the input x to length n and returns the resized array. If n is less than the length of x, it truncates the array. If n is greater than the length of x, it appends zeros to the array.
BoundaryValueDiffEqCore.__restructure_sol — Function
__restructure_sol(sol, u_size)Reshape stored solution values to the original non-vector state shape u_size.
BoundaryValueDiffEqCore.__split_kwargs — Function
__split_kwargs(; abstol, adaptive, controller, verbose = DEFAULT_VERBOSE, kwargs...)Split BVP solve keywords into cache fields and the keyword set forwarded to internal solvers.
BoundaryValueDiffEqCore.__tunable_part — Function
__tunable_part(p)Return the SciMLStructures tunable portion of p, or p itself for plain parameter containers.
BoundaryValueDiffEqCore.__use_both_error_control — Function
__use_both_error_control(controller) -> BoolReturn whether an error controller combines defect and global error control.
BoundaryValueDiffEqCore.__vec — Function
__vec(x)Convert scalar, array, or tuple states to a vector representation.
BoundaryValueDiffEqCore.__vec_bc — Function
__vec_bc(sol, p, t, bc, u_size)Call an out-of-place boundary condition on reshaped non-vector state storage and vectorize the result.
BoundaryValueDiffEqCore.__vec_bc! — Function
__vec_bc!(resid, sol, p, t, bc!, resid_size, u_size)Call an in-place boundary condition on reshaped non-vector residual and state storage.
BoundaryValueDiffEqCore.__vec_f — Function
__vec_f(u, p, t, f, u_size)Call an out-of-place problem function on reshaped non-vector state storage and vectorize the result.
BoundaryValueDiffEqCore.__vec_f! — Function
__vec_f!(du, u, p, t, f!, u_size)Call an in-place problem function on reshaped non-vector state storage.
BoundaryValueDiffEqCore.__vec_so_bc — Function
__vec_so_bc(dsol, sol, p, t, bc, u_size)Call an out-of-place second-order boundary condition on reshaped derivative and state storage and vectorize the result.
BoundaryValueDiffEqCore.__vec_so_bc! — Function
__vec_so_bc!(resid, dsol, sol, p, t, bc!, resid_size, u_size)Call an in-place second-order boundary condition on reshaped derivative and state storage.
BoundaryValueDiffEqCore._process_verbose_param — Function
_process_verbose_param(verbose) -> BVPVerbosityConvert supported verbosity presets, booleans, and BVPVerbosity values to the concrete verbosity configuration used by solver caches.
BoundaryValueDiffEqCore._sparse_like — Function
_sparse_like(I, J, x, m = maximum(I), n = maximum(J))Build a sparse matrix with index storage adapted to x and values shaped like x.
BoundaryValueDiffEqCore._unwrap_val — Function
_unwrap_val(x)Return the value carried by Val(x), or return x unchanged for non-Val inputs.
BoundaryValueDiffEqCore.concrete_jacobian_algorithm — Function
concrete_jacobian_algorithm(jac_alg, prob, alg)
concrete_jacobian_algorithm(jac_alg, problem_type, prob, alg)If user provided all the required fields, then return the user provided algorithm. Otherwise, based on the problem type and the algorithm, decide the missing fields.
For example, for TwoPointBVProblem, the bc_diffmode is set to AutoSparse(AutoForwardDiff()) while for StandardBVProblem, the bc_diffmode is set to AutoForwardDiff().
BoundaryValueDiffEqCore.diff! — Function
diff!(dx, x)Write the forward differences of x into dx.
BoundaryValueDiffEqCore.eval_bc_residual — Function
eval_bc_residual(problem_type, bc, sol, p, t)Evaluate an out-of-place boundary condition residual for standard, two-point, and second-order boundary value problem forms.
BoundaryValueDiffEqCore.eval_bc_residual! — Function
eval_bc_residual!(resid, problem_type, bc!, sol, p, t)Evaluate an in-place boundary condition residual into resid for standard, two-point, and second-order boundary value problem forms.
BoundaryValueDiffEqCore.get_dense_ad — Function
get_dense_ad(ad)Return the dense AD backend for AutoSparse wrappers, preserving nothing and dense AD backends unchanged.
BoundaryValueDiffEqCore.interval — Function
interval(mesh, t)Find the interval that t belongs to in mesh. Assumes that mesh is sorted.
BoundaryValueDiffEqCore.nodual_value — Function
nodual_value(x)Strip ForwardDiff and SparseConnectivityTracer dual numbers from scalars or arrays.
BoundaryValueDiffEqCore.recursive_flatten — Function
recursive_flatten(x)Flatten a vector of array-like states into a single vector.
BoundaryValueDiffEqCore.recursive_flatten! — Function
recursive_flatten!(y, x)Flatten a vector of array-like states into the preallocated vector y.
BoundaryValueDiffEqCore.recursive_flatten_twopoint! — Function
recursive_flatten_twopoint!(y, x, sizes)Flatten a two-point boundary value state vector while preserving the endpoint block sizes.
BoundaryValueDiffEqCore.recursive_unflatten! — Function
recursive_unflatten!(y, x)Copy a flattened vector x back into the array-like storage y.
BoundaryValueDiffEqCore.safe_similar — Function
safe_similar(x, dims...)Allocate similar(x, dims...) and initialize numeric storage with zeros.