Skip to content

Commit

Permalink
interchange .. with interval in CTLibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
oameye committed Jul 23, 2024
1 parent 85b1bb5 commit 4de02a6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion systems/CTLibrary.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module CTLibrary

using CriticalTransitions: CriticalTransitions, smoothabs
using IntervalArithmetic: :..
using IntervalArithmetic: interval
using StaticArrays: SA, SVector

include("fitzhughnagumo.jl")
Expand Down
4 changes: 2 additions & 2 deletions systems/truscottbrindley_mod.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function rampedmodifiedtruscottbrindley!(du, u, p, t)
P₁ *
* (P / P₁) * (1 - β * (P / P₁)) - γ * (Z / Z₁) * (P / P₁)^2 / (1 + (P / P₁)^2))
du[2] = ξ * Z₁ * ((Z / Z₁) * (P / P₁)^2 / (1 + (P / P₁)^2) - (Z / Z₁)^2)
return du[3] = t Ttrans .. (Ttrans + Tramp) ? v : 0
return du[3] = t interval(Ttrans, (Ttrans + Tramp)) ? v : 0
end

"""
Expand All @@ -99,7 +99,7 @@ function rampedmodifiedtruscottbrindley(u, p, t)
P₁ *
* (P / P₁) * (1 - β * (P / P₁)) - γ * (Z / Z₁) * (P / P₁)^2 / (1 + (P / P₁)^2))
dZ = ξ * Z₁ * ((Z / Z₁) * (P / P₁)^2 / (1 + (P / P₁)^2) - (Z / Z₁)^2)
= t Ttrans .. (Ttrans + Tramp) ? v : 0
= t interval(Ttrans, (Ttrans + Tramp)) ? v : 0

return SA[dP, dZ, dα]
end
Expand Down
4 changes: 2 additions & 2 deletions systems/truscottbrindley_orig.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function rampedoriginaltruscottbrindley!(du, u, p, t)

du[1] = r * P * (1 - P / K) - Rₘ * Z * P^2 /^2 + P^2)
du[2] = γ * Rₘ * Z * P^2 /^2 + P^2) - μ * Z
return du[3] = t Ttrans .. (Ttrans + Tramp) ? v : 0
return du[3] = t interval(Ttrans, (Ttrans + Tramp)) ? v : 0
end

"""
Expand All @@ -61,7 +61,7 @@ function rampedoriginaltruscottbrindley(u, p, t)

dP = r * P * (1 - P / K) - Rₘ * Z * P^2 /^2 + P^2)
dZ = γ * Rₘ * Z * P^2 /^2 + P^2) - μ * Z
dr = t Ttrans .. (Ttrans + Tramp) ? v : 0
dr = t interval(Ttrans, (Ttrans + Tramp)) ? v : 0

return SA[dP, dZ, dr]
end
Expand Down
4 changes: 2 additions & 2 deletions systems/truscottbrindley_orig1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function rampedoriginaltruscottbrindley1!(du, u, p, t)

du[1] = (1 / γ) * (r * P * (1 - P / K) - Rₘ * Z * P^2 /^2 + P^2))
du[2] = Rₘ * Z * P^2 /^2 + P^2) - μ * Z
return du[3] = t Ttrans .. (Ttrans + Tramp) ? v : 0
return du[3] = t interval(Ttrans, (Ttrans + Tramp)) ? v : 0
end

"""
Expand All @@ -61,7 +61,7 @@ function rampedoriginaltruscottbrindley1(u, p, t)

dP = (1 / γ) * (r * P * (1 - P / K) - Rₘ * Z * P^2 /^2 + P^2))
dZ = Rₘ * Z * P^2 /^2 + P^2) - μ * Z
dr = t Ttrans .. (Ttrans + Tramp) ? v : 0
dr = t interval(Ttrans, (Ttrans + Tramp)) ? v : 0

return SA[dP, dZ, dr]
end
Expand Down

0 comments on commit 4de02a6

Please sign in to comment.