Skip to content

Commit ef5326b

Browse files
fix: promote Initials portion in ReconstructInitializeprob
1 parent 793abb5 commit ef5326b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/systems/nonlinear/initializesystem.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,15 @@ function (rip::ReconstructInitializeprob)(srcvalp, dstvalp)
338338
end
339339
buf, repack, alias = SciMLStructures.canonicalize(SciMLStructures.Tunable(), newp)
340340
if eltype(buf) != T
341-
newp = repack(T.(buf))
341+
newbuf = similar(buf, T)
342+
copyto!(newbuf, buf)
343+
newp = repack(newbuf)
344+
end
345+
buf, repack, alias = SciMLStructures.canonicalize(SciMLStructures.Initials(), newp)
346+
if eltype(buf) != T
347+
newbuf = similar(buf, T)
348+
copyto!(newbuf, buf)
349+
newp = repack(newbuf)
342350
end
343351
return u0, newp
344352
end

0 commit comments

Comments
 (0)