Skip to content

Commit

Permalink
Fix iip for DynamicalSDEProblem constructor
Browse files Browse the repository at this point in the history
Signed-off-by: ErikQQY <[email protected]>
  • Loading branch information
ErikQQY committed Sep 29, 2023
1 parent fe88c15 commit 34a38e1
Show file tree
Hide file tree
Showing 2 changed files with 13 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.5"
version = "2.0.6"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
13 changes: 12 additions & 1 deletion src/problems/sde_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ function SplitSDEProblem{iip}(f1, f2, g, u0, tspan, p = NullParameters(); kwargs
SplitSDEProblem{iip}(SplitSDEFunction(f1, f2, g), u0, tspan, p; kwargs...)
end

function SplitSDEProblem(f1, f2, g, u0, tspan, p = NullParameters(); kwargs...)
ff = SplitSDEFunction(f1, f2, g)
SplitSDEProblem{isinplace(ff)}(ff, u0, tspan, p; kwargs...)

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

View check run for this annotation

Codecov / codecov/patch

src/problems/sde_problems.jl#L148-L150

Added lines #L148 - L150 were not covered by tests
end

function SplitSDEProblem(f::SplitSDEFunction, u0, tspan, p = NullParameters(); kwargs...)
SplitSDEProblem{isinplace(f)}(f, u0, tspan, p; kwargs...)
end
Expand All @@ -171,8 +176,14 @@ $(TYPEDEF)
"""
struct DynamicalSDEProblem{iip} <: AbstractDynamicalSDEProblem end

function DynamicalSDEProblem(f1, f2, g, v0, u0, tspan, p = NullParameters(); kwargs...)
ff = DynamicalSDEFunction(f1, f2, g)
DynamicalSDEProblem{isinplace(ff)}(ff, v0, u0, tspan, p; kwargs...)

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

View check run for this annotation

Codecov / codecov/patch

src/problems/sde_problems.jl#L179-L181

Added lines #L179 - L181 were not covered by tests
end

function DynamicalSDEProblem{iip}(f1, f2, g, v0, u0, tspan, p = NullParameters(); kwargs...) where {iip}
DynamicalSDEProblem{iip}(DynamicalSDEFunction(f1, f2, g), v0, u0, tspan, p; kwargs...)
ff = DynamicalSDEFunction(f1, f2, g)
DynamicalSDEProblem{iip}(ff, v0, u0, tspan, p; kwargs...)

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

View check run for this annotation

Codecov / codecov/patch

src/problems/sde_problems.jl#L185-L186

Added lines #L185 - L186 were not covered by tests
end

function DynamicalSDEProblem(f::DynamicalSDEFunction, v0, u0, tspan,
Expand Down

0 comments on commit 34a38e1

Please sign in to comment.