@@ -2258,33 +2258,33 @@ end
2258
2258
# ######## Basic Constructor
2259
2259
2260
2260
function ODEFunction {iip, specialize} (f;
2261
- mass_matrix = __has_mass_matrix (f) ? f. mass_matrix :
2262
- I,
2263
- analytic = __has_analytic (f) ? f. analytic : nothing ,
2264
- tgrad = __has_tgrad (f) ? f. tgrad : nothing ,
2265
- jac = __has_jac (f) ? f. jac : nothing ,
2266
- jvp = __has_jvp (f) ? f. jvp : nothing ,
2267
- vjp = __has_vjp (f) ? f. vjp : nothing ,
2268
- jac_prototype = __has_jac_prototype (f) ?
2269
- f. jac_prototype :
2270
- nothing ,
2271
- sparsity = __has_sparsity (f) ? f. sparsity :
2272
- jac_prototype,
2273
- Wfact = __has_Wfact (f) ? f. Wfact : nothing ,
2274
- Wfact_t = __has_Wfact_t (f) ? f. Wfact_t : nothing ,
2275
- W_prototype = __has_W_prototype (f) ? f. W_prototype : nothing ,
2276
- paramjac = __has_paramjac (f) ? f. paramjac : nothing ,
2277
- syms = nothing ,
2278
- indepsym = nothing ,
2279
- paramsyms = nothing ,
2280
- observed = __has_observed (f) ? f. observed :
2281
- DEFAULT_OBSERVED,
2282
- colorvec = __has_colorvec (f) ? f. colorvec : nothing ,
2283
- sys = __has_sys (f) ? f. sys : nothing ,
2284
- initializeprob = __has_initializeprob (f) ? f. sys : nothing ,
2285
- initializeprobmap = __has_initializeprobmap (f) ? f. sys : nothing
2286
- ) where {iip,
2287
- specialize,
2261
+ mass_matrix = __has_mass_matrix (f) ? f. mass_matrix :
2262
+ I,
2263
+ analytic = __has_analytic (f) ? f. analytic : nothing ,
2264
+ tgrad = __has_tgrad (f) ? f. tgrad : nothing ,
2265
+ jac = __has_jac (f) ? f. jac : nothing ,
2266
+ jvp = __has_jvp (f) ? f. jvp : nothing ,
2267
+ vjp = __has_vjp (f) ? f. vjp : nothing ,
2268
+ jac_prototype = __has_jac_prototype (f) ?
2269
+ f. jac_prototype :
2270
+ nothing ,
2271
+ sparsity = __has_sparsity (f) ? f. sparsity :
2272
+ jac_prototype,
2273
+ Wfact = __has_Wfact (f) ? f. Wfact : nothing ,
2274
+ Wfact_t = __has_Wfact_t (f) ? f. Wfact_t : nothing ,
2275
+ W_prototype = __has_W_prototype (f) ? f. W_prototype : nothing ,
2276
+ paramjac = __has_paramjac (f) ? f. paramjac : nothing ,
2277
+ syms = nothing ,
2278
+ indepsym = nothing ,
2279
+ paramsyms = nothing ,
2280
+ observed = __has_observed (f) ? f. observed :
2281
+ DEFAULT_OBSERVED,
2282
+ colorvec = __has_colorvec (f) ? f. colorvec : nothing ,
2283
+ sys = __has_sys (f) ? f. sys : nothing ,
2284
+ initializeprob = __has_initializeprob (f) ? f. sys : nothing ,
2285
+ initializeprobmap = __has_initializeprobmap (f) ? f. sys : nothing
2286
+ ) where {iip,
2287
+ specialize
2288
2288
}
2289
2289
if mass_matrix === I && f isa Tuple
2290
2290
mass_matrix = ((I for i in 1 : length (f)). .. ,)
@@ -2330,7 +2330,8 @@ function ODEFunction{iip, specialize}(f;
2330
2330
2331
2331
sys = something (sys, SymbolCache (syms, paramsyms, indepsym))
2332
2332
2333
- @assert typeof (initializeprob) <: Union{Nothing, NonlinearProblem, NonlinearLeastSquaresProblem}
2333
+ @assert typeof (initializeprob) < :
2334
+ Union{Nothing, NonlinearProblem, NonlinearLeastSquaresProblem}
2334
2335
2335
2336
if specialize === NoSpecialize
2336
2337
ODEFunction{iip, specialize,
@@ -2354,7 +2355,7 @@ function ODEFunction{iip, specialize}(f;
2354
2355
typeof (sys), typeof (initializeprob),
2355
2356
typeof (initializeprobmap)}(_f, mass_matrix, analytic, tgrad, jac,
2356
2357
jvp, vjp, jac_prototype, sparsity, Wfact,
2357
- Wfact_t, W_prototype, paramjac,
2358
+ Wfact_t, W_prototype, paramjac,
2358
2359
observed, _colorvec, sys, initializeprob, initializeprobmap)
2359
2360
else
2360
2361
ODEFunction{iip, specialize,
@@ -2367,7 +2368,7 @@ function ODEFunction{iip, specialize}(f;
2367
2368
typeof (sys), typeof (initializeprob),
2368
2369
typeof (initializeprobmap)}(_f, mass_matrix, analytic, tgrad, jac,
2369
2370
jvp, vjp, jac_prototype, sparsity, Wfact,
2370
- Wfact_t, W_prototype, paramjac,
2371
+ Wfact_t, W_prototype, paramjac,
2371
2372
observed, _colorvec, sys, initializeprob, initializeprobmap)
2372
2373
end
2373
2374
end
@@ -3225,7 +3226,8 @@ function DAEFunction{iip, specialize}(f;
3225
3226
_f = prepare_function (f)
3226
3227
sys = sys_or_symbolcache (sys, syms, paramsyms, indepsym)
3227
3228
3228
- @assert typeof (initializeprob) <: Union{Nothing, NonlinearProblem, NonlinearLeastSquaresProblem}
3229
+ @assert typeof (initializeprob) < :
3230
+ Union{Nothing, NonlinearProblem, NonlinearLeastSquaresProblem}
3229
3231
3230
3232
if specialize === NoSpecialize
3231
3233
DAEFunction{iip, specialize, Any, Any, Any,
@@ -3978,8 +3980,12 @@ has_Wfact(f::AbstractSciMLFunction) = __has_Wfact(f) && f.Wfact !== nothing
3978
3980
has_Wfact_t (f:: AbstractSciMLFunction ) = __has_Wfact_t (f) && f. Wfact_t != = nothing
3979
3981
has_paramjac (f:: AbstractSciMLFunction ) = __has_paramjac (f) && f. paramjac != = nothing
3980
3982
has_sys (f:: AbstractSciMLFunction ) = __has_sys (f) && f. sys != = nothing
3981
- has_initializeprob (f:: AbstractSciMLFunction ) = __has_initializeprob (f) && f. initializeprob != = nothing
3982
- has_initializeprobmap (f:: AbstractSciMLFunction ) = __has_initializeprobmap (f) && f. initializeprobmap != = nothing
3983
+ function has_initializeprob (f:: AbstractSciMLFunction )
3984
+ __has_initializeprob (f) && f. initializeprob != = nothing
3985
+ end
3986
+ function has_initializeprobmap (f:: AbstractSciMLFunction )
3987
+ __has_initializeprobmap (f) && f. initializeprobmap != = nothing
3988
+ end
3983
3989
3984
3990
function has_syms (f:: AbstractSciMLFunction )
3985
3991
if __has_syms (f)
0 commit comments