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 26, 2023
1 parent 9162505 commit 29aa1ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 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.1"
version = "2.0.2"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
14 changes: 2 additions & 12 deletions src/problems/sde_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct SDEProblem{uType, tType, isinplace, P, NP, F, G, K, ND} <:
kwargs::K
noise_rate_prototype::ND
seed::UInt64
@add_kwonly function SDEProblem{iip}(f::AbstractSDEFunction{iip}, g, u0,
@add_kwonly function SDEProblem{iip}(f::AbstractSDEFunction{iip}, u0,
tspan, p = NullParameters();
noise_rate_prototype = nothing,
noise = nothing, seed = UInt64(0),
Expand All @@ -109,22 +109,12 @@ 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), g, u0, tspan, p; kwargs...)
end
end

TruncatedStacktraces.@truncate_stacktrace SDEProblem 3 1 2

#=
function SDEProblem(f::AbstractSDEFunction,u0,tspan,p=NullParameters();kwargs...)
SDEProblem(f,f.g,u0,tspan,p;kwargs...)
end
=#

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

function SDEProblem(f, g, u0, tspan, p = NullParameters(); kwargs...)
Expand Down

0 comments on commit 29aa1ad

Please sign in to comment.