API

Missing docstring.

Missing docstring for State. Check Documenter's build log for details.

InvariantManifolds.NSStateType
NSState{N,T<:Number} <: AbstractVector{T}

The struct NSState is to record the events data for a time-T-map.

Fields

  • state the final state of the time-T-map;
  • event_t the times when events happen;
  • event_state the solution's state when events happen;
  • event_at is a vector that contains integers indicating which event happen;

The meaning of event_at in PiecewiseV and BilliardV systems is quite clear. For a simple Fillippov system SFilippovV, we record three events:

  • 1 represents the event that flow enters the sliding surface from H<0 or H>0;
  • 2 represents the event that flow cross the sliding surface;
  • 3 represents the event that flow slides out the sliding surface from H=0 to H<0 or H>0.
source
Missing docstring.

Missing docstring for IterationCurve. Check Documenter's build log for details.

Missing docstring.

Missing docstring for NSSolution. Check Documenter's build log for details.

InvariantManifolds.NSSetUpType
NSSetUp{T}

NSSetUp is a struct to contain all the information needed in continuing the manifold of non-smooth ODE.

Fields

  • f the Non-smooth vector field, like PiecewiseV;
  • timespan the time span of time-T-map;
  • timetmap the time-t-map of non-smooth ODE, which maps a State and parameters of ODE to a NSState.
source
InvariantManifolds.AnnulusBoundariesType
AnnulusBoundaries

A struct contains data when generating the two dimensional manifold.

Fields

  • inner an IterationCurve represents inner boundary;
  • outer an IterationCurve represents outer boundary;
source
InvariantManifolds.PiecewiseVType
PiecewiseV <: ContinuousVectorField

Piecewise smooth vector field.

Fields

  • fs is a vector of smooth vector fields in different regions.
  • regions is a vector of the region functions: [r1,r2,...], where r1(x,p,t) should return a Bool value to indicate that x is in this region or not.
  • hypers is a vector of the hyper surfaces separating the regions.
  • n is a integer to switch between vector fields. It can be set to any integer when construct a PiecewiseV.

Example

using StaticArrays, InvariantManifolds
f1(x,p,t)=SA[x[2],-2x[1]]
f2(x,p,t)=SA[x[2],-x[1]]
dom1(x,p,t)=x[1]>0
dom2(x,p,t)=x[2]<0
hyper(x,p,t)=x[1]
PiecewiseV((f1,f2),(dom1,dom2),(hyper,),1)

The above codes generate a piecewise smooth vector field, which when x[1]>0 is f1, and when x[2]<0 is f2. The hyper surface separating these smooth vector fields is x[1]=0.

source
InvariantManifolds.BilliardVType
BilliardV <: JumpVectorField

A vector field with multiple hyper surfaces such that the flow jump when hits these hyper surfaces.

Fields

  • f is the vector field, of type f(x,p,t), and its output is a SVector;
  • hypers is tuple of hyper surfaces:(h1,h2,...), h1(x,p,t);
  • irules is tuple of rules on hyper surfaces:(r1,r2,r3,...).
source
InvariantManifolds.SFilippovVType
SFilippovV <: ContinuousVectorField

SFilippovV means simple Fillippov vector fields, which means that there only exists one hyper surface to separate the phase space.

Fields

  • fs vector fields in two sides of hyper surface. The slide vector field can be generated automatically.
  • hyper hyper surface.
  • dhyper grad of hyper surface. Warn!!! The grad must point to the second of fs.
  • exit conditions to exit the hyper surface, which can also be generated automatically.
  • n is a integer to switch between vector fields. It can be set to any integer when construct a SFilippovV.
source
InvariantManifolds.setmapFunction
setmap(v::T, timespan, alg, N, T; region_detect=_region_detect, extra...)

The function setmap is to get a NSSetUp.

