Skip to content

Commit 3c333b7

Browse files
feat: add initialization_data, sys to SDEFunctionWrapper
1 parent aa87692 commit 3c333b7

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

src/functionwrapper.jl

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end
99
(g::SDEDiffusionTermWrapper{false})(u, p, t) = g.g(u, g.h, p, t)
1010

1111
struct SDEFunctionWrapper{iip, F, G, H, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, TWt, TPJ, GG,
12-
TCV} <: DiffEqBase.AbstractRODEFunction{iip}
12+
TCV, ID, S} <: DiffEqBase.AbstractRODEFunction{iip}
1313
f::F
1414
g::G
1515
h::H
@@ -26,6 +26,8 @@ struct SDEFunctionWrapper{iip, F, G, H, TMM, Ta, Tt, TJ, JVP, VJP, JP, SP, TW, T
2626
paramjac::TPJ
2727
ggprime::GG
2828
colorvec::TCV
29+
initialization_data::ID
30+
sys::S
2931
end
3032

3133
(f::SDEFunctionWrapper{true})(du, u, p, t) = f.f(du, u, f.h, p, t)
@@ -53,17 +55,9 @@ function wrap_functions_and_history(f::SDDEFunction, g, h)
5355
typeof(f.analytic), typeof(f.tgrad), typeof(jac), typeof(f.jvp),
5456
typeof(f.vjp), typeof(f.jac_prototype), typeof(f.sparsity),
5557
typeof(f.Wfact), typeof(f.Wfact_t), typeof(f.paramjac),
56-
typeof(f.ggprime), typeof(f.colorvec)}(f.f, gwh, h,
57-
f.mass_matrix,
58-
f.analytic,
59-
f.tgrad, jac,
60-
f.jvp, f.vjp,
61-
f.jac_prototype,
62-
f.sparsity,
63-
f.Wfact,
64-
f.Wfact_t,
65-
f.paramjac,
66-
f.ggprime,
67-
f.colorvec),
58+
typeof(f.ggprime), typeof(f.colorvec), typeof(f.initialization_data),
59+
typeof(f.sys)}(f.f, gwh, h, f.mass_matrix, f.analytic, f.tgrad, jac,
60+
f.jvp, f.vjp, f.jac_prototype, f.sparsity, f.Wfact, f.Wfact_t, f.paramjac,
61+
f.ggprime, f.colorvec, f.initialization_data, f.sys),
6862
gwh
6963
end

0 commit comments

Comments
 (0)