Skip to content

Commit

Permalink
Merge pull request #508 from ErikQQY/qqy/fix_sde_constructor_issues
Browse files Browse the repository at this point in the history
Fix SDEProblem constructor issues
  • Loading branch information
ChrisRackauckas authored Sep 27, 2023
2 parents 75605b1 + e5bc151 commit 25c3d1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SciMLBase"
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
authors = ["Chris Rackauckas <[email protected]> and contributors"]
version = "2.0.2"
version = "2.0.3"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
7 changes: 6 additions & 1 deletion src/problems/sde_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ struct SDEProblem{uType, tType, isinplace, P, NP, F, G, K, ND} <:
noise, kwargs,
noise_rate_prototype, seed)
end

function SDEProblem{iip}(f, g, u0, tspan, p = NullParameters(); kwargs...) where {iip}
SDEProblem(SDEFunction{iip}(f, g), u0, tspan, p; kwargs...)
end
end

TruncatedStacktraces.@truncate_stacktrace SDEProblem 3 1 2
Expand All @@ -118,7 +122,8 @@ function SDEProblem(f::AbstractSDEFunction, u0, tspan, p = NullParameters(); kwa
end

function SDEProblem(f, g, u0, tspan, p = NullParameters(); kwargs...)
SDEProblem(SDEFunction(f, g), u0, tspan, p; kwargs...)
iip = isinplace(f, 4)
SDEProblem{iip}(SDEFunction{iip}(f, g), u0, tspan, p; kwargs...)
end

"""
Expand Down

0 comments on commit 25c3d1c

Please sign in to comment.