BoundaryValueDiffEqFIRK

Fully Implicit Runge Kutta(FIRK) Methods. To be able to access the solvers in BoundaryValueDiffEqFIRK, you must first install them use the Julia package manager:

using Pkg
Pkg.add("BoundaryValueDiffEqFIRK")

BoundaryValueDiffEqFIRK provides the BVP problem constructors and solve used by its documented solver workflow:

using BoundaryValueDiffEqFIRK

function f!(du, u, p, t)
    du[1] = u[2]
    du[2] = 0
end

function bc!(residual, u, p, t)
    residual[1] = u(0.0)[1] - 1
    residual[2] = u(1.0)[1]
end

prob = BVProblem(f!, bc!, [1.0, -1.0], (0.0, 1.0); nlls = Val(false))
sol = solve(prob, RadauIIa5(); dt = 0.2, abstol = 1e-8)

@assert isapprox(sol(0.0)[1], 1.0; atol = 1e-6)
@assert isapprox(sol(1.0)[1], 0.0; atol = 1e-6)

function bca!(residual, u, p)
    residual[1] = u[1] - 1
end

function bcb!(residual, u, p)
    residual[1] = u[1]
end

two_point_prob = TwoPointBVProblem(
    f!, (bca!, bcb!), [1.0, -1.0], (0.0, 1.0);
    bcresid_prototype = (zeros(1), zeros(1)), nlls = Val(false))
two_point_sol = solve(two_point_prob, RadauIIa5(); dt = 0.2, abstol = 1e-8)

@assert isapprox(two_point_sol(0.0)[1], 1.0; atol = 1e-6)
@assert isapprox(two_point_sol(1.0)[1], 0.0; atol = 1e-6)
# output

Nested nonlinear solving in FIRK methods

When working with large boundary value problems, especially those involving stiff systems, computational efficiency and solver robustness become critical concerns. To improve the efficiency of FIRK methods on large BVPs, we can use nested nonlinear solving to obtain the implicit FIRK step instead of solving them as part of the global residual. In BoundaryValueDiffEq.jl, we can set nested_nlsolve as true to enable FIRK methods to compute the implicit FIRK steps using nested nonlinear solving(default option in FIRK methods is nested_nlsolve=false).

Moreover, the nested nonlinear problem solver can be finely tuned to meet specific accuracy requirements by providing detailed keyword arguments through the nested_nlsolve_kwargs option in any FIRK solver, for example, RadauIIa5(; nested_nlsolve = true, nested_nlsolve_kwargs = (; abstol = 1e-6, reltol = 1e-6)), where nested_nlsolve_kwargs can be any common keyword arguments in NonlinearSolve.jl, see Common Solver Options in NonlinearSolve.jl.

Full List of Methods

Radau IIA methods

  • RadauIIa1: 1 stage Radau IIA method, without defect control adaptivity
  • RadauIIa2: 2 stage Radau IIA method, with defect control adaptivity.
  • RadauIIa3: 3 stage Radau IIA method, with defect control adaptivity.
  • RadauIIa5: 5 stage Radau IIA method, with defect control adaptivity.
  • RadauIIa7: 7 stage Radau IIA method, with defect control adaptivity.

Lobatto IIIA methods

  • LobattoIIIa2: 2 stage Lobatto IIIa method, with defect control adaptivity.
  • LobattoIIIa3: 3 stage Lobatto IIIa method, with defect control adaptivity.
  • LobattoIIIa4: 4 stage Lobatto IIIa method, with defect control adaptivity.
  • LobattoIIIa5: 5 stage Lobatto IIIa method, with defect control adaptivity.

Lobatto IIIB methods

  • LobattoIIIb2: 2 stage Lobatto IIIb method, without defect control adaptivity.
  • LobattoIIIb3: 3 stage Lobatto IIIb method, with defect control adaptivity.
  • LobattoIIIb4: 4 stage Lobatto IIIb method, with defect control adaptivity.
  • LobattoIIIb5: 5 stage Lobatto IIIb method, with defect control adaptivity.

