Skip to content

Commit a5f2942

Browse files
format
1 parent 5b80eb8 commit a5f2942

File tree

1 file changed

+39
-33
lines changed

1 file changed

+39
-33
lines changed

src/scimlfunctions.jl

Lines changed: 39 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,33 +2258,33 @@ end
22582258
######### Basic Constructor
22592259

22602260
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
22882288
}
22892289
if mass_matrix === I && f isa Tuple
22902290
mass_matrix = ((I for i in 1:length(f))...,)
@@ -2330,7 +2330,8 @@ function ODEFunction{iip, specialize}(f;
23302330

23312331
sys = something(sys, SymbolCache(syms, paramsyms, indepsym))
23322332

2333-
@assert typeof(initializeprob) <: Union{Nothing, NonlinearProblem, NonlinearLeastSquaresProblem}
2333+
@assert typeof(initializeprob) <:
2334+
Union{Nothing, NonlinearProblem, NonlinearLeastSquaresProblem}
23342335

23352336
if specialize === NoSpecialize
23362337
ODEFunction{iip, specialize,
@@ -2354,7 +2355,7 @@ function ODEFunction{iip, specialize}(f;
23542355
typeof(sys), typeof(initializeprob),
23552356
typeof(initializeprobmap)}(_f, mass_matrix, analytic, tgrad, jac,
23562357
jvp, vjp, jac_prototype, sparsity, Wfact,
2357-
Wfact_t, W_prototype, paramjac,
2358+
Wfact_t, W_prototype, paramjac,
23582359
observed, _colorvec, sys, initializeprob, initializeprobmap)
23592360
else
23602361
ODEFunction{iip, specialize,
@@ -2367,7 +2368,7 @@ function ODEFunction{iip, specialize}(f;
23672368
typeof(sys), typeof(initializeprob),
23682369
typeof(initializeprobmap)}(_f, mass_matrix, analytic, tgrad, jac,
23692370
jvp, vjp, jac_prototype, sparsity, Wfact,
2370-
Wfact_t, W_prototype, paramjac,
2371+
Wfact_t, W_prototype, paramjac,
23712372
observed, _colorvec, sys, initializeprob, initializeprobmap)
23722373
end
23732374
end
@@ -3225,7 +3226,8 @@ function DAEFunction{iip, specialize}(f;
32253226
_f = prepare_function(f)
32263227
sys = sys_or_symbolcache(sys, syms, paramsyms, indepsym)
32273228

3228-
@assert typeof(initializeprob) <: Union{Nothing, NonlinearProblem, NonlinearLeastSquaresProblem}
3229+
@assert typeof(initializeprob) <:
3230+
Union{Nothing, NonlinearProblem, NonlinearLeastSquaresProblem}
32293231

32303232
if specialize === NoSpecialize
32313233
DAEFunction{iip, specialize, Any, Any, Any,
@@ -3978,8 +3980,12 @@ has_Wfact(f::AbstractSciMLFunction) = __has_Wfact(f) && f.Wfact !== nothing
39783980
has_Wfact_t(f::AbstractSciMLFunction) = __has_Wfact_t(f) && f.Wfact_t !== nothing
39793981
has_paramjac(f::AbstractSciMLFunction) = __has_paramjac(f) && f.paramjac !== nothing
39803982
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
39833989

39843990
function has_syms(f::AbstractSciMLFunction)
39853991
if __has_syms(f)

0 commit comments

Comments
 (0)