DirectPOD

The Direct Proper Orthogonal Decomposition (POD) is the first variant of the POD method and is used for the extraction of a set of orthogonal spatial basis functions and corresponding time coefficients from a dataset. The DirectPOD class is used for dimensionality reduction of datasets obtained by numerical simulations, given a desired level of accuracy.

For the Direct POD method, 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 is computed as follows

\[\mathbf{C} = \frac{1}{m-1} \mathbf{U}^T \mathbf{U}\]

Next, the eigenvalue problem is solved for the covariance matrix as

\[\mathbf{C} \Phi = \lambda \Phi\]

In total, \(n\) eigenvalues \(\lambda_1,... \lambda_n\) and a corresponding set of eigenvectors, arranged as columns in an \(n \times n\) matrix \(\Phi\), are obtained. The \(n\) columns of this matrix are the POD modes of the dataset. The original snapshot matrix \(\mathbf{U}\), can be expressed as the sum of the contributions of the \(n\) deterministic modes. The temporal coefficients are calculated as \(A = \mathbf{U} \Phi\). A predefined number of \(k\) POD spatial modes (eigenvectors) and temporal coefficients can be considered for the reconstruction of data as follows

\[\mathbf{\tilde{u}}(\mathtt{x},t) = \sum_{i=1}^{k}A_i(t)\Phi_i(\mathtt{x})\]

DirectPOD Class

The DirectPOD class is imported using the following command:

>>> from UQpy.dimension_reduction.pod.DirectPOD import DirectPOD

One can use the following command to instantiate the class DirectPOD

Methods

class DirectPOD(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 the run() 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 DirectPOD algorithm.

Attributes

DirectPOD.reconstructed_solution

An array containing the solution snapshots reduced in the spatial dimension.

DirectPOD.reduced_solution

Second order tensor containing the reconstructed solution snapshots in their initial spatial and temporal dimensions.

DirectPOD.U

Two dimensional dataset constructed by POD

DirectPOD.eigenvalues

Eigenvalues produced by the POD decomposition of the solution snapshots.

DirectPOD.phi

Eigenvectors produced by the POD decomposition of the solution snapshots.