Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SDEProblem constructor issues #507

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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,

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

View check run for this annotation

Codecov / codecov/patch

src/problems/sde_problems.jl#L97

Added line #L97 was not covered by tests
tspan, p = NullParameters();
noise_rate_prototype = nothing,
noise = nothing, seed = UInt64(0),
Expand All @@ -109,22 +109,12 @@
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...)

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

View check run for this annotation

Codecov / codecov/patch

src/problems/sde_problems.jl#L117

Added line #L117 was not covered by tests
end

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