diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 70c5a8e0ac..70d2710ded 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -25,7 +25,11 @@ jobs: Pkg.develop(map(path ->Pkg.PackageSpec.(;path="$(@__DIR__)/lib/$(path)"), readdir("./lib"))); ' - name: Install dependencies - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + run: julia --project=docs/ -e ' + using Pkg; + Pkg.develop(PackageSpec(path=pwd())); + Pkg.develop(map(path ->Pkg.PackageSpec.(;path="$(@__DIR__)/lib/$(path)"), readdir("./lib"))); + Pkg.instantiate()' - name: Build and deploy env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token diff --git a/docs/Project.toml b/docs/Project.toml index cf0665b82a..6383ea3340 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,6 +1,36 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +OrdinaryDiffEqAdamsBashforthMoulton = "89bda076-bce5-4f1c-845f-551c83cdda9a" +OrdinaryDiffEqBDF = "6ad6398a-0878-4a85-9266-38940aa047c8" +OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8" +OrdinaryDiffEqDefault = "50262376-6c5a-4cf5-baba-aaf4f84d72d7" +OrdinaryDiffEqDifferentiation = "4302a76b-040a-498a-8c04-15b101fed76b" +OrdinaryDiffEqExplicitRK = "9286f039-9fbf-40e8-bf65-aa933bdc4db0" +OrdinaryDiffEqExponentialRK = "e0540318-69ee-4070-8777-9e2de6de23de" +OrdinaryDiffEqExtrapolation = "becaefa8-8ca2-5cf9-886d-c06f3d2bd2c4" +OrdinaryDiffEqFIRK = "5960d6e9-dd7a-4743-88e7-cf307b64f125" +OrdinaryDiffEqFeagin = "101fe9f7-ebb6-4678-b671-3a81e7194747" +OrdinaryDiffEqFunctionMap = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f" +OrdinaryDiffEqHighOrderRK = "d28bc4f8-55e1-4f49-af69-84c1a99f0f58" +OrdinaryDiffEqIMEXMultistep = "9f002381-b378-40b7-97a6-27a27c83f129" +OrdinaryDiffEqLinear = "521117fe-8c41-49f8-b3b6-30780b3f0fb5" +OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6" +OrdinaryDiffEqLowStorageRK = "b0944070-b475-4768-8dec-fb6eb410534d" +OrdinaryDiffEqNonlinearSolve = "127b3ac7-2247-4354-8eb6-78cf4e7c58e8" +OrdinaryDiffEqNordsieck = "c9986a66-5c92-4813-8696-a7ec84c806c8" +OrdinaryDiffEqPDIRK = "5dd0a6cf-3d4b-4314-aa06-06d4e299bc89" +OrdinaryDiffEqPRK = "5b33eab2-c0f1-4480-b2c3-94bc1e80bda1" +OrdinaryDiffEqQPRK = "04162be5-8125-4266-98ed-640baecc6514" +OrdinaryDiffEqRKN = "af6ede74-add8-4cfd-b1df-9a4dbb109d7a" +OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce" +OrdinaryDiffEqSDIRK = "2d112036-d095-4a1e-ab9a-08536f3ecdbf" +OrdinaryDiffEqSSPRK = "669c94d9-1f4b-4b64-b377-1aa079aa2388" +OrdinaryDiffEqStabilizedIRK = "e3e12d00-db14-5390-b879-ac3dd2ef6296" +OrdinaryDiffEqStabilizedRK = "358294b1-0aab-51c3-aafe-ad5ab194a2ad" +OrdinaryDiffEqSymplecticRK = "fa646aed-7ef9-47eb-84c4-9443fc8cbfa8" +OrdinaryDiffEqTsit5 = "b1df2697-797e-41e3-8120-5422d3b24e4a" +OrdinaryDiffEqVerner = "79d7bb75-1356-48c1-b8c0-6832512096c2" [compat] Documenter = "0.27, 1" diff --git a/docs/common_first_steps.jl b/docs/common_first_steps.jl index a84500e058..a82f7a0401 100644 --- a/docs/common_first_steps.jl +++ b/docs/common_first_steps.jl @@ -1,6 +1,25 @@ using Markdown -function first_steps(name, solver) - Markdown.parse("""## Installation +function first_steps(name, solver; fixed_timesteps = false) + sym_name = Symbol(name) + sym_solver = Symbol(solver) + @eval begin + using $sym_name + function lorenz!(du, u, p, t) + du[1] = 10.0 * (u[2] - u[1]) + du[2] = u[1] * (28.0 - u[3]) - u[2] + du[3] = u[1] * u[2] - (8 / 3) * u[3] + end + u0 = [1.0; 0.0; 0.0] + tspan = (0.0, 100.0) + prob = ODEProblem(lorenz!, u0, tspan) + if !($fixed_timesteps) + sol = solve(prob, ($sym_solver)()) + else + sol = solve(prob, ($sym_solver)(), dt = 1/100) + end + sol_end = sol[end] + end + installation = """## Installation To be able to access the solvers in `$name`, you must first install them use the Julia package manager: ```julia @@ -10,20 +29,53 @@ function first_steps(name, solver) This will only install the solvers listed at the bottom of this page. If you want to explore other solvers for your problem, you will need to install some of the other libraries listed in the navigation bar on the left. + """ + example = if !fixed_timesteps + """ - ## Example usage + ## Example usage - ```julia - using $name + ```julia + using $name - function lorenz!(du, u, p, t) - du[1] = 10.0 * (u[2] - u[1]) - u[2] = u[1] * (28.0 - u[3]) - u[2] - du[3] = u[1] * u[2] - (8 / 3) * u[3] + function lorenz!(du, u, p, t) + du[1] = 10.0 * (u[2] - u[1]) + du[2] = u[1] * (28.0 - u[3]) - u[2] + du[3] = u[1] * u[2] - (8 / 3) * u[3] + end + u0 = [1.0; 0.0; 0.0] + tspan = (0.0, 100.0) + prob = ODEProblem(lorenz!, u0, tspan) + sol = solve(prob, $solver()) + sol[end] + ``` + ```julia + $sol_end + ``` + """ + else + """ + + ## Example usage + + ```julia + using $name + + function lorenz!(du, u, p, t) + du[1] = 10.0 * (u[2] - u[1]) + du[2] = u[1] * (28.0 - u[3]) - u[2] + du[3] = u[1] * u[2] - (8 / 3) * u[3] + end + u0 = [1.0; 0.0; 0.0] + tspan = (0.0, 100.0) + prob = ODEProblem(lorenz!, u0, tspan) + sol = solve(prob, $solver(), dt=1/100) + sol[end] + ``` + ```julia + $sol_end + ``` + """ end - u0 = [1.0; 0.0; 0.0] - tspan = (0.0, 100.0) - prob = ODEProblem(lorenz!, u0, tspan) - sol = solve(prob, $solver()) - ```""") + Markdown.parse(installation*example) end diff --git a/docs/src/explicit/LowStorageRK.md b/docs/src/explicit/LowStorageRK.md index 563c134554..006bd3bd26 100644 --- a/docs/src/explicit/LowStorageRK.md +++ b/docs/src/explicit/LowStorageRK.md @@ -12,7 +12,7 @@ are generally only recommended in situations which are RAM bound, like large-sca ```@eval first_steps = evalfile("./common_first_steps.jl") -first_steps("OrdinaryDiffEqLowStorageRK", "CarpenterKennedy2N54") +first_steps("OrdinaryDiffEqLowStorageRK", "CKLLSRK43_2") ``` ## Full list of solvers diff --git a/docs/src/explicit/PRK.md b/docs/src/explicit/PRK.md index f1cf3ed72e..56c15d094a 100644 --- a/docs/src/explicit/PRK.md +++ b/docs/src/explicit/PRK.md @@ -8,7 +8,7 @@ Explicit solvers optimized for a certain number of parallel calls of the system ```@eval first_steps = evalfile("./common_first_steps.jl") -first_steps("OrdinaryDiffEqPRK", "KuttaPRK2p5") +first_steps("OrdinaryDiffEqPRK", "KuttaPRK2p5", fixed_timesteps = true) ``` ## Full list of solvers diff --git a/docs/src/explicit/SSPRK.md b/docs/src/explicit/SSPRK.md index d0fd732d05..5f190dfecb 100644 --- a/docs/src/explicit/SSPRK.md +++ b/docs/src/explicit/SSPRK.md @@ -14,7 +14,7 @@ Note that for SSPRK methods, a algorithm utility `OrdinaryDiffEqCore.ssp_coeffic ```@eval first_steps = evalfile("./common_first_steps.jl") -first_steps("OrdinaryDiffEqSSPRK", "SSPRK22") +first_steps("OrdinaryDiffEqSSPRK", "SSPRK432") ``` ## Full list of solvers diff --git a/docs/src/implicit/PDIRK.md b/docs/src/implicit/PDIRK.md index 4838693e9c..fcc262e167 100644 --- a/docs/src/implicit/PDIRK.md +++ b/docs/src/implicit/PDIRK.md @@ -24,7 +24,7 @@ which is why these are the parallel DIRK methods. ```@eval first_steps = evalfile("./common_first_steps.jl") -first_steps("OrdinaryDiffEqPDIRK", "PDIRK44") +first_steps("OrdinaryDiffEqPDIRK", "PDIRK44", fixed_timesteps = true) ``` ## Full list of solvers diff --git a/docs/src/implicit/SDIRK.md b/docs/src/implicit/SDIRK.md index 4d04f1041e..6dfe64f2f1 100644 --- a/docs/src/implicit/SDIRK.md +++ b/docs/src/implicit/SDIRK.md @@ -8,7 +8,7 @@ This article is a stub. ```@eval first_steps = evalfile("./common_first_steps.jl") -first_steps("OrdinaryDiffEqSDIRK", "PDIRK44") +first_steps("OrdinaryDiffEqSDIRK", "KenCarp3") ``` ## Full list of solvers diff --git a/docs/src/semiimplicit/ExponentialRK.md b/docs/src/semiimplicit/ExponentialRK.md index e1f5a788f1..35bc4b50a2 100644 --- a/docs/src/semiimplicit/ExponentialRK.md +++ b/docs/src/semiimplicit/ExponentialRK.md @@ -23,7 +23,7 @@ you will need to install some of the other libraries listed in the navigation ba ```@eval first_steps = evalfile("./common_first_steps.jl") -first_steps("OrdinaryDiffEqExponentialRK", "EPIRK5s3") +first_steps("OrdinaryDiffEqExponentialRK", "Exprb43", fixed_timesteps = true) ``` ## Full list of solvers