@@ -100,7 +100,8 @@ Check if the algebraic constraints are satisfied, and error if they aren't. Retu
100
100
the `u0` and `p` as-is, and is always successful if it returns. Valid only for
101
101
`ODEProblem` and `DAEProblem`. Requires a `DEIntegrator` as its second argument.
102
102
"""
103
- function get_initial_values (prob:: AbstractODEProblem , integrator, f, alg:: CheckInit ,
103
+ function get_initial_values (
104
+ prob:: AbstractDEProblem , integrator:: DEIntegrator , f, alg:: CheckInit ,
104
105
isinplace:: Union{Val{true}, Val{false}} ; kwargs... )
105
106
u0 = state_values (integrator)
106
107
p = parameter_values (integrator)
@@ -109,7 +110,7 @@ function get_initial_values(prob::AbstractODEProblem, integrator, f, alg::CheckI
109
110
110
111
algebraic_vars = [all (iszero, x) for x in eachcol (M)]
111
112
algebraic_eqs = [all (iszero, x) for x in eachrow (M)]
112
- (iszero (algebraic_vars) || iszero (algebraic_eqs)) && return
113
+ (iszero (algebraic_vars) || iszero (algebraic_eqs)) && return u0, p, true
113
114
update_coefficients! (M, u0, p, t)
114
115
tmp = _evaluate_f_ode (integrator, f, isinplace, u0, p, t)
115
116
tmp .= ArrayInterface. restructure (tmp, algebraic_eqs .* _vec (tmp))
@@ -135,7 +136,8 @@ function _evaluate_f_dae(integrator, f, isinplace::Val{false}, args...)
135
136
return f (args... )
136
137
end
137
138
138
- function get_initial_values (prob:: AbstractDAEProblem , integrator, f, alg:: CheckInit ,
139
+ function get_initial_values (
140
+ prob:: AbstractDAEProblem , integrator:: DEIntegrator , f, alg:: CheckInit ,
139
141
isinplace:: Union{Val{true}, Val{false}} ; kwargs... )
140
142
u0 = state_values (integrator)
141
143
p = parameter_values (integrator)
0 commit comments