Skip to content

Commit 8a4d1c3

Browse files
handle some composite cache caching
1 parent 8a0a2b5 commit 8a4d1c3

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

src/OrdinaryDiffEq.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ using DocStringExtensions
180180
du[3] = u[1]*u[2] - (8/3)*u[3]
181181
end
182182
lorenzprob = ODEProblem(lorenz,[1.0;0.0;0.0],(0.0,1.0))
183+
solve(lorenzprob,BS3())
183184
solve(lorenzprob,Tsit5())
184185
solve(lorenzprob,Vern7())
185186
solve(lorenzprob,Vern9())
@@ -188,6 +189,16 @@ using DocStringExtensions
188189
solve(lorenzprob,Rodas4(autodiff=false))
189190
solve(lorenzprob,KenCarp4(autodiff=false))
190191
solve(lorenzprob,Rodas5())
192+
solve(lorenzprob,QNDF())
193+
solve(lorenzprob,QNDF(autodiff=false))
194+
solve(lorenzprob,AutoTsit5(Rosenbrock23()))
195+
solve(lorenzprob,AutoTsit5(Rosenbrock23(autodiff=false)))
196+
solve(lorenzprob,AutoTsit5(TRBDF2(autodiff=false)))
197+
solve(lorenzprob,AutoVern7(Rodas4(autodiff=false)))
198+
solve(lorenzprob,AutoVern7(TRBDF2(autodiff=false)))
199+
solve(lorenzprob,AutoVern9(Rodas5(autodiff=false)))
200+
solve(lorenzprob,AutoVern9(KenCarp47(autodiff=false)))
201+
solve(lorenzprob,AutoVern7(Rodas5()))
191202
break
192203
end
193204
end

src/alg_utils.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ end
6363
issplit(alg::Union{OrdinaryDiffEqAlgorithm,DAEAlgorithm}) = false
6464
issplit(alg::SplitAlgorithms) = true
6565

66+
function _composite_beta1_default(algs::Tuple{T1,T2}, current, ::Type{QT}, beta2) where {T1, T2, QT}
67+
if current == 1
68+
return QT(beta1_default(algs[1], beta2))
69+
elseif current == 2
70+
return QT(beta1_default(algs[2], beta2))
71+
end
72+
end
73+
6674
@generated function _composite_beta1_default(algs::T, current, ::Type{QT}, beta2) where {T <: Tuple, QT}
6775
expr = Expr(:block)
6876
for i in 1:length(T.types)
@@ -74,6 +82,15 @@ issplit(alg::SplitAlgorithms) = true
7482
end
7583
return expr
7684
end
85+
86+
function _composite_beta2_default(algs::Tuple{T1,T2}, current, ::Type{QT}) where {T1, T2, QT}
87+
if current == 1
88+
return QT(beta2_default(algs[1]))
89+
elseif current == 2
90+
return QT(beta2_default(algs[2]))
91+
end
92+
end
93+
7794
@generated function _composite_beta2_default(algs::T, current, ::Type{QT}) where {T <: Tuple, QT}
7895
expr = Expr(:block)
7996
for i in 1:length(T.types)

0 commit comments

Comments
 (0)