Lobatto IIIC methods

  • LobattoIIIc2: 2 stage Lobatto IIIc method, without defect control adaptivity.
  • LobattoIIIc3: 3 stage Lobatto IIIc method, with defect control adaptivity.
  • LobattoIIIc4: 4 stage Lobatto IIIc method, with defect control adaptivity.
  • LobattoIIIc5: 5 stage Lobatto IIIc method, with defect control adaptivity.

Detailed Solvers Explanation

BoundaryValueDiffEqFIRK.RadauIIa1Type
RadauIIa1(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> RadauIIa1

Configures the 1-stage Radau IIA fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • RadauIIa1: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: RadauIIa1

alg = RadauIIa1()
@assert alg isa RadauIIa1
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@incollection{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    editor={Engquist, Bj{"o}rn},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.RadauIIa2Type
RadauIIa2(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> RadauIIa2

Configures the 2-stage Radau IIA fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • RadauIIa2: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: RadauIIa2

alg = RadauIIa2()
@assert alg isa RadauIIa2
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@incollection{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    editor={Engquist, Bj{"o}rn},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.RadauIIa3Type
RadauIIa3(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> RadauIIa3

Configures the 3-stage Radau IIA fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • RadauIIa3: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: RadauIIa3

alg = RadauIIa3()
@assert alg isa RadauIIa3
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@incollection{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    editor={Engquist, Bj{"o}rn},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.RadauIIa5Type
RadauIIa5(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> RadauIIa5

Configures the 5-stage Radau IIA fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • RadauIIa5: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: RadauIIa5

alg = RadauIIa5()
@assert alg isa RadauIIa5
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@incollection{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    editor={Engquist, Bj{"o}rn},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.RadauIIa7Type
RadauIIa7(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> RadauIIa7

Configures the 7-stage Radau IIA fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • RadauIIa7: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: RadauIIa7

alg = RadauIIa7()
@assert alg isa RadauIIa7
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@incollection{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    editor={Engquist, Bj{"o}rn},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIa2Type
LobattoIIIa2(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIa2

Configures the 2-stage Lobatto IIIA fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIa2: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIa2

alg = LobattoIIIa2()
@assert alg isa LobattoIIIa2
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIa3Type
LobattoIIIa3(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIa3

Configures the 3-stage Lobatto IIIA fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIa3: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIa3

alg = LobattoIIIa3()
@assert alg isa LobattoIIIa3
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIa4Type
LobattoIIIa4(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIa4

Configures the 4-stage Lobatto IIIA fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIa4: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIa4

alg = LobattoIIIa4()
@assert alg isa LobattoIIIa4
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIa5Type
LobattoIIIa5(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIa5

Configures the 5-stage Lobatto IIIA fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIa5: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIa5

alg = LobattoIIIa5()
@assert alg isa LobattoIIIa5
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIb2Type
LobattoIIIb2(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIb2

Configures the 2-stage Lobatto IIIB fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIb2: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIb2

alg = LobattoIIIb2()
@assert alg isa LobattoIIIb2
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIb3Type
LobattoIIIb3(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIb3

Configures the 3-stage Lobatto IIIB fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIb3: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIb3

alg = LobattoIIIb3()
@assert alg isa LobattoIIIb3
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIb4Type
LobattoIIIb4(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIb4

Configures the 4-stage Lobatto IIIB fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIb4: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIb4

alg = LobattoIIIb4()
@assert alg isa LobattoIIIb4
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIb5Type
LobattoIIIb5(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIb5

Configures the 5-stage Lobatto IIIB fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIb5: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIb5

alg = LobattoIIIb5()
@assert alg isa LobattoIIIb5
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIc2Type
LobattoIIIc2(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIc2

Configures the 2-stage Lobatto IIIC fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIc2: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIc2

alg = LobattoIIIc2()
@assert alg isa LobattoIIIc2
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIc3Type
LobattoIIIc3(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIc3

Configures the 3-stage Lobatto IIIC fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIc3: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIc3

alg = LobattoIIIc3()
@assert alg isa LobattoIIIc3
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIc4Type
LobattoIIIc4(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIc4

Configures the 4-stage Lobatto IIIC fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIc4: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIc4

alg = LobattoIIIc4()
@assert alg isa LobattoIIIc4
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source
BoundaryValueDiffEqFIRK.LobattoIIIc5Type
LobattoIIIc5(; nlsolve = nothing, optimize = nothing,
    jac_alg = BVPJacobianAlgorithm(), nested_nlsolve = false,
    nested_nlsolve_kwargs = (;), defect_threshold = 0.1,
    max_num_subintervals = 3000) -> LobattoIIIc5

Configures the 5-stage Lobatto IIIC fully implicit Runge-Kutta method.

Keywords

  • nlsolve = nothing: nonlinear solver for the collocation residual. The BVP Jacobian configuration takes precedence over an autodiff setting on this solver.

  • optimize = nothing: optimization solver used when the selected BVP path formulates the residual as an optimization problem.

  • jac_alg = BVPJacobianAlgorithm(): differentiation strategy for the boundary and collocation residuals.

    • For TwoPointBVProblem, only diffmode is used (defaults to AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff())).
    • For BVProblem, bc_diffmode and nonbc_diffmode are used. For nonbc_diffmode, the default is AutoSparse(AutoForwardDiff()) if possible, otherwise AutoSparse(AutoFiniteDiff()). For bc_diffmode, the default is AutoForwardDiff() if possible, otherwise AutoFiniteDiff().
  • nested_nlsolve = false: solve each implicit Runge-Kutta step with a nested nonlinear solve instead of including its stages in the global residual.

  • nested_nlsolve_kwargs = (;): keyword arguments forwarded to the nested nonlinear solver.

  • defect_threshold = 0.1: defect threshold used by mesh adaptivity.

  • max_num_subintervals = 3000: maximum number of mesh subintervals.

Fields

  • nlsolve: configured nonlinear solver or nothing.
  • optimize: configured optimization solver or nothing.
  • jac_alg::BVPJacobianAlgorithm: Jacobian configuration.
  • nested_nlsolve::Bool: whether nested nonlinear solves are enabled.
  • nested_nlsolve_kwargs::NamedTuple: options for the nested nonlinear solver.
  • defect_threshold: adaptive defect threshold.
  • max_num_subintervals::Int: mesh-size limit.

Returns

  • LobattoIIIc5: an algorithm object accepted by SciMLBase.solve for a boundary value problem.

Examples

using BoundaryValueDiffEqFIRK: LobattoIIIc5

alg = LobattoIIIc5()
@assert alg isa LobattoIIIc5
# output
Note

For type-stability, the chunksizes for ForwardDiff ADTypes in BVPJacobianAlgorithm must be provided.

References

Reference for Lobatto and Radau methods:

@Inbook{Jay2015,
    author="Jay, Laurent O.",
    editor="Engquist, Bj{"o}rn",
    title="Lobatto Methods",
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    year="2015",
    publisher="Springer Berlin Heidelberg",
}
@incollection{engquist_radau_2015,
    author = {Hairer, Ernst and Wanner, Gerhard},
    title = {Radau {Methods}},
    booktitle = {Encyclopedia of {Applied} and {Computational} {Mathematics}},
    publisher = {Springer Berlin Heidelberg},
    editor="Engquist, Bj{"o}rn",
    year = {2015},
}

References for implementation of defect control, based on the bvp5c solver in MATLAB:

@article{shampine_solving_nodate,
    title = {Solving {Boundary} {Value} {Problems} for {Ordinary} {Differential} {Equations} in {Matlab} with bvp4c},
    author = {Shampine, Lawrence F and Kierzenka, Jacek and Reichelt, Mark W},
    year = {2000},
}

@article{kierzenka_bvp_2008,
    title = {A {BVP} {Solver} that {Controls} {Residual} and {Error}},
    author = {Kierzenka, J and Shampine, L F},
    year = {2008},
}

@article{russell_adaptive_1978,
    title = {Adaptive {Mesh} {Selection} {Strategies} for {Solving} {Boundary} {Value} {Problems}},
    journal = {SIAM Journal on Numerical Analysis},
    author = {Russell, R. D. and Christiansen, J.},
    year = {1978},
}
source