Skip to content

Commit

Permalink
Merge pull request #178 from axla-io/al/properlobatto
Browse files Browse the repository at this point in the history
Add Lobatto IIIa-c and Radau IIa solvers
  • Loading branch information
ChrisRackauckas authored Sep 1, 2024
2 parents 4691581 + f8f5b35 commit 4590c02
Show file tree
Hide file tree
Showing 26 changed files with 3,715 additions and 69 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
group:
- "CPU"
- "MIRK"
- "MISC"
- "SHOOTING"
- "FIRK(EXPANDED)"
- "FIRK(NESTED)"
- "WRAPPERS"
uses: "SciML/.github/.github/workflows/tests.yml@v1"
with:
os: "${{ matrix.os }}"
group: "${{ matrix.group }}"
secrets: "inherit"
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BoundaryValueDiffEqODEInterfaceExt = "ODEInterface"
[compat]
ADTypes = "1.2"
Adapt = "4"
Aqua = "0.8"
Aqua = "0.8.7"
ArrayInterface = "7.7"
BandedMatrices = "1.4"
ConcreteStructs = "0.2.3"
Expand All @@ -51,7 +51,7 @@ LinearSolve = "2.21"
Logging = "1.10"
NonlinearSolve = "3.8.1"
ODEInterface = "0.5"
OrdinaryDiffEq = "6.63"
OrdinaryDiffEq = "6.88.1"
PreallocationTools = "0.4.24"
PrecompileTools = "1.2"
Preferences = "1.4"
Expand Down
19 changes: 12 additions & 7 deletions src/BoundaryValueDiffEq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ module BoundaryValueDiffEq

import PrecompileTools: @compile_workload, @setup_workload

using ADTypes, Adapt, ArrayInterface, DiffEqBase, ForwardDiff, LinearAlgebra, NonlinearSolve,
OrdinaryDiffEq, Preferences, RecursiveArrayTools, Reexport, SciMLBase, Setfield,
SparseDiffTools
using ADTypes, Adapt, ArrayInterface, DiffEqBase, ForwardDiff, LinearAlgebra,
NonlinearSolve, OrdinaryDiffEq, Preferences, RecursiveArrayTools, Reexport, SciMLBase,
Setfield, SparseDiffTools

using PreallocationTools: PreallocationTools, DiffCache

Expand All @@ -30,9 +30,12 @@ include("algorithms.jl")
include("alg_utils.jl")

include("mirk_tableaus.jl")
include("lobatto_tableaus.jl")
include("radau_tableaus.jl")

include("solve/single_shooting.jl")
include("solve/multiple_shooting.jl")
include("solve/firk.jl")
include("solve/mirk.jl")

include("collocation.jl")
Expand Down Expand Up @@ -108,8 +111,7 @@ end
resid[3] = solₜ₂[2] + 1.729109
return nothing
end
bc1_nlls = (sol, p, t) -> [
sol[:, 1][1], sol[:, end][1] - 1, sol[:, end][2] + 1.729109]
bc1_nlls = (sol, p, t) -> [sol[:, 1][1], sol[:, end][1] - 1, sol[:, end][2] + 1.729109]

bc1_nlls_a! = (resid, ua, p) -> (resid[1] = ua[1])
bc1_nlls_b! = (resid, ub, p) -> (resid[1] = ub[1] - 1;
Expand Down Expand Up @@ -205,8 +207,7 @@ end
resid[3] = solₜ₂[2] + 1.729109
return nothing
end
bc1_nlls = (sol, p, t) -> [
sol(0.0)[1], sol(100.0)[1] - 1, sol(1.0)[2] + 1.729109]
bc1_nlls = (sol, p, t) -> [sol(0.0)[1], sol(100.0)[1] - 1, sol(1.0)[2] + 1.729109]

tspan = (0.0, 100.0)
u0 = [0.0, 1.0]
Expand Down Expand Up @@ -273,6 +274,10 @@ export Shooting, MultipleShooting
export MIRK2, MIRK3, MIRK4, MIRK5, MIRK6
export BVPM2, BVPSOL, COLNEW # From ODEInterface.jl

export RadauIIa1, RadauIIa2, RadauIIa3, RadauIIa5, RadauIIa7
export LobattoIIIa2, LobattoIIIa3, LobattoIIIa4, LobattoIIIa5
export LobattoIIIb2, LobattoIIIb3, LobattoIIIb4, LobattoIIIb5
export LobattoIIIc2, LobattoIIIc3, LobattoIIIc4, LobattoIIIc5
export MIRKJacobianComputationAlgorithm, BVPJacobianAlgorithm

end
Loading

0 comments on commit 4590c02

Please sign in to comment.