Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache Radau Tableaus #2552

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions lib/OrdinaryDiffEqFIRK/src/firk_caches.jl
Original file line number Diff line number Diff line change
Expand Up @@ -518,18 +518,13 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}
end
num_stages = min_stages

tabs = [RadauIIATableau5(uToltype, constvalue(tTypeNoUnits)), RadauIIATableau9(uToltype, constvalue(tTypeNoUnits)), RadauIIATableau13(uToltype, constvalue(tTypeNoUnits))]
i = max(min_stages, 9)
while i <= max_stages
push!(tabs, RadauIIATableau(uToltype, constvalue(tTypeNoUnits), i))
i += 2
end
tabs = [RadauIIATableau(uToltype, constvalue(tTypeNoUnits), i) for i in min_stages:2:max_stages]
cont = Vector{typeof(u)}(undef, max_stages)
for i in 1:max_stages
cont[i] = zero(u)
end

index = min((min_stages - 1) ÷ 2, 4)
index = 1

κ = alg.κ !== nothing ? convert(uToltype, alg.κ) : convert(uToltype, 1 // 100)
J = false .* _vec(rate_prototype) .* _vec(rate_prototype)'
Expand Down Expand Up @@ -602,14 +597,9 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}
end
num_stages = min_stages

tabs = [RadauIIATableau5(uToltype, constvalue(tTypeNoUnits)), RadauIIATableau9(uToltype, constvalue(tTypeNoUnits)), RadauIIATableau13(uToltype, constvalue(tTypeNoUnits))]
i = max(min_stages, 9)
while i <= max_stages
push!(tabs, RadauIIATableau(uToltype, constvalue(tTypeNoUnits), i))
i += 2
end
tabs = [RadauIIATableau(uToltype, constvalue(tTypeNoUnits), i) for i in min_stages:2:max_stages]

index = min((min_stages - 1) ÷ 2, 4)
index = 1

κ = alg.κ !== nothing ? convert(uToltype, alg.κ) : convert(uToltype, 1 // 100)

Expand Down
Loading
Loading