Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
DEIM< T > Class Template Reference

#include <DEIM.H>

Public Member Functions

 DEIM (PtrList< T > &SnapShotsMatrix, label MaxModes, word FunctionName, word FieldName)
 Construct DEIM for non-linear function.
 
 DEIM (PtrList< T > &SnapShotsMatrix, label MaxModesA, label MaxModesB, word MatrixName)
 Construct DEIM for matrix with non-linear dependency.
 
template<class S >
S generateSubmesh (label layers, const fvMesh &mesh, S field, label secondTime=0)
 Function to generate the submesh for the nonlinear function case.
 
template<class S >
S generateSubmeshMatrix (label layers, const fvMesh &mesh, S field, label secondTime=0)
 Function to generate the submesh for the nonlinear matrix function case (RHS)
 
template<class S >
S generateSubmeshVector (label layers, const fvMesh &mesh, S field, label secondTime=0)
 Function to generate the submesh for the nonlinear matrix function case (LHS)
 
template<class F >
generateSubField (F &field)
 Function to generate a a subfield in the location of the magic points.
 
template<class F >
generateSubFieldMatrix (F &field)
 Function to generate a a subfield in the location of the magic points computed for the Matrix (LHS)
 
template<class F >
generateSubFieldVector (F &field)
 Function to generate a a subfield in the location of the magic points computed for the Matrix (RHS)
 
void onlineCoeffs ()
 Function to get the onlineCoeffs of the DEIM approx.
 
List< label > global2local (List< label > &points, fvMeshSubset &submesh)
 Get local indices in the submeshe from indices in the global ones.
 
void check3DIndices (label &ind_rowA, label &ind_colA, label &xyz_rowA, label &xyz_colA)
 check3DIndices in case of three dimensional fields
 
void check3DIndices (label &ind_rowA, label &xyz_rowA)
 check3DIndices in case of three dimensional fields
 
label getNcells (label sizeM)
 get the number of cells from the dimension of a LHS matrix
 
void setMagicPoints (labelList &newMagicPoints, labelList &newxyz)
 Function to set the magic points externally.
 
label getNcells (label sizeM)
 

Public Attributes

PtrList< TSnapShotsMatrix
 The snapshots matrix containing the nonlinear function or operator.
 
PtrList< Tmodes
 The POD modes of the DEIM procedure that can be.
 
std::tuple< List< Eigen::SparseMatrix< double > >, List< Eigen::VectorXd > > Matrix_Modes
 Matrix Modes.
 
label MaxModes
 The maximum number of modes to be considered.
 
label MaxModesA
 
label MaxModesB
 
word FunctionName
 The name of the non-linear function.
 
double tolerance
 A given tolerance.
 
label Ncells
 Int Number of Cells;.
 
bool source
 source
 
word MatrixName
 The name of the matrix.
 
Eigen::MatrixXd MatrixModes
 The matrix containing the modes.
 
autoPtr< IOList< label > > magicPoints
 Magic points in the case of the a nonlinear function.
 
autoPtr< IOList< label > > magicPointsArow
 Magic points in the case of the a matrix function (rows indices)
 
autoPtr< IOList< label > > magicPointsAcol
 Magic points in the case of the a matrix function (cols indices)
 
autoPtr< IOList< label > > magicPointsB
 Magic points in the case of the a matrix function, right hand side.
 
word Folder
 Folder for nonlinear functions.
 
word FolderM
 Folder in the matrix case.
 
Eigen::VectorXd theta
 Online vector.
 
Eigen::VectorXd thetaA
 Online vector.
 
Eigen::VectorXd thetaB
 Online vector.
 
Eigen::MatrixXd MatrixOnline
 Online Matrices.
 
List< Eigen::SparseMatrix< double > > MatrixOnlineA
 Online Matrices.
 
Eigen::MatrixXd MatrixOnlineB
 Online Matrices.
 
Eigen::MatrixXd U
 The U matrix of the DEIM method.
 
List< Eigen::SparseMatrix< double > > UA
 The U matrix of the DEIM method.
 
Eigen::MatrixXd UB
 The U matrix of the DEIM method.
 
autoPtr< IOList< labelList > > totalMagicPoints
 Magic points and indices of the surrounding layers.
 
autoPtr< IOList< labelList > > totalMagicPointsA
 Magic points and indices of the surrounding layers.
 
autoPtr< IOList< labelList > > totalMagicPointsB
 Magic points and indices of the surrounding layers.
 
autoPtr< IOList< label > > uniqueMagicPoints
 List of unique indices that define the submesh.
 
autoPtr< IOList< label > > uniqueMagicPointsA
 List of unique indices that define the submesh.
 
autoPtr< IOList< label > > uniqueMagicPointsB
 List of unique indices that define the submesh.
 
autoPtr< IOList< label > > xyz
 Definition of the x, y, z coordinate of the identified element in the matrix or source term 0 for x, 1 for y, 2 for z.
 
autoPtr< IOList< label > > xyz_Arow
 Definition of the x, y, z coordinate of the identified element in the matrix or source term 0 for x, 1 for y, 2 for z.
 
autoPtr< IOList< label > > xyz_Acol
 Definition of the x, y, z coordinate of the identified element in the matrix or source term 0 for x, 1 for y, 2 for z.
 
autoPtr< IOList< label > > xyz_B
 Definition of the x, y, z coordinate of the identified element in the matrix or source term 0 for x, 1 for y, 2 for z.
 
List< label > localMagicPoints
 Indices of the local magic points in the subMesh.
 
List< label > localMagicPointsArow
 Indices of the local magic points in the subMesh.
 
List< label > localMagicPointsAcol
 Indices of the local magic points in the subMesh.
 
List< label > localMagicPointsB
 Indices of the local magic points in the subMesh.
 
Eigen::SparseMatrix< double > P
 The P matrix of the DEIM method.
 
List< Eigen::SparseMatrix< double > > PA
 The P matrix of the DEIM method.
 
Eigen::SparseMatrix< double > PB
 The P matrix of the DEIM method.
 
autoPtr< fvMeshSubset > submesh
 Submesh of the DEIM method.
 
autoPtr< fvMeshSubset > submeshA
 Submesh of the DEIM method.
 
autoPtr< fvMeshSubset > submeshB
 Submesh of the DEIM method.
 
bool runSubMesh
 Bool variable to check if the SubMesh is available.
 
bool runSubMeshA
 Bool variable to check if the SubMesh is available.
 
bool runSubMeshB
 Bool variable to check if the SubMesh is available.
 

Detailed Description

template<typename T>
class DEIM< T >
Examples
09DEIM_ROM.C.

Definition at line 40 of file DEIM.H.

Constructor & Destructor Documentation

◆ DEIM() [1/2]

template<typename T >
DEIM< T >::DEIM ( PtrList< T > & SnapShotsMatrix,
label MaxModes,
word FunctionName,
word FieldName )

Construct DEIM for non-linear function.

Parameters
[in]SnapShotsMatrixThe snapshots matrix
[in]MaxModesThe maximum number of modes
[in]FunctionNameThe function name, used to save the results
[in]FieldNameThe field name
Examples
09DEIM_ROM.C.

Definition at line 34 of file DEIM.C.

◆ DEIM() [2/2]

template<typename T >
DEIM< T >::DEIM ( PtrList< T > & SnapShotsMatrix,
label MaxModesA,
label MaxModesB,
word MatrixName )

Construct DEIM for matrix with non-linear dependency.

Parameters
SnapShotsMatrixThe snapshots matrix
[in]MaxModesAThe maximum number of modes for the Matrix A
[in]MaxModesBThe maximum number of modes for the source term b
[in]MatrixNameThe matrix name, used to save the results

Definition at line 126 of file DEIM.C.

Member Function Documentation

◆ check3DIndices() [1/2]

template<typename T >
void DEIM< T >::check3DIndices ( label & ind_rowA,
label & ind_colA,
label & xyz_rowA,
label & xyz_colA )

check3DIndices in case of three dimensional fields

Parameters
ind_rowAThe ind row a
ind_colAThe ind col a
xyz_rowAThe xyz row a
xyz_colAThe xyz col a

Definition at line 659 of file DEIM.C.

◆ check3DIndices() [2/2]

template<typename T >
void DEIM< T >::check3DIndices ( label & ind_rowA,
label & xyz_rowA )

check3DIndices in case of three dimensional fields

Parameters
ind_rowAThe ind row a
xyz_rowAThe xyz row a

Definition at line 694 of file DEIM.C.

◆ generateSubField()

template<class T >
template<class F >
template const volTensorField DEIM< T >::generateSubField ( F & field)

Function to generate a a subfield in the location of the magic points.

Parameters
fieldFor which you want the create the submeshes
Template Parameters
Ftype of field (can be volVectorField, volScalarField, surfaceScalar and surfaceVector)
Returns
a the interpolated field in the submesh

Definition at line 714 of file DEIM.C.

◆ generateSubFieldMatrix()

