Skip to content

Commit

Permalink
Merge pull request #510 from ErikQQY/qqy/fix_sde_iip
Browse files Browse the repository at this point in the history
Fix iip in SplitSDEProblem and DynamicalSDEProblem
  • Loading branch information
ChrisRackauckas authored Sep 29, 2023
2 parents 5b127c5 + b43091b commit 5b03bff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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.4"
version = "2.0.5"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
16 changes: 8 additions & 8 deletions src/problems/sde_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ function SplitSDEProblem(f1, f2, g, u0, tspan, p = NullParameters(); kwargs...)
SplitSDEProblem(SplitSDEFunction(f1, f2, g), g, u0, tspan, p; kwargs...)
end
=#
function SplitSDEProblem(f1, f2, g, u0, tspan, p = NullParameters(); kwargs...)
SplitSDEProblem(SplitSDEFunction(f1, f2, g), u0, tspan, p; kwargs...)
function SplitSDEProblem{iip}(f1, f2, g, u0, tspan, p = NullParameters(); kwargs...) where {iip}
SplitSDEProblem{iip}(SplitSDEFunction(f1, f2, g), u0, tspan, p; kwargs...)
end

function SplitSDEProblem(f::SplitSDEFunction, u0, tspan, p = NullParameters(); kwargs...)
SplitSDEProblem{isinplace(f)}(f, f.g, u0, tspan, p; kwargs...)
SplitSDEProblem{isinplace(f)}(f, u0, tspan, p; kwargs...)
end

function SplitSDEProblem{iip}(f::SplitSDEFunction, g, u0, tspan, p = NullParameters();
function SplitSDEProblem{iip}(f::SplitSDEFunction, u0, tspan, p = NullParameters();
func_cache = nothing, kwargs...) where {iip}
if f.cache === nothing && iip
cache = similar(u0)
Expand All @@ -171,16 +171,16 @@ $(TYPEDEF)
"""
struct DynamicalSDEProblem{iip} <: AbstractDynamicalSDEProblem end

function DynamicalSDEProblem(f1, f2, g, v0, u0, tspan, p = NullParameters(); kwargs...)
DynamicalSDEProblem(DynamicalSDEFunction(f1, f2, g), v0, u0, tspan, p; kwargs...)
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...)
end

function DynamicalSDEProblem(f::DynamicalSDEFunction, v0, u0, tspan,
p = NullParameters(); kwargs...)
DynamicalSDEProblem{isinplace(f)}(f, f.g, v0, u0, tspan, p; kwargs...)
DynamicalSDEProblem{isinplace(f)}(f, v0, u0, tspan, p; kwargs...)
end

function DynamicalSDEProblem{iip}(f::DynamicalSDEFunction, g, v0, u0, tspan,
function DynamicalSDEProblem{iip}(f::DynamicalSDEFunction, v0, u0, tspan,
p = NullParameters();
func_cache = nothing, kwargs...) where {iip}
if f.cache === nothing && iip
Expand Down

0 comments on commit 5b03bff

Please sign in to comment.