Skip to content

Commit

Permalink
Fix SDEProblem constructor issues
Browse files Browse the repository at this point in the history
Signed-off-by: ErikQQY <[email protected]>
  • Loading branch information
ErikQQY committed Sep 27, 2023
1 parent 75605b1 commit e5bc151
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...)

Check warning on line 114 in src/problems/sde_problems.jl

View check run for this annotation

Codecov / codecov/patch

src/problems/sde_problems.jl#L113-L114

Added lines #L113 - L114 were not covered by tests
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...)

Check warning on line 126 in src/problems/sde_problems.jl

View check run for this annotation

Codecov / codecov/patch

src/problems/sde_problems.jl#L125-L126

Added lines #L125 - L126 were not covered by tests
end

"""
Expand Down

0 comments on commit e5bc151

Please sign in to comment.