Skip to content

Commit

Permalink
Merge pull request #92 from ErikQQY/qqy/refactor
Browse files Browse the repository at this point in the history
Refactor FODEProblem and FDDEProblem type
  • Loading branch information
ErikQQY authored Nov 29, 2023
2 parents a6b99b4 + c038e93 commit ebae474
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/types/problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ sol = solve(prob,PIEX())
using Plots; plot(sol,vars=(1,2,3))
```
"""
struct FODEProblem{uType, tType, oType, isinplace, P, F, bF, PT, K} <:
AbstractFODEProblem{uType, tType, oType, isinplace}
struct FODEProblem{uType, tType, oType, isinplace, P, F, bF, PT, K} <: SciMLBase.AbstractODEProblem{uType, tType, isinplace}
f::F
order::oType
u0::uType
Expand All @@ -131,7 +130,7 @@ end

TruncatedStacktraces.@truncate_stacktrace SingleTermFODEProblem 3 1 2

function FODEProblem(f::ODEFunction, order, u0, tspan, args...; kwargs...)
function FODEProblem(f::SciMLBase.AbstractODEFunction, order, u0, tspan, args...; kwargs...)
FODEProblem{SciMLBase.isinplace(f, 4)}(f, order, u0, tspan, args...; kwargs...)
end

Expand Down Expand Up @@ -161,8 +160,7 @@ struct StandardFDDEProblem end
- `ϕ`: History function
Construct a fractional delayed differential equation problem.
"""
struct FDDEProblem{uType, tType, oType, lType, isinplace, P, F, H, K, PT} <:
AbstractFDDEProblem{uType, tType, oType, lType, isinplace}
struct FDDEProblem{uType, tType, oType, lType, isinplace, P, F, H, K, PT} <: SciMLBase.AbstractDDEProblem{uType, tType, lType, isinplace}
f::F
order::oType
u0::uType
Expand Down

0 comments on commit ebae474

Please sign in to comment.