SnapshotPOD
The Snapshot Proper Orthogonal Decomposition (POD) method is the second variant of the POD method which considers the
decomposition of a dataset into deterministic temporal modes and random spatial coefficients. Essentially, this method
interchanges the time and position. In most problems the number of solution snapshots \(m\) is less than the number
of dimensions \(n = N_x \times N_y\) where \(N_x, N_y\) are the grid dimensions. Thus, by using the
SnapshotPOD
class, one can reconstruct solutions much faster (Sirovich [6]).
For the Snapshot POD, again a two-dimensional dataset \(\mathbf{U}\in \mathbb{R}^{n\times m}\) is constructed where \(m\) is the number of snapshots and \(n\) is the number of problem dimensions. The covariance matrix \(\mathbf{C_s}\), is calculated as follows
The eigenvalue problem is solved and the temporal modes (eigenvectors) are calculated as
Spatial coefficients are therefore calculated as \(\Phi_s = \mathbf{U}^T A_s\). Finally, a predefined number of \(k\)-POD temporal modes and spatial coefficients can be considered for the reconstruction of data as follows
SnapshotPOD Class
The SnapshotPOD
class is imported using the following command:
>>> from UQpy.dimension_reduction.pod.SnapshotPOD import SnapshotPOD
One can use the following command to instantiate the class SnapshotPOD
Methods
- class SnapshotPOD(solution_snapshots=None, n_modes=None, reconstruction_percentage=None)[source]
- Parameters:
solution_snapshots (
Union
[ndarray
,list
,None
]) –Array or list containing the solution snapshots. If provided as an
numpy.ndarray
, it should be three-dimensional, where the third dimension of the array corresponds to the number of snapshots. If provided as a list, the length of the list corresponds to the number of snapshots.If solution_snapshots is provided, the
run()
method will be executed automatically. If it is not provided, then therun()
method must be executed manually and provided with solution_snapshots.n_modes (
Optional
[int
]) – Number of POD modes used to approximate the input solution. Must be less than or equal to the number of dimensions in a snapshot. Either n_modes or reconstruction_percentage must be provided, but not both.reconstruction_percentage (
Union
[int
,float
,None
]) – Specified dataset reconstruction percentage. Must be between 0 and 100. Either n_modes or reconstruction_percentage must be provided, but not both.
- run(solution_snapshots)[source]
Executes proper orthogonal decomposition using the
SnapshotPOD
algorithm.
Attributes
- SnapshotPOD.reconstructed_solution
An array containing the solution snapshots reduced in the spatial dimension.
- SnapshotPOD.reduced_solution
Second order tensor containing the reconstructed solution snapshots in their initial spatial and temporal dimensions.
- SnapshotPOD.eigenvalues
Eigenvalues produced by the POD decomposition of the solution snapshots.
- SnapshotPOD.phi
Eigenvectors produced by the POD decomposition of the solution snapshots.