Implementation of a incremental POD algorithm according to Oxberry et al. More...
#include <incrementalPOD.H>
Public Member Functions | |
| incrementalPOD () | |
| Constructors. | |
| incrementalPOD (GeometricField< Type, PatchField, GeoMesh > &snapshot, double _tol, word _PODnorm) | |
| Constructor with a first snapshot. | |
| ~incrementalPOD () | |
| Destructor. | |
| void | initialize (GeometricField< Type, PatchField, GeoMesh > &snapshot) |
| Initialize the incremental POD algorithm. | |
| void | addSnapshot (GeometricField< Type, PatchField, GeoMesh > &snapshot) |
| Add a snapshot to the POD space. | |
| void | fillPtrList () |
| Fill the POD modes prtList from the Eigen matrix. | |
| Eigen::VectorXd | project (GeometricField< Type, PatchField, GeoMesh > &inputField, label numberOfModes=0) |
| Project a field into the reduced space. | |
| GeometricField< Type, PatchField, GeoMesh > | reconstruct (GeometricField< Type, PatchField, GeoMesh > &inputField, Eigen::MatrixXd Coeff, word Name) |
| Reconstruct a field from the reduced coefficients. | |
| GeometricField< Type, PatchField, GeoMesh > | projectSnapshot (GeometricField< Type, PatchField, GeoMesh > &snapshot, label numberOfModes=0) |
| Project a snapshot onto the POD space. | |
| void | projectSnapshots (PtrList< GeometricField< Type, PatchField, GeoMesh > > snapshots, PtrList< GeometricField< Type, PatchField, GeoMesh > > &projSnapshots, label numberOfModes=0) |
| Project a list of snapshots onto the reduced space. | |
| void | writeModes () |
| Write to modes to file. | |
Public Member Functions inherited from Modes< Type, PatchField, GeoMesh > | |
| List< Eigen::MatrixXd > | toEigen () |
| Method that convert a PtrList of modes into Eigen matrices filling the EigenModes object. | |
| PtrList< GeometricField< Type, PatchField, GeoMesh > > & | toPtrList () |
| Function that returns the Modes object as a standard PtrList. | |
| List< Eigen::MatrixXd > | project (fvMatrix< Type > &Af, label numberOfModes=0, word projType="G") |
| A function that project an FvMatrix (OpenFoam linear System) on the modes. | |
| Eigen::MatrixXd | project (GeometricField< Type, PatchField, GeoMesh > &field, label numberOfModes=0, word projType="G", fvMatrix< Type > *Af=NULL) |
| A function that project a field on the modes. | |
| Eigen::MatrixXd | project (PtrList< GeometricField< Type, PatchField, GeoMesh > > &fields, label numberOfModes=0, word projType="G", fvMatrix< Type > *Af=NULL) |
| A function that project a list of fields on the modes. | |
| GeometricField< Type, PatchField, GeoMesh > | projectSnapshot (GeometricField< Type, PatchField, GeoMesh > &field, label numberOfModes=0, word projType="G", fvMatrix< Type > *Af=NULL) |
| A function that project and reconstruct a snapshot on the modes. | |
| GeometricField< Type, PatchField, GeoMesh > | reconstruct (GeometricField< Type, PatchField, GeoMesh > &inputField, Eigen::MatrixXd Coeff, word Name) |
| Function to reconstruct the solution starting from the coefficients, in this case the field is passed as input/output. | |
| PtrList< GeometricField< Type, PatchField, GeoMesh > > | reconstruct (GeometricField< Type, PatchField, GeoMesh > &inputField, List< Eigen::MatrixXd > Coeff, word Name) |
| Function to reconstruct a list of fields starting from a list of coefficients, in this case the list of fields is filled by reconstructing each field from a coefficients matrix inside the list passed. | |
| void | projectSnapshots (PtrList< GeometricField< Type, PatchField, GeoMesh > > snapshots, PtrList< GeometricField< Type, PatchField, GeoMesh > > &projSnapshots, label numberOfModes=0, word innerProduct="L2") |
| Function to project a list of fields into the modes manifold. | |
| void | projectSnapshots (PtrList< GeometricField< Type, PatchField, GeoMesh > > snapshots, PtrList< GeometricField< Type, PatchField, GeoMesh > > &projSnapshots, word innerProduct="L2") |
| Function to project a list of fields into the modes manifold by the use of all the modes. | |
| void | projectSnapshots (PtrList< GeometricField< Type, PatchField, GeoMesh > > snapshots, PtrList< GeometricField< Type, PatchField, GeoMesh > > &projSnapshots, PtrList< volScalarField > Volumes, label numberOfModes=0, word innerProduct="L2") |
| Function to project a list of fields into the modes manifold. | |
| void | projectSnapshots (PtrList< GeometricField< Type, PatchField, GeoMesh > > snapshots, PtrList< GeometricField< Type, PatchField, GeoMesh > > &projSnapshots, PtrList< volScalarField > Volumes, word innerProduct) |
| Function to project a list of fields into the modes manifold by the use of all the modes. | |
| void | operator= (const PtrList< GeometricField< Type, PatchField, GeoMesh > > &modes) |
Public Attributes | |
| double | tolleranceSVD = 0 |
| Tollerance for the incremental SVD. | |
| int | rank = 0 |
| Rank of the reduced space. | |
| word | PODnorm |
| POD norm used for projection. It can be L2 or Frobenius. | |
| Eigen::VectorXd | massVector |
| Vector of the cells volumes. | |
| Eigen::VectorXd | singularValues |
| Vector of the singular values. | |
| word | outputFolder = "./ITHACAoutput/incrementalPOD/" |
| Folder where the modes and singular values are saved. | |
Public Attributes inherited from Modes< Type, PatchField, GeoMesh > | |
| List< Eigen::MatrixXd > | EigenModes |
| List of Matrices that contains the internalField and the additional matrices for the boundary patches. | |
| label | NBC |
| Number of patches. | |
Implementation of a incremental POD algorithm according to Oxberry et al.
"Limited-memory adaptive snapshot selection for proper orthogonal decomposition"
Definition at line 65 of file incrementalPOD.H.
|
inline |
| incrementalPOD< Type, PatchField, GeoMesh >::incrementalPOD | ( | GeometricField< Type, PatchField, GeoMesh > & | snapshot, |
| double | _tol, | ||
| word | _PODnorm ) |
Constructor with a first snapshot.
| [in] | snapshot | A first snapshot |
| [in] | _tol | Incremental SVD tollerance |
| [in] | _maxRank | i Maximum POD rank |
Definition at line 38 of file incrementalPOD.C.
|
inline |
Destructor.
Definition at line 103 of file incrementalPOD.H.
| void incrementalPOD< Type, PatchField, GeoMesh >::addSnapshot | ( | GeometricField< Type, PatchField, GeoMesh > & | snapshot | ) |
Add a snapshot to the POD space.
| [in] | snapshot | Snapshot to add |
Definition at line 96 of file incrementalPOD.C.
| void incrementalPOD< Type, PatchField, GeoMesh >::fillPtrList | ( | ) |
Fill the POD modes prtList from the Eigen matrix.
Definition at line 209 of file incrementalPOD.C.
| void incrementalPOD< Type, PatchField, GeoMesh >::initialize | ( | GeometricField< Type, PatchField, GeoMesh > & | snapshot | ) |
Initialize the incremental POD algorithm.
| [in] | snapshot | A first snapshot |
Definition at line 52 of file incrementalPOD.C.
| Eigen::VectorXd incrementalPOD< Type, PatchField, GeoMesh >::project | ( | GeometricField< Type, PatchField, GeoMesh > & | inputField, |
| label | numberOfModes = 0 ) |
Project a field into the reduced space.
| [in] | inputField | Field to project |
Definition at line 224 of file incrementalPOD.C.
| GeometricField< Type, PatchField, GeoMesh > incrementalPOD< Type, PatchField, GeoMesh >::projectSnapshot | ( | GeometricField< Type, PatchField, GeoMesh > & | snapshot, |
| label | numberOfModes = 0 ) |
Project a snapshot onto the POD space.
| [in] | snapshot | Snapshot to project |
| [in] | numberOfModes | Number of modes for projection (0 for all modes) |
Definition at line 285 of file incrementalPOD.C.
| void incrementalPOD< Type, PatchField, GeoMesh >::projectSnapshots | ( | PtrList< GeometricField< Type, PatchField, GeoMesh > > | snapshots, |
| PtrList< GeometricField< Type, PatchField, GeoMesh > > & | projSnapshots, | ||
| label | numberOfModes = 0 ) |
Project a list of snapshots onto the reduced space.
| [in] | snapshots | Snapshots to be projected |
| [in/out] | projSnapshots Projected snapshots | |
| [in] | numberOfModes | Number of modes for projection (0 for all modes) |
Definition at line 329 of file incrementalPOD.C.
| GeometricField< Type, PatchField, GeoMesh > incrementalPOD< Type, PatchField, GeoMesh >::reconstruct | ( | GeometricField< Type, PatchField, GeoMesh > & | inputField, |
| Eigen::MatrixXd | Coeff, | ||
| word | Name ) |
Reconstruct a field from the reduced coefficients.
| [in/out] | inputField Reconstructed field | |
| [in] | Coeff | Reduced coefficients |
| [in] | Name | Name of the reconstructed field |
Definition at line 264 of file incrementalPOD.C.
| void incrementalPOD< Type, PatchField, GeoMesh >::writeModes | ( | ) |
Write to modes to file.
Definition at line 383 of file incrementalPOD.C.
| Eigen::VectorXd incrementalPOD< Type, PatchField, GeoMesh >::massVector |
Vector of the cells volumes.
Definition at line 79 of file incrementalPOD.H.
| word incrementalPOD< Type, PatchField, GeoMesh >::outputFolder = "./ITHACAoutput/incrementalPOD/" |
Folder where the modes and singular values are saved.
Definition at line 85 of file incrementalPOD.H.
| word incrementalPOD< Type, PatchField, GeoMesh >::PODnorm |
POD norm used for projection. It can be L2 or Frobenius.
Definition at line 76 of file incrementalPOD.H.
| int incrementalPOD< Type, PatchField, GeoMesh >::rank = 0 |
Rank of the reduced space.
Definition at line 73 of file incrementalPOD.H.
| Eigen::VectorXd incrementalPOD< Type, PatchField, GeoMesh >::singularValues |
Vector of the singular values.
Definition at line 82 of file incrementalPOD.H.
| double incrementalPOD< Type, PatchField, GeoMesh >::tolleranceSVD = 0 |
Tollerance for the incremental SVD.
Definition at line 70 of file incrementalPOD.H.
1.13.2