@@ -817,7 +817,9 @@ function DiffEqBase.ODEProblem{iip, specialize}(sys::AbstractODESystem, u0map =
817
817
end
818
818
819
819
# 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)
821
823
end
822
824
get_callback (prob:: ODEProblem ) = prob. kwargs[:callback ]
823
825
@@ -1040,9 +1042,14 @@ function DiffEqBase.DAEProblem{iip}(sys::AbstractODESystem, du0map, u0map, tspan
1040
1042
end
1041
1043
1042
1044
# 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)
1046
1053
end
1047
1054
1048
1055
function generate_history (sys:: AbstractODESystem , u0; expression = Val{false }, kwargs... )
@@ -1088,7 +1095,9 @@ function DiffEqBase.DDEProblem{iip}(sys::AbstractODESystem, u0map = [],
1088
1095
kwargs1 = merge (kwargs1, (callback = cbs,))
1089
1096
end
1090
1097
# 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)
1092
1101
end
1093
1102
1094
1103
function DiffEqBase. SDDEProblem (sys:: AbstractODESystem , args... ; kwargs... )
@@ -1139,9 +1148,14 @@ function DiffEqBase.SDDEProblem{iip}(sys::AbstractODESystem, u0map = [],
1139
1148
noise_rate_prototype = zeros (eltype (u0), size (noiseeqs))
1140
1149
end
1141
1150
# 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)
1145
1159
end
1146
1160
1147
1161
"""
0 commit comments