Skip to content

Commit bce2ca2

Browse files
committed
stability improvements for CoupledStandardMaps
1 parent 6a015f7 commit bce2ca2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/dynamicalsystem/discrete.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import DiffEqBase: init, step!, isinplace, reinit!
33
import Base: show
44

55
export MinimalDiscreteProblem, MinimalDiscreteIntegrator
6-
export DiscreteDynamicalSystem
6+
export DiscreteDynamicalSystem, reinit!
77

88
#####################################################################################
99
# Discrete Dynamical System #

src/dynamicalsystem/famous_systems.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,18 +459,18 @@ function coupledstandardmaps(M::Int, u0 = 0.001rand(2M);
459459
J[i, i+M] = 1
460460
J[i+M, i+M] = 1
461461
end
462-
p = [ks, Γ]
462+
p = (ks, Γ)
463463
csm(J, u0, p, 0)
464464
return DDS(csm, u0, p, csm, J)
465465
end
466-
mutable struct CoupledStandardMaps{N}
466+
struct CoupledStandardMaps{N}
467467
idxs::SVector{N, Int}
468468
idxsm1::SVector{N, Int}
469469
idxsp1::SVector{N, Int}
470470
end
471-
@inbounds function (f::CoupledStandardMaps{N})(xnew::AbstractVector, x, p, n) where {N}
471+
function (f::CoupledStandardMaps{N})(xnew::AbstractVector, x, p, n) where {N}
472472
ks, Γ = p
473-
for i in f.idxs
473+
@inbounds for i in f.idxs
474474

475475
xnew[i+N] = mod2pi(
476476
x[i+N] + ks[i]*sin(x[i]) -

0 commit comments

Comments
 (0)