@@ -191,21 +191,13 @@ end
191191 ss1. state_map == ss2. state_map
192192 end
193193
194- ode_sol = solve (prob, Tsit5 (); save_idxs = xidx)
195- subsys = SciMLBase. SavedSubsystem (sys, prob. p, [xidx])
196- @test SciMLBase. get_saved_state_idxs (subsys) == [xidx]
197-
198- # FIXME : hack for save_idxs
199- SciMLBase. @reset ode_sol. saved_subsystem = subsys
194+ ode_sol = solve (prob, Tsit5 (); save_idxs = [x])
200195
201196 @mtkbuild sys = ODESystem ([D (x) ~ x + p * y, 1 ~ sin (y) + cos (x)], t)
202197 xidx = variable_index (sys, x)
203198 prob = DAEProblem (sys, [D (x) => x + p * y, D (y) => 1 / sqrt (1 - (1 - cos (x))^ 2 )],
204- [x => 1.0 , y => asin (1 - cos (x))], (0.0 , 1.0 ), [p => 2.0 ])
205- dae_sol = solve (prob, DFBDF (); save_idxs = xidx)
206- subsys = SciMLBase. SavedSubsystem (sys, prob. p, [xidx])
207- # FIXME : hack for save_idxs
208- SciMLBase. @reset dae_sol. saved_subsystem = subsys
199+ [x => 1.0 , y => asin (1 - cos (x))], (0.0 , 1.0 ), [p => 2.0 ]; build_initializeprob = false )
200+ dae_sol = solve (prob, DFBDF (); save_idxs = [x])
209201
210202 @brownian a b
211203 @mtkbuild sys = System ([D (x) ~ x + p * y + x * a, D (y) ~ 2 p + x^ 2 + y * b], t)
@@ -256,21 +248,11 @@ end
256248
257249 @test SciMLBase. SavedSubsystem (sys, prob. p, [x, y, q, r, s, u]) === nothing
258250
259- sol = solve (prob; save_idxs = xidx )
251+ sol = solve (prob; save_idxs = [x, q, r] )
260252 xvals = sol[x]
261- subsys = SciMLBase. SavedSubsystem (sys, prob. p, [x, q, r])
262- @test SciMLBase. get_saved_state_idxs (subsys) == [xidx]
253+ @test SciMLBase. get_saved_state_idxs (sol. saved_subsystem) == [xidx]
263254 qvals = sol. ps[q]
264255 rvals = sol. ps[r]
265- # FIXME : hack for save_idxs
266- SciMLBase. @reset sol. saved_subsystem = subsys
267- discq = DiffEqArray (SciMLBase. TupleOfArraysWrapper .(tuple .(Base. vect .(qvals))),
268- sol. discretes[qpidx. timeseries_idx]. t, (1 , 1 ))
269- discr = DiffEqArray (SciMLBase. TupleOfArraysWrapper .(tuple .(Base. vect .(rvals))),
270- sol. discretes[rpidx. timeseries_idx]. t, (1 , 1 ))
271- SciMLBase. @reset sol. discretes. collection[qpidx. timeseries_idx] = discq
272- SciMLBase. @reset sol. discretes. collection[rpidx. timeseries_idx] = discr
273-
274256 @test sol[x] == xvals
275257
276258 @test all (Base. Fix1 (is_parameter, sol), [p, q, r, s, u])
0 commit comments