1
- mutable struct TimeGradientWrapper{iip, fType, uType, P} <: AbstractSciMLFunction{iip}
1
+ abstract type AbstractWrappedFunction{iip} end
2
+ isinplace (f:: AbstractWrappedFunction{iip} ) where {iip} = iip
3
+ mutable struct TimeGradientWrapper{iip, fType, uType, P} <: AbstractWrappedFunction{iip}
2
4
f:: fType
3
5
uprev:: uType
4
6
p:: P
18
20
19
21
(ff:: TimeGradientWrapper{false} )(t) = ff. f (ff. uprev, ff. p, t)
20
22
21
- mutable struct UJacobianWrapper{iip, fType, tType, P} <: AbstractSciMLFunction {iip}
23
+ mutable struct UJacobianWrapper{iip, fType, tType, P} <: AbstractWrappedFunction {iip}
22
24
f:: fType
23
25
t:: tType
24
26
p:: P
41
43
(ff:: UJacobianWrapper{false} )(uprev) = ff. f (uprev, ff. p, ff. t)
42
44
(ff:: UJacobianWrapper{false} )(uprev, p, t) = ff. f (uprev, p, t)
43
45
44
- mutable struct TimeDerivativeWrapper{iip, F, uType, P} <: AbstractSciMLFunction {iip}
46
+ mutable struct TimeDerivativeWrapper{iip, F, uType, P} <: AbstractWrappedFunction {iip}
45
47
f:: F
46
48
u:: uType
47
49
p:: P
58
60
(ff:: TimeDerivativeWrapper{true} )(du1, t) = ff. f (du1, ff. u, ff. p, t)
59
61
(ff:: TimeDerivativeWrapper{true} )(t) = (du1 = similar (ff. u); ff. f (du1, ff. u, ff. p, t); du1)
60
62
61
- mutable struct UDerivativeWrapper{iip, F, tType, P} <: AbstractSciMLFunction {iip}
63
+ mutable struct UDerivativeWrapper{iip, F, tType, P} <: AbstractWrappedFunction {iip}
62
64
f:: F
63
65
t:: tType
64
66
p:: P
@@ -73,7 +75,7 @@ UDerivativeWrapper(f::F, t, p) where {F} = UDerivativeWrapper{isinplace(f, 4)}(f
73
75
(ff:: UDerivativeWrapper{true} )(du1, u) = ff. f (du1, u, ff. p, ff. t)
74
76
(ff:: UDerivativeWrapper{true} )(u) = (du1 = similar (u); ff. f (du1, u, ff. p, ff. t); du1)
75
77
76
- mutable struct ParamJacobianWrapper{iip, fType, tType, uType} <: AbstractSciMLFunction {iip}
78
+ mutable struct ParamJacobianWrapper{iip, fType, tType, uType} <: AbstractWrappedFunction {iip}
77
79
f:: fType
78
80
t:: tType
79
81
u:: uType
@@ -95,7 +97,7 @@ function (ff::ParamJacobianWrapper{false})(du1, p)
95
97
du1 .= ff. f (ff. u, p, ff. t)
96
98
end
97
99
98
- mutable struct JacobianWrapper{iip, fType, pType} <: AbstractSciMLFunction {iip}
100
+ mutable struct JacobianWrapper{iip, fType, pType} <: AbstractWrappedFunction {iip}
99
101
f:: fType
100
102
p:: pType
101
103
end
0 commit comments