API
Missing docstring for State
. Check Documenter's build log for details.
InvariantManifolds.NSState
— TypeNSState{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 fromH<0
orH>0
;2
represents the event that flow cross the sliding surface;3
represents the event that flow slides out the sliding surface fromH=0
toH<0
orH>0
.
Missing docstring for IterationCurve
. Check Documenter's build log for details.
Missing docstring for NSSolution
. Check Documenter's build log for details.
InvariantManifolds.NSSetUp
— TypeNSSetUp{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, likePiecewiseV
;timespan
the time span of time-T-map;timetmap
the time-t-map of non-smooth ODE, which maps aState
and parameters of ODE to aNSState
.
InvariantManifolds.AnnulusBoundaries
— TypeAnnulusBoundaries
A struct contains data when generating the two dimensional manifold.
Fields
inner
anIterationCurve
represents inner boundary;outer
anIterationCurve
represents outer boundary;
InvariantManifolds.PiecewiseV
— TypePiecewiseV <: 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,...]
, wherer1(x,p,t)
should return a Bool value to indicate thatx
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 aPiecewiseV
.
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
.
InvariantManifolds.BilliardV
— TypeBilliardV <: 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 typef(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,...)
.
InvariantManifolds.SFilippovV
— TypeSFilippovV <: 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 offs
.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 aSFilippovV
.
InvariantManifolds.setmap
— Functionsetmap(v::T, timespan, alg, N, T; region_detect=_region_detect, extra...)
The function setmap
is to get a NSSetUp
.
Parameters
v
aContinuousVectorField
orJumpVectorField
likePiecewiseV
orBilliardV
.timespan
the time span of the time-T-map.alg
algorithm inOrdinaryDiffEq
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.
InvariantManifolds.timetmap
— Functiontimetmap(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
aContinuousVectorField
orJumpVectorField
likePiecewiseV
orBilliardV
.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 inOrdinaryDiffEq
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.
InvariantManifolds.ns_solver
— Functionns_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
aContinuousVectorField
orJumpVectorField
likePiecewiseV
orBilliardV
.para
the parameter of the vector field.timespan
the time span of the time-T-map.alg
algorithm inOrdinaryDiffEq
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.
Missing docstring for segment
. Check Documenter's build log for details.
InvariantManifolds.generate_curves
— Functiongenerate_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 typef(x,p)=SA[...]
or aNSSetUp
of non-smooth ODE;para
the parameters of systems;seg
initial segment of manifolds, which can be generated by functionsegment
if the unstable direction is known;d
max distance between points;n
iteration times.
InvariantManifolds.generate_surface
— Functiongenerate_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 thesaddle
;v2
another instable direction of thesaddle
;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.
Missing docstring for InvariantManifolds.addpoints
. Check Documenter's build log for details.
InvariantManifolds.initialise_curve
— FunctionInvariantManifolds.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 themap
.
InvariantManifolds.ns_initialise_curve
— FunctionInvariantManifolds.ns_initialise_curve(points, tmap, para)
Initialise the curve of non-smooth ODE's time-T-map.