Skip to content

Commit 4912067

Browse files
Merge pull request #83 from AayushSabharwal/as/symbolic-save-idxs
feat: add support for symbolic `save_idxs`
2 parents 8e10f7f + 9c64b54 commit 4912067

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1515
RandomNumbers = "e6cf234a-135c-5ec9-84dd-332b85af5143"
1616
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
1717
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
18+
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
1819
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1920
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
2021
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
@@ -32,6 +33,7 @@ Random = "1.9"
3233
RandomNumbers = "1"
3334
RecursiveArrayTools = "1,2,3"
3435
Reexport = "1.0"
36+
SciMLBase = "2.59.2"
3537
SparseArrays = "1.9"
3638
StaticArrays = "1.0"
3739
StochasticDiffEq = "6.19"

src/StochasticDelayDiffEq.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ using UnPack, DataStructures
1414
using Logging
1515
using RecursiveArrayTools
1616
import FastPower
17+
import SciMLBase
1718
using DiffEqBase: AbstractSDDEProblem, AbstractSDDEAlgorithm, AbstractRODESolution,
1819
AbstractRODEFunction, AbstractSDEIntegrator, AbstractSDDEIntegrator,
1920
DEIntegrator, DEAlgorithm, AbstractRODEAlgorithm, AbstractSDEAlgorithm

src/solve.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
316316
end
317317
end
318318

319+
save_idxs, saved_subsystem = SciMLBase.get_save_idxs_and_saved_subsystem(prob, save_idxs)
319320
ts, timeseries, saveiter = solution_arrays(u, tspan, rate_prototype,
320321
timeseries_init = timeseries_init,
321322
ts_init = ts_init, save_idxs = save_idxs,
@@ -414,15 +415,15 @@ function DiffEqBase.__init(prob::AbstractSDDEProblem,# TODO DiffEqBasee.Abstract
414415
# TODO: DISCONNECT!!!!
415416
sol = DiffEqBase.build_solution(prob, alg, sde_integrator.sol.t,
416417
sde_integrator.sol.u, W = W,
417-
stats = stats,
418+
stats = stats, saved_subsystem = saved_subsystem,
418419
calculate_error = false, alg_choice = alg_choice,
419420
interp = id, dense = dense, seed = _seed)
420421
# separate statistics of the integrator and the history
421422
else
422423
# TODO: DISCONNECT!!!!
423424
sol = DiffEqBase.build_solution(prob, alg, sde_integrator.sol.t,
424425
sde_integrator.sol.u, W = W,
425-
stats = stats,
426+
stats = stats, saved_subsystem = saved_subsystem,
426427
calculate_error = false,
427428
interp = id, dense = dense, seed = _seed)
428429
# separate statistics of the integrator and the history

0 commit comments

Comments
 (0)