Skip to content

Commit

Permalink
replace which system map functor is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnoStrouwen committed Feb 18, 2024
1 parent 3bc3d4d commit 1e0d423
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 6 additions & 0 deletions src/system_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ function SystemMap(prob, alg::SciMLBase.AbstractODEAlgorithm,
SystemMap(prob, alg, ensemblealg, kwargs)
end

function (sm::SystemMap{DT})(u0, p) where {DT}
prob::DT = remake(sm.prob,
u0 = convert(typeof(sm.prob.u0), u0),
p = convert(typeof(sm.prob.p), p))
solve(prob, sm.alg; sm.kwargs...)
end

"""
```julia
Expand Down
7 changes: 0 additions & 7 deletions test/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ using Test, TestExtras,
const DEU = SciMLExpectations
include("setup.jl")

function (sm::SystemMap{DT})(u0, p) where {DT}
prob::DT = remake(sm.prob,
u0 = convert(typeof(sm.prob.u0), u0),
p = convert(typeof(sm.prob.p), p))
solve(prob, sm.alg; sm.kwargs...)
end

@testset "GenericDistribution" begin
dists = (Uniform(1, 2), Uniform(3, 4), Normal(0, 1), truncated(Normal(0, 1), -3, 3))
x = [mean(d) for d in dists]
Expand Down

0 comments on commit 1e0d423

Please sign in to comment.