ShiftReflectionOrbitKS

Overview

class orbithunter.ShiftReflectionOrbitKS(state=None, basis=None, parameters=None, discretization=None, constraints=None, **kwargs)[source]

Methods

Note

See also Orbit and OrbitKS.

Initialization

ShiftReflectionOrbitKS.__init__([state, …])

Initialize self.

ShiftReflectionOrbitKS.populate([attr])

Initialize random parameters or state or both.

ShiftReflectionOrbitKS._populate_state(**kwargs)

Initialize a set of random spatiotemporal Fourier modes

ShiftReflectionOrbitKS._populate_parameters(…)

Should only be accessed through Orbit.populate()

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

ShiftReflectionOrbitKS.shape

Current state array’s shape

ShiftReflectionOrbitKS.size

Current state array’s dimensionality

ShiftReflectionOrbitKS.ndim

Current state array’s number of dimensions

Discretization and Dimensions

ShiftReflectionOrbitKS.shapes()

State array shapes in different bases.

ShiftReflectionOrbitKS.dimensions()

Tile dimensions.

ShiftReflectionOrbitKS.glue_dimensions(…)

Strategy for combining tile dimensions in gluing; default is arithmetic averaging.

ShiftReflectionOrbitKS.dimension_based_discretization(…)

Return discretization size according to orbithunter conventions for the KSe.

ShiftReflectionOrbitKS.plotting_dimensions()

Dimensions according to plot labels; used in clipping.

Math Functions

ShiftReflectionOrbitKS.orbit_vector()

Vector representation of Orbit instance; constants all variables required to define the Orbit instance.

ShiftReflectionOrbitKS.abs()

Orbit instance with absolute value of state.

ShiftReflectionOrbitKS.dot(other)

Return the L_2 inner product of two orbits

ShiftReflectionOrbitKS.norm([order])

Norm of spatiotemporal state via numpy.linalg.norm

ShiftReflectionOrbitKS.dx(**kwargs)

Spatial derivative of the current state.

ShiftReflectionOrbitKS.dt([order, array])

Spectral time derivatives of the current state.

ShiftReflectionOrbitKS.eqn(**kwargs)

Instance whose state is the Kuramoto-Sivashinsky equation evaluated at the current state

ShiftReflectionOrbitKS.matvec(other, **kwargs)

Matrix-vector product of a vector with the Jacobian of the current state.

ShiftReflectionOrbitKS.rmatvec(other, **kwargs)

Matrix-vector product with the adjoint of the Jacobian

ShiftReflectionOrbitKS.precondition(**kwargs)

Rescale a vector with the inverse (absolute value) of linear spatial terms

ShiftReflectionOrbitKS.jacobian(**kwargs)

Jacobian matrix evaluated at the current state.

Visualization

ShiftReflectionOrbitKS.plot([show, save, …])

Plot the velocity field as a 2-d density plot using matplotlib’s imshow

ShiftReflectionOrbitKS.mode_plot([show, …])

Plot the spatiotemporal Fourier spectrum as a 2-d density plot using matplotlib’s imshow

State Transformations

ShiftReflectionOrbitKS.transform([to, …])

Transform current state to a different basis.

ShiftReflectionOrbitKS.resize(…)

Rediscretize the current state typically via zero padding or interpolation.

ShiftReflectionOrbitKS.reflection([axis, signed])

Reflect the velocity field about the spatial midpoint

ShiftReflectionOrbitKS.roll(shift[, axis])

Apply numpy roll along specified axis.

ShiftReflectionOrbitKS.cell_shift(n_cell[, axis])

Rotate by fraction of the period in either axis; nearest discrete approximate is taken.

ShiftReflectionOrbitKS.rotate(distance[, …])

Rotate the velocity field in either space or time.

ShiftReflectionOrbitKS.shift_reflection()

Return a OrbitKS with shift-reflected velocity field

ShiftReflectionOrbitKS.to_fundamental_domain([half])

Overwrite of parent method

ShiftReflectionOrbitKS.from_fundamental_domain([half])

Reconstruct full field from discrete fundamental domain

ShiftReflectionOrbitKS._pad(size[, axis])

Overwrite of parent method

ShiftReflectionOrbitKS._truncate(size[, axis])

Overwrite of parent method

Static

ShiftReflectionOrbitKS.bases_labels()

Labels of the different bases produced by transforms.

ShiftReflectionOrbitKS.minimal_shape()

The smallest possible compatible discretization to have full functionality.

ShiftReflectionOrbitKS.minimal_shape_increments()

The smallest valid increment to change the discretization by.

ShiftReflectionOrbitKS.discretization_labels()

Strings to use to label dimensions/periods

ShiftReflectionOrbitKS.parameter_labels()

Labels of all parameters

ShiftReflectionOrbitKS.dimension_labels()

Strings to use to label dimensions/periods.

ShiftReflectionOrbitKS.periodic_dimensions()

Bools indicating whether or not dimension is periodic.

ShiftReflectionOrbitKS.positive_indexing()

Indicates whether numpy indexing corresponds to increasing or decreasing values configuration space variable

Other

ShiftReflectionOrbitKS.copy()

Return an instance with copies of copy-able attributes.

ShiftReflectionOrbitKS.mask(masking_array[, …])

Return an Orbit instance with a numpy masked array state

ShiftReflectionOrbitKS.constrain(*labels)

Set self constraints based on labels provided.

ShiftReflectionOrbitKS.preprocess()

Check whether the orbit converged to an equilibrium or close-to-zero solution

ShiftReflectionOrbitKS.selection_rules()

Symmetry selection rules

Defaults

ShiftReflectionOrbitKS.defaults()

Dict of default values for constraints, parameter ranges, sizes, etc.

ShiftReflectionOrbitKS._default_shape()

The default array shape when dimensions are not specified.

ShiftReflectionOrbitKS._default_parameter_ranges()

Default parameter ranges.

ShiftReflectionOrbitKS._default_constraints()

Defaults for whether or not parameters are constrained.

Reading and Writing Data

ShiftReflectionOrbitKS.filename([extension, …])

Method for convenience and consistent/conventional file naming.

ShiftReflectionOrbitKS.to_h5([filename, …])

Export current state information to HDF5 file.