Reference

PoincareInvariantsModule
PoincareInvariants

A Julia library for the computation of Poincaré integral invariants.

source

Fundamentals

PoincareInvariants.compute!Function
compute!(pinv::AbstractPoincareInvariant, points::AbstractMatrix, t::Real=NaN, p=nothing)

computes a Poincaré invariant using setup object pinv, where points represents the image of the curve or surface parameterisation evaluated on some set of points, e.g. a grid.

t is the time at which the invariant is evaluated p are any user supplied optional arguments. Both t and p are passed directly to the differential form.

Plan implementations should define a method compute!(pinv, t::Real, p), which acts on the internal points storage pinv.points.

source
compute!(pinv::AbstractPoincareInvariant, points::AbstractVector{<:AbstractVector},
    times::Union{AbstractVector{<:Real}, Real}=NaN, p=nothing)

computes a Poincaré invariant, using the setup object pinv, at each time for a set of trajectories given by points.

points represents an AbstractVector of trajectories. Each element of points is a trajectory, which is itself an AbstractVector of some kind of iterable or vector. times is either a constant, like NaN, or a vector of the times at which the trajectories have been evaluated, i.e. the i-th phase space position in each trajectory was evaluated at time times[i]. p is an arbitrary optional parameter which is passed to the differential form, like the the time.

source
PoincareInvariants.FirstPoincareInvariantMethod
FirstPoincareInvariant{T, D}(θ::θT, N::Integer, plan::P)

constructs a FirstPoincareInvariant setup object to calculate integral invariants, given a numeric type T, a phase space dimension D, a differential form θ, a number of points N and a plan. Note that the number of points may not be exactly N. The true number used depends on the implementation and is guaranteed to be no smaller than N and not too much larger.

source
PoincareInvariants.FirstPoincareInvariantMethod
FirstPoincareInvariant{T, D}(θ::θT, N::Integer, P::Type=DEFAULT_FIRST_PLAN)

constructs a FirstPoincareInvariant setup object to calculate integral invariants, given a numeric type T, a phase space dimension D, a differential form θ, a number of points N and a plan type P, to be initialised and used for future computation.

The plan type defaults to DEFAULT_FIRST_PLAN, which is currently set to FirstFourierPlan.

source
PoincareInvariants.FirstPoincareInvariantMethod
FirstPoincareInvariant{T, D, typeof(canonical_one_form)}(N::Integer, P=DEFAULT_FIRST_PLAN)
CanonicalFirstPI{T, D}(N::Integer, P=DEFAULT_FIRST_PLAN)

creates a setup object to compute the first integral invariant using the canonical one form in phase space of dimension D with numeric type T, N points and plan type P.

source
PoincareInvariants.SecondPoincareInvariantType
SecondPoincareInvariant{T, D, ωT, PS, P} <: AbstractPoincareInvariant{T, D}
SecondPI{T, D, ωT, PS, P} <: AbstractPoincareInvariant{T, D}

setup object used to compute the second invariant.

source
PoincareInvariants.SecondPoincareInvariantMethod
SecondPoincareInvariant{T, D}(ω, N, plan::P)

constructs a SecondPoincareInvariant setup object to calculate integral invariants, given a numeric type T, a phase space dimension D, a differential form ω, a point specification N, usually a number of points, and a plan.

source
PoincareInvariants.SecondPoincareInvariantMethod
SecondPoincareInvariant{T, D}(ω, N, P::Type=DEFAULT_SECOND_PLAN)

constructs a SecondPoincareInvariant setup object to calculate integral invariants, given a numeric type T, a phase space dimension D, a differential form ω, a point specification N and a plan type P, to be initialised and used for future computation.

The plan type defaults to DEFAULT_SECOND_PLAN, which is currently set to SecondChebyshevPlan. Note that the number of points may not be exactly N. The true number used depends on the implementation and is guaranteed to be no smaller than N and not too much larger. For the SecondFinDiffPlan, the grid of points may also be specified as a tuple (Nx, Ny), if non-square grids are sought.

source
PoincareInvariants.SecondPoincareInvariantMethod
SecondPoincareInvariant{T, D, CanonicalSymplecticMatrix{T}}(N, P=DEFAULT_FIRST_PLAN)
CanonicalSecondPI{T, D}(N, P=DEFAULT_FIRST_PLAN)

creates a setup object to compute the second integral invariant using the canonical two form in phase space of dimension D with numeric type T, point specification N and plan type P.

source

Interface

PoincareInvariants.getpointsFunction
getpoints(pinv::AbstractPoincareInvariant)

returns points on which to evaluate the phase space line or surface parameterisation so as to compute! pinv.

source
PoincareInvariants.getpointspecFunction
getpointspec(pinv::AbstractPoincareInvariant)

get point specification, which may, for example, be a tuple specifying a grid or a number giving the number of points used to sample in phase space.

source

Canonical Symplectic Forms

PoincareInvariants.CanonicalSymplecticForms.CanonicalSymplecticMatrixType
CanonicalSymplecticMatrix{T}(n::Integer)

constructs a canonical symplectic matrix of size (n, n) with eltype T. n must be even and positive. See the examples to see the form of the canonical symplectic matrix as defined here.

Examples

julia> CanonicalSymplecticMatrix(4)
4×4 CanonicalSymplecticMatrix{Int64}:
 0  0  -1   0
 0  0   0  -1
 1  0   0   0
 0  1   0   0

julia> CanonicalSymplecticMatrix{Int32}(6)
6×6 CanonicalSymplecticMatrix{Int32}:
 0  0  0  -1   0   0
 0  0  0   0  -1   0
 0  0  0   0   0  -1
 1  0  0   0   0   0
 0  1  0   0   0   0
 0  0  1   0   0   0
source