diff --git a/src/system_utils.jl b/src/system_utils.jl index f1c60aa..993a536 100644 --- a/src/system_utils.jl +++ b/src/system_utils.jl @@ -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 diff --git a/test/interface.jl b/test/interface.jl index c0d6881..2ac89e7 100644 --- a/test/interface.jl +++ b/test/interface.jl @@ -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]