Parameters

  • v a ContinuousVectorField or JumpVectorField like PiecewiseV or BilliardV.
  • timespan the time span of the time-T-map.
  • alg algorithm in OrdinaryDiffEq to solve ODE.
  • N the dimension of the vector field.
  • T number type used in computation. Usually, Float64 is enough.

To ensure type stable, the numbers in timespan should be type of T. The last two parameters has to be specified, since we have to store the event data.

Keyword arguments

For ContinuousVectorField such as PiecewiseV, we have keyword argument:

  • region_detect=_region_detect the region detect function to determine which domain the state in.

You can also pass the keywords of solve of OrdinaryDiffEq to this function, except the callback and saving related keywords.

source
InvariantManifolds.timetmapFunction
timetmap(v::T, para, timespan, alg; region_detect=_region_detect, extra...)

The function timetmap is similar to setmap. The output of this function is a function which maps a SVector and parameters of ODE to a SVector, i.e. the time-T-map.

Parameters

  • v a ContinuousVectorField or JumpVectorField like PiecewiseV or BilliardV.
  • timespan the time span of the time-T-map.

To ensure type stable, the numbers timespan should be type of float numbers you are using.

  • alg algorithm in OrdinaryDiffEq to solve ODE.

Keyword arguments

For ContinuousVectorField such as PiecewiseV, we have keyword argument:

  • region_detect=_region_detect the region detect function to determine which domain the state in.

You can also pass the keywords of solve of OrdinaryDiffEq to this function, except the callback and saving related keywords.

source
InvariantManifolds.ns_solverFunction
ns_solver(v::T, para, timespan, alg, N, T)

The function ns_solver is similar to timetmap. The output of this function is a function which maps a SVector to a NSSolution. This NSSolution contain all data of an non-smooth ODE solution.

Parameters

  • v a ContinuousVectorField or JumpVectorField like PiecewiseV or BilliardV.
  • para the parameter of the vector field.
  • timespan the time span of the time-T-map.
  • alg algorithm in OrdinaryDiffEq to solve ODE.
  • N the dimension of the vector field.
  • T number type used in computation.

To ensure type stable, the numbers in para and timespan should be type of T. The last two parameters have to be specified, since we need to store the event data. You can also pass the keywords of solve of OrdinaryDiffEq to this function, except the callback and saving related keywords.

source
Missing docstring.

Missing docstring for segment. Check Documenter's build log for details.

InvariantManifolds.generate_curvesFunction
generate_curves(f, p, seg, d, n)

This function is to generate one-dimensional manifold of smooth mapping or a time-T-map of a non-smooth ODE.

Parameters

  • f a discrete map of type f(x,p)=SA[...] or a NSSetUp of non-smooth ODE;
  • para the parameters of systems;
  • seg initial segment of manifolds, which can be generated by function segment if the unstable direction is known;
  • d max distance between points;
  • n iteration times.
source
InvariantManifolds.generate_surfaceFunction
generate_surface(f, p, saddle, v1, v2, N, r, δ)

Function to generate the two dimension manifold of a vector field.

Parameters

  • f the time-T-map a the vector field;
  • p parameter of the system;
  • saddle saddle fixed point of the ODE system;
  • v1 an instable direction of the saddle;
  • v2 another instable direction of the saddle;
  • N iteration times;
  • r the radius of origin disk to extend;
  • δ the max distance between points when iterating.

Keyword arguments

  • n=150 the number of points in the boundary of the origin disk to extend.
source
Missing docstring.

Missing docstring for InvariantManifolds.addpoints. Check Documenter's build log for details.

InvariantManifolds.initialise_curveFunction
InvariantManifolds.initialise_curve(points, map, parameters)

This is a function to get the iteration curve. From [p0,...,pn], where p0 is the saddle point, to get [pn,...,f(pn)].

Parameters

  • points stands for distributed points in a local manifolds, points[1] is the saddle;
  • map is the map function;
  • parameters is the parameters of the map.
source