Loading...
Searching...
No Matches
incrementalPOD< Type, PatchField, GeoMesh > Class Template Reference

Implementation of a incremental POD algorithm according to Oxberry et al. More...

#include <incrementalPOD.H>

Inheritance diagram for incrementalPOD< Type, PatchField, GeoMesh >:
Modes< Type, PatchField, GeoMesh >

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.
 

Detailed Description

template<class Type, template< class > class PatchField, class GeoMesh>
class incrementalPOD< Type, PatchField, GeoMesh >

Implementation of a incremental POD algorithm according to Oxberry et al.

"Limited-memory adaptive snapshot selection for proper orthogonal decomposition"

Examples
20incrementalPOD.C.

Definition at line 65 of file incrementalPOD.H.

Constructor & Destructor Documentation

◆ incrementalPOD() [1/2]

template<class Type , template< class > class PatchField, class GeoMesh >
incrementalPOD< Type, PatchField, GeoMesh >::incrementalPOD ( )
inline

Constructors.

Construct Null

Definition at line 90 of file incrementalPOD.H.

◆ incrementalPOD() [2/2]

template<class Type , template< class > class PatchField, class GeoMesh >
incrementalPOD< Type, PatchField, GeoMesh >::incrementalPOD ( GeometricField< Type, PatchField, GeoMesh > & snapshot,
double _tol,
word _PODnorm )

Constructor with a first snapshot.

Parameters
[in]snapshotA first snapshot
[in]_tolIncremental SVD tollerance
[in]_maxRanki Maximum POD rank

Definition at line 38 of file incrementalPOD.C.

◆ ~incrementalPOD()

template<class Type , template< class > class PatchField, class GeoMesh >
incrementalPOD< Type, PatchField, GeoMesh >::~incrementalPOD ( )
inline

Destructor.

Definition at line 103 of file incrementalPOD.H.

Member Function Documentation

◆ addSnapshot()

template<class Type , template< class > class PatchField, class GeoMesh >
void incrementalPOD< Type, PatchField, GeoMesh >::addSnapshot ( GeometricField< Type, PatchField, GeoMesh > & snapshot)

Add a snapshot to the POD space.

Parameters
[in]snapshotSnapshot to add

Definition at line 96 of file incrementalPOD.C.

◆ fillPtrList()

template<class Type , template< class > class PatchField, class GeoMesh >
void incrementalPOD< Type, PatchField, GeoMesh >::fillPtrList ( )

Fill the POD modes prtList from the Eigen matrix.

Definition at line 209 of file incrementalPOD.C.

◆ initialize()

template<class Type , template< class > class PatchField, class GeoMesh >
void incrementalPOD< Type, PatchField, GeoMesh >::initialize ( GeometricField< Type, PatchField, GeoMesh > & snapshot)

Initialize the incremental POD algorithm.

Parameters
[in]snapshotA first snapshot

Definition at line 52 of file incrementalPOD.C.

◆ project()

template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::VectorXd incrementalPOD< Type, PatchField, GeoMesh >::project ( GeometricField< Type, PatchField, GeoMesh > & inputField,
label numberOfModes = 0 )

Project a field into the reduced space.

Parameters
[in]inputFieldField to project
Returns
The coefficient of the projected field into the reduced space

Definition at line 223 of file incrementalPOD.C.

◆ projectSnapshot()

template<class Type , template< class > class PatchField, class GeoMesh >
GeometricField< Type, PatchField, GeoMesh > incrementalPOD< Type, PatchField, GeoMesh >::projectSnapshot ( GeometricField< Type, PatchField, GeoMesh > & snapshot,
label numberOfModes = 0 )

Project a snapshot onto the POD space.

Parameters
[in]snapshotSnapshot to project
[in]numberOfModesNumber of modes for projection (0 for all modes)
Returns
The projected snapshot

Definition at line 284 of file incrementalPOD.C.

◆ projectSnapshots()

template<class Type , template< class > class PatchField, class GeoMesh >
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.

Parameters
[in]snapshotsSnapshots to be projected
[in/out]projSnapshots Projected snapshots
[in]numberOfModesNumber of modes for projection (0 for all modes)

Definition at line 328 of file incrementalPOD.C.

◆ reconstruct()

template<class Type , template< class > class PatchField, class GeoMesh >
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.

Parameters
[in/out]inputField Reconstructed field
[in]CoeffReduced coefficients
[in]NameName of the reconstructed field
Returns
Reconstructed field

Definition at line 263 of file incrementalPOD.C.

◆ writeModes()

template<class Type , template< class > class PatchField, class GeoMesh >
void incrementalPOD< Type, PatchField, GeoMesh >::writeModes ( )

Write to modes to file.

Definition at line 382 of file incrementalPOD.C.

Member Data Documentation

◆ massVector

template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::VectorXd incrementalPOD< Type, PatchField, GeoMesh >::massVector

Vector of the cells volumes.

Definition at line 79 of file incrementalPOD.H.

◆ outputFolder

template<class Type , template< class > class PatchField, class GeoMesh >
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.

◆ PODnorm

template<class Type , template< class > class PatchField, class GeoMesh >
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.

◆ rank

template<class Type , template< class > class PatchField, class GeoMesh >
int incrementalPOD< Type, PatchField, GeoMesh >::rank = 0

Rank of the reduced space.

Definition at line 73 of file incrementalPOD.H.

◆ singularValues

template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::VectorXd incrementalPOD< Type, PatchField, GeoMesh >::singularValues

Vector of the singular values.

Definition at line 82 of file incrementalPOD.H.

◆ tolleranceSVD

template<class Type , template< class > class PatchField, class GeoMesh >
double incrementalPOD< Type, PatchField, GeoMesh >::tolleranceSVD = 0

Tollerance for the incremental SVD.

Definition at line 70 of file incrementalPOD.H.


The documentation for this class was generated from the following files: