Internal Abstract Types

Solvers

Core Internal Interfaces

BoundaryValueDiffEqCore.__FastShortcutNonlinearPolyalgFunction
__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.

source
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).

source
BoundaryValueDiffEqCore.__build_costFunction
__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.

source
BoundaryValueDiffEqCore.__build_solutionFunction
__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.

source
BoundaryValueDiffEqCore.__concrete_kwargsFunction
__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.

source
BoundaryValueDiffEqCore.__concrete_solve_algorithmFunction
__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.

source
BoundaryValueDiffEqCore.__construct_internal_problemFunction
__construct_internal_problem

Constructs 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.

source
BoundaryValueDiffEqCore.__flatten_initial_guessFunction
__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₀).

source
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.

source
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.

Note

We use last since the first might not conform to the same structure. For example, in the case of residuals

source
BoundaryValueDiffEqCore.__split_kwargsFunction
__split_kwargs(; abstol, adaptive, controller, verbose = DEFAULT_VERBOSE, kwargs...)

Split BVP solve keywords into cache fields and the keyword set forwarded to internal solvers.

source
BoundaryValueDiffEqCore.__vec_so_bcFunction
__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.

source
BoundaryValueDiffEqCore.concrete_jacobian_algorithmFunction
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().

source
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.

source