Implementation of a container class derived from PtrList. More...
#include <Modes.H>
Public Member Functions | |
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 | |
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 container class derived from PtrList.
It is meant to store POD modes.
This a child class of the PtrList class, it is meant to store modes and contains some additional operations to project the modes and to reconstruct a solution from the coefficients.
T | Type of the Geometric Field used inside the List, it can be vector or scalar |
void Modes< Type, PatchField, GeoMesh >::operator= | ( | const PtrList< GeometricField< Type, PatchField, GeoMesh > > & | modes | ) |
List< Eigen::MatrixXd > Modes< Type, PatchField, GeoMesh >::project | ( | fvMatrix< Type > & | Af, |
label | numberOfModes = 0, | ||
word | projType = "G" ) |
A function that project an FvMatrix (OpenFoam linear System) on the modes.
Used to project an FvMatrix that is a standard linear system of OpenFoam onto the modes defined inside the Modes container. The output is a list of matrices that contains in the first element the reduced matrix and in the second element the source term.
[in] | Af | The OpenFOAM fvMatrix linear system, it can be vector or scalar matrix |
[in] | numberOfModes | The number of modes used to project. If not given it will use all the available ones. |
[in] | projType | The projection type, it can be Galerkin "G" or Petrov-Galerkin "PG" |
Eigen::MatrixXd Modes< Type, PatchField, GeoMesh >::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.
Used to project a field onto the modes defined inside the Modes container. The output is matrix containing the projected field.
[in] | field | The field to be projected, it can be vector or scalar. |
[in] | numberOfModes | The number of modes used to project. If not given it will use all the available ones. |
[in] | projType | The projection type, it can be Galerkin "G" or Petrov-Galerkin "PG" |
Af | The system matrix used in case of Petrov-Galerkin projection |
Eigen::MatrixXd Modes< Type, PatchField, GeoMesh >::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.
Used to project a list of fields onto the modes defined inside the Modes container. The output is a list of matrices containing the projected field.
[in] | fields | The fields list to be projected, it can be vector or scalar. |
[in] | numberOfModes | The number of modes used to project. If not given it will use all the available ones. |
[in] | projType | The projection type, it can be Galerkin "G", Petrov-Galerkin "PG" or "F" Frobenius |
[in] | Af | The system matrix used in case of Petrov-Galerkin projection |
GeometricField< Type, PatchField, GeoMesh > Modes< 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.
field | The field one wants to project | |
[in] | numberOfModes | The number of modes |
[in] | projType | The projection type, it can be Galerkin "G", Petrov-Galerkin "PG" or "F" Frobenius |
Af | The system matrix used in case of Petrov-Galerkin projection |
void Modes< Type, PatchField, GeoMesh >::projectSnapshots | ( | PtrList< GeometricField< Type, PatchField, GeoMesh > > | snapshots, |
PtrList< GeometricField< Type, PatchField, GeoMesh > > & | projSnapshots, | ||
label | numberOfModes = 0, | ||
word | innerProduct = "L2" ) |
void Modes< Type, PatchField, GeoMesh >::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.
[in] | snapshots | The list of snapshots to be projected |
[in] | Volumes | The mesh volumes for the inner product |
[in] | numberOfModes | The number of modes you want to use |
[in] | innerProduct | The inner product to be applied |
void Modes< Type, PatchField, GeoMesh >::projectSnapshots | ( | PtrList< GeometricField< Type, PatchField, GeoMesh > > | snapshots, |
PtrList< GeometricField< Type, PatchField, GeoMesh > > & | projSnapshots, | ||
PtrList< volScalarField > | Volumes, | ||
word | innerProduct ) |
void Modes< Type, PatchField, GeoMesh >::projectSnapshots | ( | PtrList< GeometricField< Type, PatchField, GeoMesh > > | snapshots, |
PtrList< GeometricField< Type, PatchField, GeoMesh > > & | projSnapshots, | ||
word | innerProduct = "L2" ) |
GeometricField< Type, PatchField, GeoMesh > Modes< 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.
[in/out] | inputField The input/output field | |
[in] | Coeff | The coefficients of the POD expansion |
[in] | Name | The name of the field you want to return |
PtrList< GeometricField< Type, PatchField, GeoMesh > > Modes< 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.
inputField | The input field | |
[in] | Coeff | The list of coefficients of the POD expansion |
[in] | Name | The name |
List< Eigen::MatrixXd > Modes< Type, PatchField, GeoMesh >::toEigen | ( | ) |
|
inline |
List<Eigen::MatrixXd> Modes< Type, PatchField, GeoMesh >::EigenModes |
label Modes< Type, PatchField, GeoMesh >::NBC |