Skip to content

Commit e07a234

Browse files
refactor: change remake_initialization_data
1 parent c15f8a4 commit e07a234

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/remake.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function remake(prob::ODEProblem; f = missing,
126126
if f === missing
127127
if build_initializeprob
128128
initialization_data = remake_initialization_data(
129-
prob.f.sys, prob.f, u0, tspan[1], p)
129+
prob.f.sys, prob.f, u0, tspan[1], p, newu0, newp)
130130
else
131131
initialization_data = nothing
132132
end
@@ -203,16 +203,17 @@ function remake_initializeprob(sys, scimlfn, u0, t0, p)
203203
end
204204

205205
"""
206-
remake_initialization_data(sys, scimlfn, u0, t0, p)
206+
remake_initialization_data(sys, scimlfn, u0, t0, p, newu0, newp)
207207
208208
Re-create the initialization data present in the function `scimlfn`, using the
209-
associated system `sys` and the user provided new values of `u0`, initial time `t0` and
210-
`p`. By default, this calls `remake_initializeprob` for backward compatibility and
211-
attempts to construct an `OverrideInitData` from the result.
209+
associated system `sys`, the user provided new values of `u0`, initial time `t0`,
210+
user-provided `p`, new u0 vector `newu0` and new parameter object `newp`. By default,
211+
this calls `remake_initializeprob` for backward compatibility and attempts to construct
212+
an `OverrideInitData` from the result.
212213
213214
Note that `u0` or `p` may be `missing` if the user does not provide a value for them.
214215
"""
215-
function remake_initialization_data(sys, scimlfn, u0, t0, p)
216+
function remake_initialization_data(sys, scimlfn, u0, t0, p, newu0, newp)
216217
return reconstruct_initialization_data(
217218
nothing, remake_initializeprob(sys, scimlfn, u0, t0, p)...)
218219
end

0 commit comments

Comments
 (0)