@@ -524,6 +524,11 @@ keyword arguments.
524524
525525Should be called before the problem is solved, after performing type-promotion on the
526526problem.
527+
528+ # Keyword Arguments
529+
530+ - `u0`, `p`: Override values for `state_values(prob)` and `parameter_values(prob)` which
531+ should be used instead of the ones in `prob`.
527532"""
528533function get_updated_symbolic_problem (indp, prob; kw... )
529534 return prob
@@ -1239,27 +1244,30 @@ function checkkwargs(kwargshandle; kwargs...)
12391244end
12401245
12411246function get_concrete_problem (prob:: AbstractJumpProblem , isadapt; kwargs... )
1242- get_updated_symbolic_problem (_get_root_indp (prob), prob)
1247+ get_updated_symbolic_problem (_get_root_indp (prob), prob; kwargs ... )
12431248end
12441249
12451250function get_concrete_problem (prob:: SteadyStateProblem , isadapt; kwargs... )
1246- prob = get_updated_symbolic_problem (_get_root_indp (prob), prob)
1251+ prob = get_updated_symbolic_problem (_get_root_indp (prob), prob; kwargs... )
1252+ kwargs = (; kwargs... , u0 = SII. state_values (prob), p = SII. parameter_values (prob))
12471253 p = get_concrete_p (prob, kwargs)
12481254 u0 = get_concrete_u0 (prob, isadapt, Inf , kwargs)
12491255 u0 = promote_u0 (u0, p, nothing )
12501256 remake (prob; u0 = u0, p = p)
12511257end
12521258
12531259function get_concrete_problem (prob:: NonlinearProblem , isadapt; kwargs... )
1254- prob = get_updated_symbolic_problem (_get_root_indp (prob), prob)
1260+ prob = get_updated_symbolic_problem (_get_root_indp (prob), prob; kwargs... )
1261+ kwargs = (; kwargs... , u0 = SII. state_values (prob), p = SII. parameter_values (prob))
12551262 p = get_concrete_p (prob, kwargs)
12561263 u0 = get_concrete_u0 (prob, isadapt, nothing , kwargs)
12571264 u0 = promote_u0 (u0, p, nothing )
12581265 remake (prob; u0 = u0, p = p)
12591266end
12601267
12611268function get_concrete_problem (prob:: NonlinearLeastSquaresProblem , isadapt; kwargs... )
1262- prob = get_updated_symbolic_problem (_get_root_indp (prob), prob)
1269+ prob = get_updated_symbolic_problem (_get_root_indp (prob), prob; kwargs... )
1270+ kwargs = (; kwargs... , u0 = SII. state_values (prob), p = SII. parameter_values (prob))
12631271 p = get_concrete_p (prob, kwargs)
12641272 u0 = get_concrete_u0 (prob, isadapt, nothing , kwargs)
12651273 u0 = promote_u0 (u0, p, nothing )
@@ -1281,7 +1289,8 @@ function init(prob::PDEProblem, alg::AbstractDEAlgorithm, args...;
12811289end
12821290
12831291function get_concrete_problem (prob, isadapt; kwargs... )
1284- prob = get_updated_symbolic_problem (_get_root_indp (prob), prob)
1292+ prob = get_updated_symbolic_problem (_get_root_indp (prob), prob; kwargs... )
1293+ kwargs = (; kwargs... , u0 = SII. state_values (prob), p = SII. parameter_values (prob))
12851294 p = get_concrete_p (prob, kwargs)
12861295 tspan = get_concrete_tspan (prob, isadapt, kwargs, p)
12871296 u0 = get_concrete_u0 (prob, isadapt, tspan[1 ], kwargs)
@@ -1300,7 +1309,8 @@ function get_concrete_problem(prob, isadapt; kwargs...)
13001309end
13011310
13021311function get_concrete_problem (prob:: DAEProblem , isadapt; kwargs... )
1303- prob = get_updated_symbolic_problem (_get_root_indp (prob), prob)
1312+ prob = get_updated_symbolic_problem (_get_root_indp (prob), prob; kwargs... )
1313+ kwargs = (; kwargs... , u0 = SII. state_values (prob), p = SII. parameter_values (prob))
13041314 p = get_concrete_p (prob, kwargs)
13051315 tspan = get_concrete_tspan (prob, isadapt, kwargs, p)
13061316 u0 = get_concrete_u0 (prob, isadapt, tspan[1 ], kwargs)
@@ -1324,7 +1334,8 @@ function get_concrete_problem(prob::DAEProblem, isadapt; kwargs...)
13241334end
13251335
13261336function get_concrete_problem (prob:: DDEProblem , isadapt; kwargs... )
1327- prob = get_updated_symbolic_problem (_get_root_indp (prob), prob)
1337+ prob = get_updated_symbolic_problem (_get_root_indp (prob), prob; kwargs... )
1338+ kwargs = (; kwargs... , u0 = SII. state_values (prob), p = SII. parameter_values (prob))
13281339 p = get_concrete_p (prob, kwargs)
13291340 tspan = get_concrete_tspan (prob, isadapt, kwargs, p)
13301341 u0 = get_concrete_u0 (prob, isadapt, tspan[1 ], kwargs)
0 commit comments