Skip to content

Commit

Permalink
Fix Brusselator example
Browse files Browse the repository at this point in the history
Signed-off-by: ErikQQY <2283984853@qq.com>
  • Loading branch information
ErikQQY committed Jun 9, 2022
1 parent eeb2d1a commit 1a07a2f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/Brusselator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function Brusselator!(du, u, p, t)
du[2] = μ*u[1]-(u[1])^2*u[1]
end

prob = FODESystem(Brusselator!, α, u0, 100)
prob = FODESystem(Brusselator!, α, u0, (0, 100))
result = solve(prob, h, GL())

# Phase plane
Expand Down
2 changes: 1 addition & 1 deletion src/FractionalDiffEq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include("singletermfode/PECE.jl")
include("singletermfode/PI.jl")
include("singletermfode/GL.jl")
include("singletermfode/ChebSpectral.jl")
include("singletermfode/AS.jl")
include("singletermfode/AtanganaSeda.jl")

# Multi-terms fractional ordinary differential equations
include("multitermsfode/matrix.jl")
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/singletermfode/PECE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Define a single term fractional ordinary differential equation, there are only o
struct SingleTermFODEProblem <: FDEProblem
f::Function
α::Float64
u0
u0::Union{AbstractArray, Number}
tspan::Union{Tuple, Number}
end

Expand Down Expand Up @@ -85,7 +85,7 @@ Construct system of fractional delay differential equations problem.
struct FDDESystem <: FDEProblem
f::Function
ϕ::AbstractArray
α
α::Union{AbstractArray, Number}
τ::Number
T
end
Expand Down Expand Up @@ -265,7 +265,7 @@ function right(f, y, α, n, h::Float64)
return temp
end

function predictor(f, y, α::Float64, n::Integer, h::Float64, u0, t0)
function predictor(f::Function, y, α::Float64, n::Integer, h::Float64, u0, t0)
predict = 0
leftsum = 0

Expand Down

0 comments on commit 1a07a2f

Please sign in to comment.