@@ -54,7 +54,7 @@ This is a container for coherent vortex boundaries. An object `vortex` of type
5454 field ``\\ eta_{\\ lambda}^{\\ pm}`` via the formula ``(-1)^s``.
5555"""
5656struct EllipticBarrier{T<: Real }
57- curve:: Vector{Tuple{T ,T}}
57+ curve:: Vector{SVector{2 ,T}}
5858 core:: SVector{2,T}
5959 p:: Float64
6060 s:: Bool
@@ -822,15 +822,7 @@ function compute_closed_orbits(
822822 closed &&
823823 uniform && in_well_defined_squares && contains_singularity
824824 )
825- push!(
826- vortices,
827- EllipticBarrier(
828- [qs. data for qs in orbit],
829- ps[1 ],
830- λ⁰,
831- σ,
832- ),
833- )
825+ push!(vortices, EllipticBarrier(orbit, ps[1 ], λ⁰, σ))
834826 rev && break
835827 end
836828 end
@@ -1635,21 +1627,23 @@ function flow(odefun::ODE.ODEFunction, u::EllipticBarrier{T}, tspan; kwargs...)
16351627 nc = length(u.curve)
16361628 newcurves = map(
16371629 let odefun = odefun, tspan = tspan, kwargs = kwargs
1638- x -> flow(odefun, (x[1], x[2]) , tspan; kwargs...)
1630+ x -> flow(odefun, x , tspan; kwargs...)
16391631 end,
16401632 u.curve,
16411633 )
1642- newcurves2 = Vector{Tuple{T,T}}[]
1643- for i in 1:nt
1644- curcurve = Tuple{T,T}[]
1645- for j in 1:nc
1646- push!(curcurve, (newcurves[j][i][1], newcurves[j][i][2]))
1647- end
1634+ newcurves2 = Vector{SVector{2,T}}[]
1635+ timeindices = eachindex(newcurves[1])
1636+ for i in timeindices
1637+ curcurve = [convert(SVector{2,T}, n[i]) for n in newcurves]
1638+ # SVector{2,T}[]
1639+ # for j in 1:nc
1640+ # push!(curcurve, convert(SVector{2,T}, newcurves[j][i]))
1641+ # end
16481642 push!(newcurves2, curcurve)
16491643 end
16501644 newcores = flow(odefun, u.core, tspan; kwargs...)
16511645 return [
1652- EllipticBarrier{T}(newcurves2[i], newcores[i], u.p, u.s) for i in 1:nt
1646+ EllipticBarrier{T}(newcurves2[i], newcores[i], u.p, u.s) for i in timeindices
16531647 ]
16541648end
16551649
0 commit comments