Skip to content

Commit dec9b5f

Browse files
DDS => DeterministicIteratedMap (#11)
1 parent 1c1517b commit dec9b5f

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

src/PredefinedDynamicalSystems.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ using Reexport
1414

1515
using StaticArrays
1616

17-
const DDS = DeterministicIteratedMap
1817
include("discrete_famous_systems.jl")
19-
2018
include("continuous_famous_systems.jl")
2119

2220
end

src/discrete_famous_systems.jl

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const DDS = DynamicalSystemsBase.DiscreteDynamicalSystem
2-
31
"""
42
```julia
53
towel(u0 = [0.085, -0.121, 0.075])
@@ -23,7 +21,7 @@ Default values are the ones used in the original paper.
2321
[1] : O. E. Rössler, Phys. Lett. **71A**, pp 155 (1979)
2422
"""
2523
function towel(u0=[0.085, -0.121, 0.075])
26-
return DDS(towel_rule, u0, nothing)
24+
return DeterministicIteratedMap(towel_rule, u0, nothing)
2725
end# should result in lyapunovs: [0.432207,0.378834,-3.74638]
2826
function towel_rule(x, p, n)
2927
@inbounds x1, x2, x3 = x[1], x[2], x[3]
@@ -72,7 +70,7 @@ Nuclear Physics, Novosibirsk (1969)
7270
[2] : J. M. Greene, J. Math. Phys. **20**, pp 1183 (1979)
7371
"""
7472
function standardmap(u0=[0.001245, 0.00875]; k = 0.971635)
75-
return DDS(standardmap_rule, u0, [k])
73+
return DeterministicIteratedMap(standardmap_rule, u0, [k])
7674
end
7775
@inbounds function standardmap_rule(x, par, n)
7876
theta = x[1]; p = x[2]
@@ -132,7 +130,7 @@ function coupledstandardmaps(M::Int, u0 = 0.001rand(2M);
132130
sparseJ = sparse(J)
133131
p = vcat(ks, Γ)
134132
csm(sparseJ, u0, p, 0)
135-
return DDS(csm, u0, p, csm, sparseJ)
133+
return DeterministicIteratedMap(csm, u0, p, csm, sparseJ)
136134
end
137135
struct CoupledStandardMaps{N}
138136
idxs::SVector{N, Int}
@@ -198,7 +196,7 @@ function's documentation string.
198196
[1] : M. Hénon, Commun.Math. Phys. **50**, pp 69 (1976)
199197
"""
200198
function henon(u0=zeros(2); a = 1.4, b = 0.3)
201-
return DDS(henon_rule, u0, [a,b])
199+
return DeterministicIteratedMap(henon_rule, u0, [a,b])
202200
end # should give lyapunov exponents [0.4189, -1.6229]
203201
henon_rule(x, p, n) = SVector{2}(1.0 - p[1]*x[1]^2 + x[2], p[2]*x[1])
204202
henon_jacob(x, p, n) = SMatrix{2,2}(-2*p[1]*x[1], p[2], 1.0, 0.0)
@@ -226,7 +224,7 @@ function's documentation string.
226224
[2] : M. J. Feigenbaum, J. Stat. Phys. **19**, pp 25 (1978)
227225
"""
228226
function logistic(x0=0.4; r = 4.0)
229-
return DDS(logistic_rule, SVector(x0), [r])
227+
return DeterministicIteratedMap(logistic_rule, SVector(x0), [r])
230228
end
231229
logistic_rule(x, p, n) = @inbounds SVector(p[1]*x[1]*(1 - x[1]))
232230
logistic_jacob(x, p, n) = @inbounds SMatrix{1,1}(p[1]*(1 - 2x[1]))
@@ -252,7 +250,7 @@ x_n(1 + |2x_n|^{z-1}), & \\quad |x_n| \\le 0.5 \\\\
252250
[2] : Meyer et al., New. J. Phys **20** (2019)
253251
"""
254252
function pomeau_manneville(u0 = 0.2, z = 2.5)
255-
return DDS(pm_rule, u0, [z], pm_jac)
253+
return DeterministicIteratedMap(pm_rule, u0, [z], pm_jac)
256254
end
257255
function pm_rule(x, p, n)
258256
if x < -0.5
@@ -290,7 +288,7 @@ function's documentation string.
290288
[^Manneville1980]: Manneville, P. (1980). Intermittency, self-similarity and 1/f spectrum in dissipative dynamical systems. [Journal de Physique, 41(11), 1235–1243](https://doi.org/10.1051/jphys:0198000410110123500)
291289
"""
292290
function manneville_simple(x0=0.4; ε = 0.1)
293-
return DDS(manneville_f, x0, [ε], manneville_j)
291+
return DeterministicIteratedMap(manneville_f, x0, [ε], manneville_j)
294292
end
295293

296294
function manneville_f(x, p, t)
@@ -313,7 +311,7 @@ Vladimir Arnold in the 1960s. [1]
313311
[1] : Arnol'd, V. I., & Avez, A. (1968). Ergodic problems of classical mechanics.
314312
"""
315313
function arnoldcat(u0 = [0.001245, 0.00875])
316-
return DDS(arnoldcat_rule, u0, nothing, arnoldcat_jacob)
314+
return DeterministicIteratedMap(arnoldcat_rule, u0, nothing, arnoldcat_jacob)
317315
end # Should give Lyapunov exponents [2.61803, 0.381966]
318316
function arnoldcat_rule(u, p, n)
319317
x,y = u
@@ -345,7 +343,7 @@ This map illustrate the fractalization of the basins boundary and its uncertaint
345343
An obstruction to predictability, Physics Letters A, 99, 9, 1983
346344
"""
347345
function grebogi_map(u0 = [0.2, 0.]; a = 1.32, b=0.9, J₀=0.3)
348-
return DDS(grebogi_map_rule, u0, [a,b,J₀], grebogi_map_J)
346+
return DeterministicIteratedMap(grebogi_map_rule, u0, [a,b,J₀], grebogi_map_J)
349347
end
350348
function grebogi_map_rule(u, p, n)
351349
θ = u[1]; x = u[2]
@@ -375,7 +373,7 @@ u_i' = \\lambda - u_i^2 + k \\sum_{j\\ne i} (u_j^2 - u_i^2)
375373
Here the prime ``'`` denotes next state.
376374
"""
377375
function nld_coupled_logistic_maps(D = 4, u0 = range(0, 1; length=D); λ = 1.2, k = 0.08)
378-
return DDS(nld_coupled_logistic_maps_f, u0, [λ, k])
376+
return DeterministicIteratedMap(nld_coupled_logistic_maps_f, u0, [λ, k])
379377
end
380378

381379
function nld_coupled_logistic_maps_f(du, u, p, n)
@@ -409,7 +407,7 @@ The parameter μ should be kept in the interval `[0,2]`. At μ=2, the tent map c
409407
[^Ott2002] : E. Ott, "Chaos in Dynamical Systems" (2nd ed.) Cambridge: Cambridge University Press (2010).
410408
"""
411409
function tentmap(u0 = 0.25, μ = 2.0)
412-
return DDS(tentmap_rule, u0, [μ], tentmap_jac)
410+
return DeterministicIteratedMap(tentmap_rule, u0, [μ], tentmap_jac)
413411
end
414412
function tentmap_rule(x, p, n)
415413
μ = p[1]
@@ -442,7 +440,7 @@ The parameter β controls the dynamics of the map. Its Lyapunov exponent can be
442440
At β=2, it becomes the dyadic transformation, also known as the bit shift map, the 2x mod 1 map, the Bernoulli map or the sawtooth map. The typical trajectory for this case is chaotic, though there are countably infinite periodic orbits [^Ott2002].
443441
"""
444442
function betatransformationmap(u0 = 0.25; β=2.0)
445-
return DDS(betatransformation_rule, u0, [β], betatransformation_jac)
443+
return DeterministicIteratedMap(betatransformation_rule, u0, [β], betatransformation_jac)
446444
end
447445
function betatransformation_rule(x, p, n)
448446
@inbounds β = p[1]
@@ -478,7 +476,7 @@ The parameters σ and β are generally kept at `0.001`, while α is chosen to g
478476
[^Cao2013] : H. Cao and Y Wu, "Bursting types and stable domains of Rulkov neuron network with mean field coupling", International Journal of Bifurcation and Chaos,23:1330041 (2013).
479477
"""
480478
function rulkovmap(u0=[1.0, 1.0]; α=4.1, β=0.001, σ=0.001)
481-
return DDS(rulkovmap_rule, u0, [α, β, σ], rulkovmap_jac)
479+
return DeterministicIteratedMap(rulkovmap_rule, u0, [α, β, σ], rulkovmap_jac)
482480
end
483481
@inbounds function rulkovmap_rule(x, p, n)
484482
α, β, σ = p
@@ -509,7 +507,7 @@ The default parameters are chosen to give a unique chaotic attractor. A double a
509507
[^Skiadas2008] : "Chaotic Modelling and Simulation: Analysis of Chaotic Models, Attractors and Forms", CRC Press (2008).
510508
"""
511509
function ikedamap(u0=[1.0, 1.0]; a=1.0, b=1.0, c=0.4, d =6.0)
512-
return DDS(ikedamap_rule, u0, [a,b,c,d], ikedamap_jac)
510+
return DeterministicIteratedMap(ikedamap_rule, u0, [a,b,c,d], ikedamap_jac)
513511
end
514512
@inbounds function ikedamap_rule(u, p, n)
515513
a,b,c,d = p

0 commit comments

Comments
 (0)