@@ -817,7 +817,9 @@ function DiffEqBase.ODEProblem{iip, specialize}(sys::AbstractODESystem, u0map =
817817 end
818818
819819 # Call `remake` so it runs initialization if it is trivial
820- return remake (ODEProblem {iip} (f, u0, tspan, p, pt; kwargs1... , kwargs... ))
820+ # Pass `u0` and `p` to run `ReconstructInitializeprob` which will promote
821+ # u0 and p of initializeprob
822+ return remake (ODEProblem {iip} (f, u0, tspan, p, pt; kwargs1... , kwargs... ); u0, p)
821823end
822824get_callback (prob:: ODEProblem ) = prob. kwargs[:callback ]
823825
@@ -1040,9 +1042,14 @@ function DiffEqBase.DAEProblem{iip}(sys::AbstractODESystem, du0map, u0map, tspan
10401042 end
10411043
10421044 # Call `remake` so it runs initialization if it is trivial
1043- return remake (DAEProblem {iip} (
1044- f, du0, u0, tspan, p; differential_vars = differential_vars,
1045- kwargs... , kwargs1... ))
1045+ # Pass `u0` and `p` to run `ReconstructInitializeprob` which will promote
1046+ # u0 and p of initializeprob
1047+ return remake (
1048+ DAEProblem {iip} (
1049+ f, du0, u0, tspan, p; differential_vars = differential_vars,
1050+ kwargs... , kwargs1... );
1051+ u0,
1052+ p)
10461053end
10471054
10481055function generate_history (sys:: AbstractODESystem , u0; expression = Val{false }, kwargs... )
@@ -1088,7 +1095,9 @@ function DiffEqBase.DDEProblem{iip}(sys::AbstractODESystem, u0map = [],
10881095 kwargs1 = merge (kwargs1, (callback = cbs,))
10891096 end
10901097 # Call `remake` so it runs initialization if it is trivial
1091- return remake (DDEProblem {iip} (f, u0, h, tspan, p; kwargs1... , kwargs... ))
1098+ # Pass `u0` and `p` to run `ReconstructInitializeprob` which will promote
1099+ # u0 and p of initializeprob
1100+ return remake (DDEProblem {iip} (f, u0, h, tspan, p; kwargs1... , kwargs... ); u0, p)
10921101end
10931102
10941103function DiffEqBase. SDDEProblem (sys:: AbstractODESystem , args... ; kwargs... )
@@ -1139,9 +1148,14 @@ function DiffEqBase.SDDEProblem{iip}(sys::AbstractODESystem, u0map = [],
11391148 noise_rate_prototype = zeros (eltype (u0), size (noiseeqs))
11401149 end
11411150 # Call `remake` so it runs initialization if it is trivial
1142- return remake (SDDEProblem {iip} (f, f. g, u0, h, tspan, p;
1143- noise_rate_prototype =
1144- noise_rate_prototype, kwargs1... , kwargs... ))
1151+ # Pass `u0` and `p` to run `ReconstructInitializeprob` which will promote
1152+ # u0 and p of initializeprob
1153+ return remake (
1154+ SDDEProblem {iip} (f, f. g, u0, h, tspan, p;
1155+ noise_rate_prototype =
1156+ noise_rate_prototype, kwargs1... , kwargs... );
1157+ u0,
1158+ p)
11451159end
11461160
11471161"""
0 commit comments