Skip to content

Commit fca98e0

Browse files
committed
fix: don't propagate for u0
1 parent 4aa47d6 commit fca98e0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/systems/problem_utils.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,10 @@ in `varmap`. Does not perform symbolic substitution in the values of `varmap`.
351351
352352
Keyword arguments:
353353
- `tofloat`: Convert values to floating point numbers using `float`.
354-
- `use_union`: Use a `Union`-typed array if the values have heterogeneous types.
355354
- `container_type`: The type of container to use for the values.
356355
- `toterm`: The `toterm` method to use for converting symbolics.
357356
- `promotetoconcrete`: whether the promote to a concrete buffer (respecting
358-
`tofloat` and `use_union`). Defaults to `container_type <: AbstractArray`.
357+
`tofloat`). Defaults to `container_type <: AbstractArray`.
359358
- `check`: Error if any variables in `vars` do not have a mapping in `varmap`. Uses
360359
[`missingvars`](@ref) to perform the check.
361360
- `allow_symbolic` allows the returned array to contain symbolic values. If this is `true`,
@@ -393,7 +392,7 @@ function better_varmap_to_vars(varmap::AbstractDict, vars::Vector;
393392

394393
promotetoconcrete === nothing && (promotetoconcrete = container_type <: AbstractArray)
395394
if promotetoconcrete && !allow_symbolic
396-
vals = promote_to_concrete(vals; tofloat = tofloat, use_union = use_union)
395+
vals = promote_to_concrete(vals; tofloat = tofloat, use_union = false)
397396
end
398397

399398
if isempty(vals)
@@ -841,11 +840,15 @@ function process_SciMLProblem(
841840
evaluate_varmap!(op, dvs; limit = substitution_limit)
842841

843842
u0 = better_varmap_to_vars(
843+
<<<<<<< HEAD
844844
<<<<<<< HEAD
845845
op, dvs; tofloat = true, use_union = false,
846846
container_type = u0Type, allow_symbolic = symbolic_u0, is_initializeprob)
847847
=======
848848
op, dvs; tofloat, use_union,
849+
=======
850+
op, dvs; tofloat, use_union = false,
851+
>>>>>>> 6951e652f2 (fix: don't propagate for u0)
849852
container_type = u0Type, allow_symbolic = symbolic_u0)
850853
>>>>>>> e31ae1bcc9 (fix: propagate `tofloat`, `use_union` to `better_varmap_to_vars`)
851854

0 commit comments

Comments
 (0)