template<class T >
template<class F >
template surfaceVectorField DEIM< T >::generateSubFieldMatrix ( F & field)

Function to generate a a subfield in the location of the magic points computed for the Matrix (LHS)

Parameters
fieldFor which you want the create the submeshes
Template Parameters
Ftype of field (can be volVectorField, volScalarField, and const versions)
Returns
a the interpolated field in the submesh

Definition at line 724 of file DEIM.C.

◆ generateSubFieldVector()

template<typename T >
template<class F >
template surfaceVectorField DEIM< T >::generateSubFieldVector ( F & field)

Function to generate a a subfield in the location of the magic points computed for the Matrix (RHS)

Parameters
fieldFor which you want the create the submeshes
Template Parameters
Ftype of field (can be volVectorField, volScalarField, surfaceScalar and surfaceVector)
Returns
a the interpolated field in the submesh

Definition at line 734 of file DEIM.C.

◆ generateSubmesh()

template<typename T >
template<typename S >
template volVectorField DEIM< T >::generateSubmesh ( label layers,
const fvMesh & mesh,
S field,
label secondTime = 0 )

Function to generate the submesh for the nonlinear function case.

Parameters
[in]layersNumber of layers used to generate each submesh
meshThe mesh of the problem
[in]fieldThe field used for the submesh
[in]secondTimeIf the function is called for the second one must be set to 1
Template Parameters
SType of object can be volscalarfield, volvectorfield etc...
Returns
return field in the submesh

Definition at line 357 of file DEIM.C.

◆ generateSubmeshMatrix()

template<typename T >
template<typename S >
template surfaceVectorField DEIM< T >::generateSubmeshMatrix ( label layers,
const fvMesh & mesh,
S field,
label secondTime = 0 )

Function to generate the submesh for the nonlinear matrix function case (RHS)

Parameters
[in]layersNumber of layers used to generate each submesh
meshThe mesh of the problem
[in]fieldThe field used for the submesh
[in]secondTimeIf the function is called for the second one must be set to 1
Template Parameters
SType of object can be volscalarfield, volvectorfield etc...
Returns
return field in the submesh

Definition at line 450 of file DEIM.C.

◆ generateSubmeshVector()

template<typename T >
template<typename S >
template surfaceVectorField DEIM< T >::generateSubmeshVector ( label layers,
const fvMesh & mesh,
S field,
label secondTime = 0 )

Function to generate the submesh for the nonlinear matrix function case (LHS)

Parameters
[in]layersNumber of layers used to generate each submesh
meshThe mesh of the problem
[in]fieldThe field used for the submesh
[in]secondTimeIf the function is called for the second one must be set to 1
Template Parameters
SType of object can be volscalarfield, volvectorfield etc...
Returns
return field in the submesh

Definition at line 543 of file DEIM.C.

◆ getNcells() [1/2]

label DEIM< fvVectorMatrix >::getNcells ( label sizeM)

Definition at line 749 of file DEIM.C.

◆ getNcells() [2/2]

template<typename T >
label DEIM< T >::getNcells ( label sizeM)

get the number of cells from the dimension of a LHS matrix

Parameters
sizeMThe number of rows of the original Matrix
Returns
The number of cells

◆ global2local()

template<typename T >
List< label > DEIM< T >::global2local ( List< label > & points,
fvMeshSubset & submesh )

Get local indices in the submeshe from indices in the global ones.

Parameters
pointsThe points
submeshThe submesh
Returns
The local indices

Definition at line 638 of file DEIM.C.

◆ onlineCoeffs()

template<typename T >
void DEIM< T >::onlineCoeffs ( )

Function to get the onlineCoeffs of the DEIM approx.

It is problem dependent so it must be overridden.

◆ setMagicPoints()

template<typename T >
template void DEIM< T >::setMagicPoints ( labelList & newMagicPoints,
labelList & newxyz )

Function to set the magic points externally.

Parameters
newMagicPointsThe new magic points
newxyzThe new xyz coordinates in case of a volVectorField. In case of a volScalarField needs to be of the same dimension of magicPoints and full or zeros

Definition at line 756 of file DEIM.C.

Member Data Documentation

◆ Folder

template<typename T >
word DEIM< T >::Folder

Folder for nonlinear functions.

Definition at line 144 of file DEIM.H.

◆ FolderM

template<typename T >
word DEIM< T >::FolderM

Folder in the matrix case.

Definition at line 146 of file DEIM.H.

◆ FunctionName

template<typename T >
word DEIM< T >::FunctionName

The name of the non-linear function.

Definition at line 82 of file DEIM.H.

◆ localMagicPoints

template<typename T >
List<label> DEIM< T >::localMagicPoints

Indices of the local magic points in the subMesh.

Definition at line 159 of file DEIM.H.

◆ localMagicPointsAcol

template<typename T >
List<label> DEIM< T >::localMagicPointsAcol

Indices of the local magic points in the subMesh.

Definition at line 161 of file DEIM.H.

◆ localMagicPointsArow

template<typename T >
List<label> DEIM< T >::localMagicPointsArow

Indices of the local magic points in the subMesh.

Definition at line 160 of file DEIM.H.

◆ localMagicPointsB

template<typename T >
List<label> DEIM< T >::localMagicPointsB

Indices of the local magic points in the subMesh.

Definition at line 162 of file DEIM.H.

◆ magicPoints

template<typename T >
autoPtr<IOList<label> > DEIM< T >::magicPoints

Magic points in the case of the a nonlinear function.

Definition at line 121 of file DEIM.H.

◆ magicPointsAcol

template<typename T >
autoPtr<IOList<label> > DEIM< T >::magicPointsAcol

Magic points in the case of the a matrix function (cols indices)

Definition at line 125 of file DEIM.H.

◆ magicPointsArow

template<typename T >
autoPtr<IOList<label> > DEIM< T >::magicPointsArow

Magic points in the case of the a matrix function (rows indices)

Definition at line 123 of file DEIM.H.

◆ magicPointsB

template<typename T >
autoPtr<IOList<label> > DEIM< T >::magicPointsB

Magic points in the case of the a matrix function, right hand side.

Definition at line 127 of file DEIM.H.

◆ Matrix_Modes

template<typename T >
std::tuple<List<Eigen::SparseMatrix<double> >, List<Eigen::VectorXd> > DEIM< T >::Matrix_Modes

Matrix Modes.

Definition at line 74 of file DEIM.H.

◆ MatrixModes

template<typename T >
Eigen::MatrixXd DEIM< T >::MatrixModes

The matrix containing the modes.

Definition at line 104 of file DEIM.H.

◆ MatrixName

template<typename T >
word DEIM< T >::MatrixName

The name of the matrix.

Definition at line 101 of file DEIM.H.

◆ MatrixOnline

template<typename T >
Eigen::MatrixXd DEIM< T >::MatrixOnline

Online Matrices.

Definition at line 108 of file DEIM.H.

◆ MatrixOnlineA

template<typename T >
List<Eigen::SparseMatrix<double> > DEIM< T >::MatrixOnlineA

Online Matrices.

Definition at line 109 of file DEIM.H.

◆ MatrixOnlineB

template<typename T >
Eigen::MatrixXd DEIM< T >::MatrixOnlineB

Online Matrices.

Definition at line 110 of file DEIM.H.

◆ MaxModes

template<typename T >
label DEIM< T >::MaxModes

The maximum number of modes to be considered.

Definition at line 77 of file DEIM.H.

◆ MaxModesA

template<typename T >
label DEIM< T >::MaxModesA

Definition at line 78 of file DEIM.H.

◆ MaxModesB

template<typename T >
label DEIM< T >::MaxModesB

Definition at line 79 of file DEIM.H.

◆ modes

template<typename T >
PtrList<T> DEIM< T >::modes

The POD modes of the DEIM procedure that can be.

Definition at line 70 of file DEIM.H.

◆ Ncells

template<typename T >
label DEIM< T >::Ncells

Int Number of Cells;.

Definition at line 95 of file DEIM.H.

◆ P

template<typename T >
Eigen::SparseMatrix<double> DEIM< T >::P

The P matrix of the DEIM method.

Definition at line 167 of file DEIM.H.

◆ PA

template<typename T >
List<Eigen::SparseMatrix<double> > DEIM< T >::PA

The P matrix of the DEIM method.

Definition at line 168 of file DEIM.H.

◆ PB

template<typename T >
Eigen::SparseMatrix<double> DEIM< T >::PB

The P matrix of the DEIM method.

Definition at line 169 of file DEIM.H.

◆ runSubMesh

template<typename T >
bool DEIM< T >::runSubMesh

Bool variable to check if the SubMesh is available.

Definition at line 181 of file DEIM.H.

◆ runSubMeshA

template<typename T >
bool DEIM< T >::runSubMeshA

Bool variable to check if the SubMesh is available.

Definition at line 182 of file DEIM.H.

◆ runSubMeshB

template<typename T >
bool DEIM< T >::runSubMeshB

Bool variable to check if the SubMesh is available.

Definition at line 183 of file DEIM.H.

◆ SnapShotsMatrix

template<typename T >
PtrList<T> DEIM< T >::SnapShotsMatrix

The snapshots matrix containing the nonlinear function or operator.

Definition at line 67 of file DEIM.H.

◆ source

template<typename T >
bool DEIM< T >::source

source

Definition at line 98 of file DEIM.H.

◆ submesh

template<typename T >
autoPtr<fvMeshSubset> DEIM< T >::submesh

Submesh of the DEIM method.

Definition at line 174 of file DEIM.H.

◆ submeshA

template<typename T >
autoPtr<fvMeshSubset> DEIM< T >::submeshA

Submesh of the DEIM method.

Definition at line 175 of file DEIM.H.

◆ submeshB

template<typename T >
autoPtr<fvMeshSubset> DEIM< T >::submeshB

Submesh of the DEIM method.

Definition at line 176 of file DEIM.H.

◆ theta

template<typename T >
Eigen::VectorXd DEIM< T >::theta

Online vector.

Definition at line 89 of file DEIM.H.

◆ thetaA

template<typename T >
Eigen::VectorXd DEIM< T >::thetaA

Online vector.

Definition at line 90 of file DEIM.H.

◆ thetaB

template<typename T >
Eigen::VectorXd DEIM< T >::thetaB

Online vector.

Definition at line 91 of file DEIM.H.

◆ tolerance

template<typename T >
double DEIM< T >::tolerance

A given tolerance.

Definition at line 85 of file DEIM.H.

◆ totalMagicPoints

template<typename T >
autoPtr<IOList<labelList> > DEIM< T >::totalMagicPoints

Magic points and indices of the surrounding layers.

Definition at line 131 of file DEIM.H.

◆ totalMagicPointsA

template<typename T >
autoPtr<IOList<labelList> > DEIM< T >::totalMagicPointsA

Magic points and indices of the surrounding layers.

Definition at line 132 of file DEIM.H.

◆ totalMagicPointsB

template<typename T >
autoPtr<IOList<labelList> > DEIM< T >::totalMagicPointsB

Magic points and indices of the surrounding layers.

Definition at line 133 of file DEIM.H.

◆ U

template<typename T >
Eigen::MatrixXd DEIM< T >::U

The U matrix of the DEIM method.

Definition at line 115 of file DEIM.H.

◆ UA

template<typename T >
List<Eigen::SparseMatrix<double> > DEIM< T >::UA

The U matrix of the DEIM method.

Definition at line 116 of file DEIM.H.

◆ UB

template<typename T >
Eigen::MatrixXd DEIM< T >::UB

The U matrix of the DEIM method.

Definition at line 117 of file DEIM.H.

◆ uniqueMagicPoints

template<typename T >
autoPtr<IOList<label> > DEIM< T >::uniqueMagicPoints

List of unique indices that define the submesh.

Definition at line 138 of file DEIM.H.

◆ uniqueMagicPointsA

template<typename T >
autoPtr<IOList<label> > DEIM< T >::uniqueMagicPointsA

List of unique indices that define the submesh.

Definition at line 139 of file DEIM.H.

◆ uniqueMagicPointsB

template<typename T >
autoPtr<IOList<label> > DEIM< T >::uniqueMagicPointsB

List of unique indices that define the submesh.

Definition at line 140 of file DEIM.H.

◆ xyz

template<typename T >
autoPtr<IOList<label> > DEIM< T >::xyz

Definition of the x, y, z coordinate of the identified element in the matrix or source term 0 for x, 1 for y, 2 for z.

Definition at line 151 of file DEIM.H.

◆ xyz_Acol

template<typename T >
autoPtr<IOList<label> > DEIM< T >::xyz_Acol

Definition of the x, y, z coordinate of the identified element in the matrix or source term 0 for x, 1 for y, 2 for z.

Definition at line 153 of file DEIM.H.

◆ xyz_Arow

template<typename T >
autoPtr<IOList<label> > DEIM< T >::xyz_Arow

Definition of the x, y, z coordinate of the identified element in the matrix or source term 0 for x, 1 for y, 2 for z.

Definition at line 152 of file DEIM.H.

◆ xyz_B

template<typename T >
autoPtr<IOList<label> > DEIM< T >::xyz_B

Definition of the x, y, z coordinate of the identified element in the matrix or source term 0 for x, 1 for y, 2 for z.

Definition at line 154 of file DEIM.H.


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