EquilibriumOrbitKS¶
Overview¶
-
class
orbithunter.
EquilibriumOrbitKS
(state=None, basis=None, parameters=None, discretization=None, constraints=None, **kwargs)[source]¶ Class for temporal equilibria
Notes
For convenience, this subclass accepts any (even) value for the time discretization. Only a single time point is required however to fully represent the solution and therefore perform any computations. If the discretization size is greater than 1 then then different bases will have the following shapes: field (N, M). spatial modes = (N, m), spatiotemporal modes (1, m). In other words, discretizations of this type can still be used in the optimization codes but will be much more inefficient. The reason for this choice is because it is possible to start with a spatiotemporal orbit with no symmetry (i.e. OrbitKS) and still end up at an equilibrium solution. Therefore, I am accommodating transformations from other orbit types to EquilibriumOrbitKS. To make the computations more efficient all that is required is usage of the method self.optimize_for_calculations(), which converts N -> 1, making the shape of the state (1, M) in the physical field basis. Also can inherit more methods with this choice. More details are included in the thesis and in the documentation. While only the imaginary components of the spatial modes are non-zero, both real and imaginary components are kept to allow for odd order spatial derivatives, required for the nonlinear term. Other allowed operations such as rotation are preferably performed after converting to a different symmetry type such as AntisymmetricOrbitKS or OrbitKS.
Methods¶
Note
See also Orbit
, OrbitKS
,
and AntisymmetricOrbitKS
,
Initialization¶
|
Initialize self. |
|
Initialize random parameters or state or both. |
|
Initialize a set of random spatiotemporal Fourier modes |
|
Should only be accessed through |
Special Methods¶
“Special” methods also known as “magic” or “dunder” (double underscore) methods account for most basic Math operations and other operations pertaining to NumPy arrays.
Note
See Orbit
for all definitions.
Properties¶
Current state array’s shape |
|
Current state array’s dimensionality |
|
Current state array’s number of dimensions |
Discretization and Dimensions¶
State array shapes in different bases. |
|
Tile dimensions. |
|
Strategy for combining tile dimensions in gluing; default is arithmetic averaging. |
|
Orbithunter conventions for discretization size. |
|
Dimensions according to plot labels; used in clipping. |
Math Functions¶
Vector representation of Orbit instance; constants all variables required to define the Orbit instance. |
|
Orbit instance with absolute value of state. |
|
|
Return the L_2 inner product of two orbits |
|
Norm of spatiotemporal state via numpy.linalg.norm |
|
Spatial derivative of the current state. |
|
A time derivative of the current state. |
|
Instance whose state is the Kuramoto-Sivashinsky equation evaluated at the current state |
|
Matrix-vector product of a vector with the Jacobian of the current state. |
|
Matrix-vector product with the adjoint of the Jacobian |
|
Precondition a vector with the inverse (aboslute value) of linear spatial terms |
|
Jacobian matrix evaluated at the current state. |
Visualization¶
|
Plot the velocity field as a 2-d density plot using matplotlib’s imshow |
|
Plot the spatiotemporal Fourier spectrum as a 2-d density plot using matplotlib’s imshow |
State Transformations¶
|
Transform current state to a different basis. |
Rediscretize the current state typically via zero padding or interpolation. |
|
|
Reflect the velocity field about the spatial midpoint |
|
Apply numpy roll along specified axis. |
|
Rotate by fraction of the period in either axis; nearest discrete approximate is taken. |
|
Rotate the velocity field in either space or time. |
Return a OrbitKS with shift-reflected velocity field |
|
Overwrite of parent method |
|
Overwrite of parent method |
|
|
Overwrite of parent method |
|
Overwrite of parent method |
Static¶
Labels of the different bases produced by transforms. |
|
The smallest possible compatible discretization |
|
The smallest valid increment to change the discretization by. |
|
Strings to use to label dimensions/periods |
|
Labels of all parameters |
|
Strings to use to label dimensions/periods. |
|
Bools indicating whether or not dimension is periodic. |
|
Indicates whether numpy indexing corresponds to increasing or decreasing values configuration space variable |
Other¶
Return an instance with copies of copy-able attributes. |
|
|
Return an Orbit instance with a numpy masked array state |
|
Set self constraints based on labels provided. |
Check whether the orbit converged to an equilibrium or close-to-zero solution |
Defaults¶
Dict of default values for constraints, parameter ranges, sizes, etc. |
|
The shape of a generic state, see core.py for details |
|
Default parameter ranges. |
|
Defaults for whether or not parameters are constrained. |
Reading and Writing Data¶
|
Method for convenience and consistent/conventional file naming. |
|
Export current state information to HDF5 file. |