Skip to content

Commit

Permalink
Done
Browse files Browse the repository at this point in the history
Signed-off-by: ErikQQY <[email protected]>
  • Loading branch information
ErikQQY committed Aug 25, 2023
1 parent 681b9e1 commit 61b726d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
12 changes: 4 additions & 8 deletions src/problems/bvp_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ struct BVProblem{uType, tType, isinplace, P, F, BF, PT, K} <:
_tspan = promote_tspan(tspan)
warn_paramtype(p)
new{typeof(u0), typeof(_tspan), iip, typeof(p),
typeof(f), typeof(bc),
typeof(problem_type), typeof(kwargs)}(f, f.bc, u0, _tspan, p,
typeof(f.f), typeof(bc),
typeof(problem_type), typeof(kwargs)}(f.f, bc, u0, _tspan, p,
problem_type, kwargs)
end

Expand All @@ -107,16 +107,12 @@ end

TruncatedStacktraces.@truncate_stacktrace BVProblem 3 1 2

function BVProblem(f::AbstractBVPFunction, bc, u0, tspan, args...; kwargs...)
BVProblem{isinplace(f, 4)}(f, bc, u0, tspan, args...; kwargs...)
end

function BVProblem(f, bc, u0, tspan, p = NullParameters(); kwargs...)
BVProblem(BVPFunction(f, bc), bc, u0, tspan, p; kwargs...)
BVProblem(BVPFunction(f, bc), u0, tspan, p; kwargs...)

Check warning on line 111 in src/problems/bvp_problems.jl

View check run for this annotation

Codecov / codecov/patch

src/problems/bvp_problems.jl#L110-L111

Added lines #L110 - L111 were not covered by tests
end

function BVProblem(f::AbstractBVPFunction, u0, tspan, p = NullParameters(); kwargs...)
BVProblem(f, f.bc, u0, tspan, p; kwargs...)
BVProblem{isinplace(f)}(f.f, f.bc, u0, tspan, p; kwargs...)

Check warning on line 115 in src/problems/bvp_problems.jl

View check run for this annotation

Codecov / codecov/patch

src/problems/bvp_problems.jl#L114-L115

Added lines #L114 - L115 were not covered by tests
end

# convenience interfaces:
Expand Down
12 changes: 4 additions & 8 deletions src/problems/sde_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ struct SDEProblem{uType, tType, isinplace, P, NP, F, G, K, ND} <:
warn_paramtype(p)
new{typeof(u0), typeof(_tspan),
isinplace(f), typeof(p),
typeof(noise), typeof(f), typeof(f.g),
typeof(noise), typeof(f.f), typeof(g),
typeof(kwargs),
typeof(noise_rate_prototype)}(f, f.g, u0, _tspan, p,
typeof(noise_rate_prototype)}(f.f, g, u0, _tspan, p,
noise, kwargs,
noise_rate_prototype, seed)
end
Expand All @@ -123,16 +123,12 @@ function SDEProblem(f::AbstractSDEFunction,u0,tspan,p=NullParameters();kwargs...
end
=#

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

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

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

View check run for this annotation

Codecov / codecov/patch

src/problems/sde_problems.jl#L126-L127

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

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

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

View check run for this annotation

Codecov / codecov/patch

src/problems/sde_problems.jl#L130-L131

Added lines #L130 - L131 were not covered by tests
end

"""
Expand Down

0 comments on commit 61b726d

Please sign in to comment.