Skip to content

Commit 8c00b6f

Browse files
Suggested changes made
1 parent a5a09fd commit 8c00b6f

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

lib/OrdinaryDiffEqFIRK/src/OrdinaryDiffEqFIRK.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import OrdinaryDiffEq: alg_order, calculate_residuals!,
1313
NLStatus, qmax_default, alg_adaptive_order, DEFAULT_PRECS,
1414
UJacobianWrapper, build_J_W, build_jac_config, UDerivativeWrapper,
1515
Convergence, calc_J!, dolinsolve, FastConvergence, calc_J,
16-
mul!
16+
mul!, PredictiveController
1717
using MuladdMacro, DiffEqBase, RecursiveArrayTools
1818
using SciMLOperators: AbstractSciMLOperator
1919
using LinearAlgebra: I, UniformScaling

lib/OrdinaryDiffEqFIRK/src/alg_utils.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ alg_order(alg::RadauIIA3) = 3
44
alg_order(alg::RadauIIA5) = 5
55
alg_order(alg::RadauIIA7) = 7
66

7+
isfirk(alg::RadauIIA3) = true
8+
isfirk(alg::RadauIIA5) = true
9+
isfirk(alg::RadauIIA7) = true
10+
711
alg_adaptive_order(alg::RadauIIA3) = 1
812
alg_adaptive_order(alg::RadauIIA5) = 3
913
alg_adaptive_order(alg::RadauIIA7) = 5

lib/OrdinaryDiffEqFIRK/src/controllers.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
struct PredictiveController <: AbstractController
2-
end
3-
41
@inline function stepsize_controller!(integrator, controller::PredictiveController, alg)
52
@unpack qmin, qmax, gamma = integrator.opts
63
EEst = DiffEqBase.value(integrator.EEst)
@@ -11,7 +8,7 @@ end
118
if fac_default_gamma(alg)
129
fac = gamma
1310
else
14-
if alg isa Union{RadauIIA3, RadauIIA5, RadauIIA7}
11+
if isfirk(alg::Union{RadauIIA3, RadauIIA5, RadauIIA7})
1512
@unpack iter = integrator.cache
1613
@unpack maxiters = alg
1714
else

src/alg_utils.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ isfsal(alg::PSRK3p5q4) = false
5050
isfsal(alg::PSRK3p6q5) = false
5151
isfsal(alg::PSRK4p7q6) = false
5252

53+
isfirk(alg) = false
54+
5355
get_current_isfsal(alg, cache) = isfsal(alg)
5456

5557
# evaluates f(t[i])

src/integrators/controllers.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
abstract type AbstractController end
22
using OrdinaryDiffEq
33

4-
struct PredictiveController <: AbstractController
5-
end
6-
74
@inline function stepsize_controller!(integrator, alg)
85
stepsize_controller!(integrator, integrator.opts.controller, alg)
96
end
@@ -397,6 +394,9 @@ end
397394
```
398395
"""
399396

397+
struct PredictiveController <: AbstractController
398+
end
399+
400400
# Dummy controller without any method implementations.
401401
# This is used to transfer the special controllers associated to certain
402402
# algorithms to the new controller infrastructure with

0 commit comments

Comments
 (0)