Skip to content

Commit 29e0c62

Browse files
committed
removed Eom nonsense
1 parent 55b9a29 commit 29e0c62

File tree

4 files changed

+9
-27
lines changed

4 files changed

+9
-27
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v0.3.1
2+
* Added `jacobian` function
3+
* Removed `EomVector` nonsense.
4+
15
# v0.3.0
26
## BREAKING
37
* The type `ContinuousDS` has been completely overhauled.

src/famous_systems.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ mutable struct Shinriki
291291
R1::Float64
292292
end
293293
(shi::Shinriki)(V) = 2.295e-5*(exp(3.0038*V) - exp(-3.0038*V))
294-
function (shi::Shinriki)(t, u::EomVector, du::EomVector)
294+
function (shi::Shinriki)(t, u::AbstractVector, du::AbstractVector)
295295

296296
du[1] = (1/0.01)*(
297297
u[1]*(1/6.9 - 1/shi.R1) - shi(u[1] - u[2]) - (u[1] - u[2])/14.5
@@ -453,7 +453,7 @@ mutable struct CoupledStandardMaps{N, T}
453453
idxsp1::Vector{Int}
454454
end
455455
@inbounds function (f::CoupledStandardMaps{N, T})(
456-
xnew::EomVector, x::EomVector) where {N, T}
456+
xnew::AbstractVector, x::AbstractVector) where {N, T}
457457
for i in f.idxs
458458

459459
xnew[i+N] = mod2pi(
@@ -466,7 +466,7 @@ end
466466
return nothing
467467
end
468468
@inbounds function (f::CoupledStandardMaps{M, T})(
469-
J::EomMatrix, x::EomVector) where {M, T}
469+
J::AbstractMatrix, x::AbstractVector) where {M, T}
470470
# x[i] ≡ θᵢ
471471
# x[[idxsp1[i]]] ≡ θᵢ+₁
472472
# x[[idxsm1[i]]] ≡ θᵢ-₁
@@ -519,8 +519,8 @@ mutable struct HénonMap
519519
a::Float64
520520
b::Float64
521521
end
522-
(f::HénonMap)(x::EomVector) = SVector{2}(1.0 - f.a*x[1]^2 + x[2], f.b*x[1])
523-
(f::HénonMap)(x::EomVector, no::Void) = @SMatrix [-2*f.a*x[1] 1.0; f.b 0.0]
522+
(f::HénonMap)(x) = SVector{2}(1.0 - f.a*x[1]^2 + x[2], f.b*x[1])
523+
(f::HénonMap)(x, no::Void) = @SMatrix [-2*f.a*x[1] 1.0; f.b 0.0]
524524

525525

526526
"""

src/various.jl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
# very fast or very conveniently.
33
# Also includes helper/conversion functions
44

5-
#####################################################################################
6-
# E.o.m. Types #
7-
#####################################################################################
8-
export EomVector, EomMatrix
9-
SubMatrix{T, N, K, B} = SubArray{T, 2, Array{T, N}, K, B}
10-
SubVector{T, N, K, B} = SubArray{T, 1, Array{T, N}, K, B}
11-
12-
EomVector = Union{Vector, SubVector, SVector}
13-
EomMatrix = Union{Matrix, SubMatrix, SMatrix}
14-
155
#####################################################################################
166
# Pairwse Distance #
177
#####################################################################################

test/math_tests.jl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,3 @@ println("\nTesting custom QR-decomposition...")
3838
end
3939
end
4040
end
41-
42-
@testset "EomVector, EomMatrix" begin
43-
a = rand(3,3)
44-
v = SVector{2}(2, 2.1)
45-
m = @SMatrix zeros(3, 3)
46-
47-
@test issubtype(typeof(a), EomMatrix)
48-
@test !issubtype(typeof(view(a, :, 2)), EomMatrix)
49-
@test issubtype(typeof(v), EomVector)
50-
@test issubtype(typeof(view(a, :, 1)), EomVector)
51-
@test issubtype(typeof(m), EomMatrix)
52-
end

0 commit comments

Comments
 (0)