romtools.vector_space.utils.shifter#
Notes
The vector defining the affine offset for a linear subspace is viewed as a matrix of shape
Theory#
What is a shift vector, and why would I use it? In ROMs, we restrict a state to belong to a low-dimensional affine vector space, .. math:
\mathbf{u} \approx \tilde{\mathbf{u}} \in \mathcal{V} + \mathbf{u}_{\mathrm{shift}}
where \(\mathcal{V} \equiv \mathrm{range}(\boldsymbol \Phi)\). Here \(\mathbf{u}_{\mathrm{shift}}\) defines an affine offset. Affine offsets can be useful for a variety of reasons, including satisfying boundary conditions, and satisfying initial conditions.
The _Shifter class encapsulates the affine offset.
API#
Functions
|
Shifts the data by the average of a data matrix. |
|
Shifts the data by a constant value. |
|
Shifts the data by the first vector of a data matrix. |
|
No op implementation. |
|
Shifts the data by a user-input vector. |
Classes
|
Interface for the Shifter class. |
- class romtools.vector_space.utils.shifter.Shifter(*args, **kwargs)[source]#
Bases:
ProtocolInterface for the Shifter class.
- apply_inverse_shift(my_array)[source]#
Shifts the snapshot matrix by adding a vector generated by the public-facing free functions.
- Parameters:
my_array (ndarray)
- Return type:
None
- romtools.vector_space.utils.shifter.create_average_shifter(my_array)[source]#
Shifts the data by the average of a data matrix.
- Parameters:
my_array (ndarray)
- Return type:
- romtools.vector_space.utils.shifter.create_constant_shifter(shift_value, my_array)[source]#
Shifts the data by a constant value.
- Parameters:
my_array (ndarray)
- Return type:
- romtools.vector_space.utils.shifter.create_firstvec_shifter(my_array)[source]#
Shifts the data by the first vector of a data matrix.
- Parameters:
my_array (ndarray)
- Return type: