40#pragma GCC diagnostic push
41#pragma GCC diagnostic ignored "-Wold-style-cast"
43#include <unsupported/Eigen/SparseExtra>
44#include <unsupported/Eigen/CXX11/Tensor>
45#pragma GCC diagnostic pop
67template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
68class Modes :
public PtrList<GeometricField<Type, PatchField, GeoMesh >>
86 PtrList<GeometricField<Type, PatchField, GeoMesh >> &
toPtrList()
88 return static_cast<PtrList<GeometricField<Type, PatchField, GeoMesh >
>& >
114 List<Eigen::MatrixXd>
project(fvMatrix<Type>& Af, label numberOfModes = 0,
115 word projType =
"G");
134 Eigen::MatrixXd
project(GeometricField<Type, PatchField, GeoMesh>& field,
135 label numberOfModes = 0, word projType =
"G", fvMatrix<Type>* Af = NULL);
154 Eigen::MatrixXd
project(PtrList<GeometricField<Type, PatchField, GeoMesh >> &
156 label numberOfModes = 0, word projType =
"G", fvMatrix<Type>* Af = NULL);
169 GeometricField<Type, PatchField, GeoMesh>& field,
170 label numberOfModes = 0, word projType =
"G", fvMatrix<Type>* Af = NULL);
185 GeometricField<Type, PatchField, GeoMesh>& inputField, Eigen::MatrixXd Coeff,
201 GeometricField<Type, PatchField, GeoMesh>& inputField,
202 List < Eigen::MatrixXd> Coeff,
213 snapshots, PtrList<GeometricField<Type, PatchField, GeoMesh >>& projSnapshots,
214 label numberOfModes = 0, word innerProduct =
"L2");
223 snapshots, PtrList<GeometricField<Type, PatchField, GeoMesh >>& projSnapshots,
224 word innerProduct =
"L2");
235 snapshots, PtrList<GeometricField<Type, PatchField, GeoMesh >>& projSnapshots,
236 PtrList<volScalarField> Volumes,
237 label numberOfModes = 0, word innerProduct =
"L2");
247 snapshots, PtrList<GeometricField<Type, PatchField, GeoMesh >>& projSnapshots,
248 PtrList<volScalarField> Volumes,
251 void operator=(
const PtrList<GeometricField<Type, PatchField, GeoMesh >> &
Header file of the Foam2Eigen class.
Header file of the ITHACAstream class, it contains the implementation of several methods for input ou...
Header file of the ITHACAutilities namespace.
Modes< vector, fvPatchField, volMesh > volVectorModes
Modes< scalar, fvPatchField, volMesh > volScalarModes
Modes< scalar, fvsPatchField, surfaceMesh > surfaceScalarModes
Implementation of a container class derived from PtrList.
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.
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 ...
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...
List< Eigen::MatrixXd > EigenModes
List< Eigen::MatrixXd > toEigen()
Method that convert a PtrList of modes into Eigen matrices filling the EigenModes object.
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.
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.
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.
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, word innerProduct="L2")
Function to project a list of fields into the modes manifold by the use of all the modes.
PtrList< GeometricField< Type, PatchField, GeoMesh > > & toPtrList()
Function that returns the Modes object as a standard PtrList.
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.
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.
void operator=(const PtrList< GeometricField< Type, PatchField, GeoMesh > > &modes)