From e9d1e8738e547195da52e30340276a8ee452600c Mon Sep 17 00:00:00 2001 From: Qingyu Qu <2283984853@qq.com> Date: Wed, 8 Jan 2025 20:41:30 +0800 Subject: [PATCH] Docs being able to deploy --- docs/Project.toml | 2 ++ docs/make.jl | 6 ++++ docs/src/assets/Project.toml | 37 +++++++++++++++++++++++++ docs/src/basics/autodiff.md | 2 +- docs/src/basics/bvp_functions.md | 4 +-- docs/src/basics/solve.md | 4 --- docs/src/devdocs/internal_interfaces.md | 4 +-- docs/src/refs.bib | 8 ++++++ docs/src/solvers/ascher.md | 14 +++++----- docs/src/solvers/firk.md | 2 +- docs/src/solvers/mirk.md | 2 +- docs/src/solvers/mirkn.md | 5 ++-- docs/src/solvers/shooting.md | 2 +- docs/src/solvers/simple_solvers.md | 4 +-- docs/src/tutorials/getting_started.md | 24 ++++++++-------- 15 files changed, 84 insertions(+), 36 deletions(-) create mode 100644 docs/src/assets/Project.toml create mode 100644 docs/src/refs.bib diff --git a/docs/Project.toml b/docs/Project.toml index f23d1b40..896771a4 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,5 +1,6 @@ [deps] ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +BoundaryValueDiffEq = "764a87c0-6b3e-53db-9096-fe964310641d" BoundaryValueDiffEqAscher = "7227322d-7511-4e07-9247-ad6ff830280e" BoundaryValueDiffEqCore = "56b672f2-a5fe-4263-ab2d-da677488eb3a" BoundaryValueDiffEqFIRK = "85d9eb09-370e-4000-bb32-543851f73618" @@ -19,6 +20,7 @@ SimpleBoundaryValueDiffEq = "be0294bd-f90f-4760-ac4e-3421ce2b2da0" [compat] ADTypes = "1.9" +BoundaryValueDiffEq = "5.12.0" BoundaryValueDiffEqCore = "1.1" BoundaryValueDiffEqFIRK = "1.1" BoundaryValueDiffEqMIRK = "1.1" diff --git a/docs/make.jl b/docs/make.jl index 1b5ad591..6ef4f9bc 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -16,6 +16,11 @@ cp(joinpath(@__DIR__, "Project.toml"), include("pages.jl") +bib = CitationBibliography(joinpath(@__DIR__, "src", "refs.bib")) + +interlinks = InterLinks("ADTypes" => "https://sciml.github.io/ADTypes.jl/stable/", + "LineSearch" => "https://sciml.github.io/LineSearch.jl/dev/") + makedocs(; sitename = "BoundaryValueDiffEq.jl", authors = "SciML", modules = [BoundaryValueDiffEqCore, BoundaryValueDiffEqMIRK, BoundaryValueDiffEqFIRK, @@ -25,6 +30,7 @@ makedocs(; sitename = "BoundaryValueDiffEq.jl", doctest = false, checkdocs = :exports, warnonly = [:missing_docs], + plugins = [bib, interlinks], format = Documenter.HTML(assets = ["assets/favicon.ico"], canonical = "https://docs.sciml.ai/BoundaryValueDiffEq/stable/"), pages) diff --git a/docs/src/assets/Project.toml b/docs/src/assets/Project.toml new file mode 100644 index 00000000..896771a4 --- /dev/null +++ b/docs/src/assets/Project.toml @@ -0,0 +1,37 @@ +[deps] +ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +BoundaryValueDiffEq = "764a87c0-6b3e-53db-9096-fe964310641d" +BoundaryValueDiffEqAscher = "7227322d-7511-4e07-9247-ad6ff830280e" +BoundaryValueDiffEqCore = "56b672f2-a5fe-4263-ab2d-da677488eb3a" +BoundaryValueDiffEqFIRK = "85d9eb09-370e-4000-bb32-543851f73618" +BoundaryValueDiffEqMIRK = "1a22d4ce-7765-49ea-b6f2-13c8438986a6" +BoundaryValueDiffEqMIRKN = "9255f1d6-53bf-473e-b6bd-23f1ff009da4" +BoundaryValueDiffEqShooting = "ed55bfe0-3725-4db6-871e-a1dc9f42a757" +DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244" +DocumenterInterLinks = "d12716ef-a0f6-4df4-a9f1-a5a34e75c656" +LineSearch = "87fe0de2-c867-4266-b59a-2f0a94fc965b" +LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +SimpleBoundaryValueDiffEq = "be0294bd-f90f-4760-ac4e-3421ce2b2da0" + +[compat] +ADTypes = "1.9" +BoundaryValueDiffEq = "5.12.0" +BoundaryValueDiffEqCore = "1.1" +BoundaryValueDiffEqFIRK = "1.1" +BoundaryValueDiffEqMIRK = "1.1" +BoundaryValueDiffEqShooting = "1.1" +DiffEqBase = "6.158.3" +Documenter = "1" +DocumenterCitations = "1" +DocumenterInterLinks = "1.0.0" +LineSearch = "0.1.4" +LinearAlgebra = "1.10" +LinearSolve = "2.36.2" +OrdinaryDiffEq = "6.90.1" +SciMLBase = "2.60.0" +SimpleBoundaryValueDiffEq = "1.1.0" \ No newline at end of file diff --git a/docs/src/basics/autodiff.md b/docs/src/basics/autodiff.md index 4f5a28eb..7d6edfe3 100644 --- a/docs/src/basics/autodiff.md +++ b/docs/src/basics/autodiff.md @@ -1,4 +1,4 @@ -# # Automatic Differentiation Backends +# Automatic Differentiation Backends !!! note diff --git a/docs/src/basics/bvp_functions.md b/docs/src/basics/bvp_functions.md index dac64edf..f0c99c01 100644 --- a/docs/src/basics/bvp_functions.md +++ b/docs/src/basics/bvp_functions.md @@ -6,7 +6,5 @@ The SciML ecosystem provides an extensive interface for declaring extra function ```@docs SciMLBase.BVPFunction -SciMLBase.TwoPointBVPFunction -SciMLBase.SecondOrderBVPFunction -SciMLBase.TwoPointSecondOrderBVPFunction +SciMLBase.DynamicalBVPFunction ``` diff --git a/docs/src/basics/solve.md b/docs/src/basics/solve.md index 040c1162..171b63fd 100644 --- a/docs/src/basics/solve.md +++ b/docs/src/basics/solve.md @@ -1,9 +1,5 @@ # [Common Solver Options (Solve Keyword Arguments)](@id solver_options) -```@docs -solve(::AbstractBVProblem, args...; kwargs...) -``` - ## Iteration Controls - `maxiters::Int`: The maximum number of iterations to perform. Defaults to `1000`. diff --git a/docs/src/devdocs/internal_interfaces.md b/docs/src/devdocs/internal_interfaces.md index d4996062..690baa00 100644 --- a/docs/src/devdocs/internal_interfaces.md +++ b/docs/src/devdocs/internal_interfaces.md @@ -2,6 +2,6 @@ ## Solvers -```@docs -BoundaryValueDiffEqCore.BuondaryValueDiffEqAlgorithm +```julia +BoundaryValueDiffEqCore.BoundaryValueDiffEqAlgorithm ``` diff --git a/docs/src/refs.bib b/docs/src/refs.bib new file mode 100644 index 00000000..948333e1 --- /dev/null +++ b/docs/src/refs.bib @@ -0,0 +1,8 @@ +@article{Muir2001MonoImplicitRM, + title={Mono-Implicit Runge-Kutta-Nystr{\"o}m Methods with Application to Boundary Value Ordinary Differential Equations}, + author={Paul H. Muir and Mark F. Adams}, + journal={BIT Numerical Mathematics}, + year={2001}, + volume={41}, + pages={776-799}, +} \ No newline at end of file diff --git a/docs/src/solvers/ascher.md b/docs/src/solvers/ascher.md index 29a63bc1..d2085478 100644 --- a/docs/src/solvers/ascher.md +++ b/docs/src/solvers/ascher.md @@ -1,4 +1,4 @@ -# [BoundaryValueDiffEqAscher.jl](@id ascher) +# [BoundaryValueDiffEqAscher](@id ascher) Gauss Legendre collocation methods with Ascher's error control adaptivity and mesh refinement routines. To be able to access the solvers in BoundaryValueDiffEqFIRK, you must first install them use the Julia package manager: @@ -15,12 +15,12 @@ solve(prob::TwoPointBVProblem, alg; kwargs...) ## Full List of Methods - `Ascher1`: 1 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. - - `Ascher2`: 1 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. - - `Ascher3`: 1 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. - - `Ascher4`: 1 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. - - `Ascher5`: 1 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. - - `Ascher6`: 1 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. - - `Ascher7`: 1 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. + - `Ascher2`: 2 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. + - `Ascher3`: 3 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. + - `Ascher4`: 4 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. + - `Ascher5`: 5 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. + - `Ascher6`: 6 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. + - `Ascher7`: 7 stage Gauss Legendre collocation method with Ascher's error control adaptivity and mesh refinement. ## Detailed Solvers Explanation diff --git a/docs/src/solvers/firk.md b/docs/src/solvers/firk.md index e7e56513..17b2885e 100644 --- a/docs/src/solvers/firk.md +++ b/docs/src/solvers/firk.md @@ -1,4 +1,4 @@ -# [BoundaryValueDiffEqFIRK.jl](@id firk) +# [BoundaryValueDiffEqFIRK](@id firk) 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: diff --git a/docs/src/solvers/mirk.md b/docs/src/solvers/mirk.md index 25fd9e2a..868f32d6 100644 --- a/docs/src/solvers/mirk.md +++ b/docs/src/solvers/mirk.md @@ -1,4 +1,4 @@ -# [BoundaryValueDiffEqMIRK.jl](@id mirk) +# [BoundaryValueDiffEqMIRK](@id mirk) Monotonic Implicit Runge Kutta(MIRK) Methods. To only use the MIRK methods form BoundaryVaueDiffEq.jl, you need to install them use the Julia package manager: diff --git a/docs/src/solvers/mirkn.md b/docs/src/solvers/mirkn.md index 8b96e3b8..e3351a99 100644 --- a/docs/src/solvers/mirkn.md +++ b/docs/src/solvers/mirkn.md @@ -1,4 +1,4 @@ -# [BoundaryValueDiffEqMIRKN.jl](@id mirkn) +# [BoundaryValueDiffEqMIRKN](@id mirkn) Monotonic Implicit Runge Kutta Nyström(MIRKN) Methods. To only use the MIRKN methods form BoundaryVaueDiffEq.jl, you need to install them use the Julia package manager: @@ -12,8 +12,9 @@ solve(prob::SecondOrderBVProblem, alg; kwargs...) solve(prob::TwoPointSecondOrderBVProblem, alg; kwargs...) ``` -!!! note "MIRKN don't have defect control adaptivity" +!!! note "Defect control adaptivity" + MIRKN don't have defect control adaptivity ## Full List of Methods diff --git a/docs/src/solvers/shooting.md b/docs/src/solvers/shooting.md index 2e5f2b75..e611bc1f 100644 --- a/docs/src/solvers/shooting.md +++ b/docs/src/solvers/shooting.md @@ -1,4 +1,4 @@ -# [BoundaryValueDiffEqShooting.jl](@id shooting) +# [BoundaryValueDiffEqShooting](@id shooting) Single shooting method and multiple shooting method. To only use the Shooting methods form BoundaryVaueDiffEq.jl, you need to install them use the Julia package manager: diff --git a/docs/src/solvers/simple_solvers.md b/docs/src/solvers/simple_solvers.md index bdb40a8c..ddd5227b 100644 --- a/docs/src/solvers/simple_solvers.md +++ b/docs/src/solvers/simple_solvers.md @@ -1,8 +1,8 @@ -# [SimpleBoundaryValueDiffEq.jl](@id simpleboundaryvaluediffeq) +# [SimpleBoundaryValueDiffEq](@id simpleboundaryvaluediffeq) ## Full List of Methods -```@docs +```julia SimpleBoundaryValueDiffEq.SimpleMIRK4 SimpleBoundaryValueDiffEq.SimpleMIRK5 SimpleBoundaryValueDiffEq.SimpleMIRK6 diff --git a/docs/src/tutorials/getting_started.md b/docs/src/tutorials/getting_started.md index bb1203a6..cbf5d618 100644 --- a/docs/src/tutorials/getting_started.md +++ b/docs/src/tutorials/getting_started.md @@ -2,10 +2,10 @@ When ordinary differential equations has constraints over the time span, we should model the ordinary differential equations as a boundary value problem which has the form of: -$$ +```math \frac{du}{dt}=f(u, p, t)\\ g(u(a),u(b))=0 -$$ +``` BoundaryValueDiffEq.jl address three types of BVProblem. @@ -13,7 +13,7 @@ BoundaryValueDiffEq.jl address three types of BVProblem. 2. General second order boundary value problems, i.e., differential equations with constraints for both solution and derivative of solution applied over time span. This is a system where you would like to obtain the solution of the differential equations and make sure the solution satisfy the boundary conditions simutanously. 3. Boundary value differential algebraic equations, i.e., apart from constraints applied over the time span, BVDAE has additional algebraic equations which state the algebraic relationship of different states in BVDAE. -## Linear two-point boundary value problem +## Solving Linear two-point boundary value problem Consider the linear two-point boundary value problem from [standard BVP test problem](https://archimede.uniba.it/%7Ebvpsolvers/testsetbvpsolvers/?page_id=29). @@ -58,20 +58,20 @@ sol = solve(prob, MIRK4(), dt = 0.01) Consirder the test problem from example problems in MIRKN paper. -$$ +```math \begin{cases} y_1'(x)= y_2(x),\\ \epsilon y_2'(x)=-y_1(x)y_2'(x)- y_3(x)y_3'(x),\\ \epsilon y_3'(x)=y_1'(x) y_3(x)- y_1(x) y_3 '(x) \end{cases} -$$ +``` with initial conditions: -$$ +```math y_1(0) = y_1'(0)= y_1(1)=y_1'(1)=0,y_3(0)= -1, y_3(1)=1 -$$ +``` ```julia function f!(ddu, du, u, p, t) @@ -98,20 +98,20 @@ sol = solve(prob, MIRKN4(), dt = 0.01) Consider the nonlinear semi-explicit DAE of index at most 2 -$$ +```math \begin{cases} x_1'=(\epsilon+x_2-p_2(t))y+p_1'(t) \\ x_2'=p_2'(t) \\ x_3'=y \\ 0=(x_1-p_1(t))(y-e^t) \end{cases} -$$ +``` with boundary conditions -$$ +```math x_1(0)=0,x_3(0)=1,x_2(1)=\sin(1) -$$ +``` ```julia function f!(du, u, p, t) @@ -121,7 +121,7 @@ function f!(du, u, p, t) du[3] = u[4] du[4] = (u[1] - sin(t)) * (u[4] - e^t) end -function bc1!(res, u, p, t) +function bc!(res, u, p, t) res[1] = u[1] res[2] = u[3] - 1 res[3] = u[2] - sin(1.0)