@@ -216,8 +216,10 @@ Keyword arguments:
216
216
If the former is `nothing`, this keyword argument will be used. If it is also not provided,
217
217
an error will be thrown.
218
218
219
+ All additional keyword arguments are forwarded to `solve`.
220
+
219
221
In case the initialization problem is trivial, `nlsolve_alg`, `abstol` and `reltol` are
220
- not required.
222
+ not required. `solve` is also not called.
221
223
"""
222
224
function get_initial_values (prob, valp, f, alg:: OverrideInit ,
223
225
iip:: Union{Val{true}, Val{false}} ; nlsolve_alg = nothing , abstol = nothing , reltol = nothing , kwargs... )
@@ -257,7 +259,7 @@ function get_initial_values(prob, valp, f, alg::OverrideInit,
257
259
else
258
260
throw (OverrideInitNoTolerance (:reltol ))
259
261
end
260
- nlsol = solve (initprob, nlsolve_alg; abstol = _abstol, reltol = _reltol)
262
+ nlsol = solve (initprob, nlsolve_alg; abstol = _abstol, reltol = _reltol, kwargs ... )
261
263
success = SciMLBase. successful_retcode (nlsol)
262
264
end
263
265
@@ -304,7 +306,8 @@ function initialization_status(prob::AbstractSciMLProblem)
304
306
iprob = prob. f. initialization_data. initializeprob
305
307
isnothing (prob) && return nothing
306
308
307
- nunknowns = iprob. u0 === nothing ? 0 : length (iprob. u0)
309
+ iu0 = state_values (iprob)
310
+ nunknowns = iu0 === nothing ? 0 : length (iu0)
308
311
neqs = if __has_resid_prototype (iprob. f) && iprob. f. resid_prototype != = nothing
309
312
length (iprob. f. resid_prototype)
310
313
else
0 commit comments