@@ -1201,7 +1201,10 @@ Keyword arguments:
1201
1201
- `fully_determined`: Override whether the initialization system is fully determined.
1202
1202
- `check_initialization_units`: Enable or disable unit checks when constructing the
1203
1203
initialization problem.
1204
- - `tofloat`, `is_initializeprob`: Passed to [`better_varmap_to_vars`](@ref) for building `u0` (and possibly `p`).
1204
+ - `tofloat`: Passed to [`better_varmap_to_vars`](@ref) when building the parameter vector of
1205
+ a non-split system.
1206
+ - `u0_eltype`: The `eltype` of the `u0` vector. If `nothing`, finds the promoted floating point
1207
+ type from `op`.
1205
1208
- `u0_constructor`: A function to apply to the `u0` value returned from `better_varmap_to_vars`
1206
1209
to construct the final `u0` value.
1207
1210
- `p_constructor`: A function to apply to each array buffer created when constructing the parameter object.
@@ -1232,7 +1235,7 @@ function process_SciMLProblem(
1232
1235
implicit_dae = false , t = nothing , guesses = AnyDict (),
1233
1236
warn_initialize_determined = true , initialization_eqs = [],
1234
1237
eval_expression = false , eval_module = @__MODULE__ , fully_determined = nothing ,
1235
- check_initialization_units = false , tofloat = true ,
1238
+ check_initialization_units = false , u0_eltype = nothing , tofloat = true ,
1236
1239
u0_constructor = identity, p_constructor = identity,
1237
1240
check_length = true , symbolic_u0 = false , warn_cyclic_dependency = false ,
1238
1241
circular_dependency_max_cycle_length = length (all_symbols (sys)),
@@ -1275,6 +1278,8 @@ function process_SciMLProblem(
1275
1278
floatT = float_type_from_varmap (op, floatT)
1276
1279
end
1277
1280
1281
+ u0_eltype = something (u0_eltype, floatT)
1282
+
1278
1283
if ! is_time_dependent (sys) || is_initializesystem (sys)
1279
1284
add_observed_equations! (u0map, obs)
1280
1285
end
@@ -1324,7 +1329,7 @@ function process_SciMLProblem(
1324
1329
evaluate_varmap! (op, dvs; limit = substitution_limit)
1325
1330
1326
1331
u0 = better_varmap_to_vars (
1327
- op, dvs; tofloat, floatT ,
1332
+ op, dvs; buffer_eltype = u0_eltype ,
1328
1333
container_type = u0Type, allow_symbolic = symbolic_u0, is_initializeprob)
1329
1334
1330
1335
if u0 != = nothing
0 commit comments