Loading...
Searching...
No Matches
DEIM_function Class Reference
Inheritance diagram for DEIM_function:
HyperReduction< PtrList< volScalarField > & > DEIM< fvScalarMatrix >

Public Member Functions

Eigen::VectorXd onlineCoeffs (Eigen::MatrixXd mu)
 
Eigen::MatrixXd onlineCoeffsA (Eigen::MatrixXd mu)
 
Eigen::MatrixXd onlineCoeffsB (Eigen::MatrixXd mu)
 
 HyperReduction (label n_modes, label n_nodes, Eigen::VectorXi initialSeeds, word problemName, SnapshotsLists &&...snapshotsLists)
 Construct HyperReduction class, interpolation-based.
 
 HyperReduction (label n_modes, label n_nodes, unsigned int vectorial_dim, label n_cells, Eigen::VectorXi initialSeeds, word problemName)
 Construct HyperReduction class.
 
- Public Member Functions inherited from HyperReduction< PtrList< volScalarField > & >
 HyperReduction (label n_modes, label n_nodes, Eigen::VectorXi initialSeeds, word problemName, SnapshotsLists &&...snapshotsLists)
 Construct HyperReduction class, interpolation-based.
 
 HyperReduction (label n_modes, label n_nodes, unsigned int vectorial_dim, label n_cells, Eigen::VectorXi initialSeeds, word problemName)
 Construct HyperReduction class.
 
void offlineGappyDEIM (Eigen::MatrixXd &snapshotsModes, Eigen::VectorXd &normalizingWeights)
 Methods implemented: 'GappyDEIM' from "DEIM, Chaturantabut, Saifon, and Danny C. Sorensen. "Nonlinear model reduction via discrete empirical interpolation.
 
void offlineGappyDEIM (Eigen::MatrixXd &snapshotsModes, Eigen::VectorXd &normalizingWeights, word folderMethodName)
 
void offlineECP (Eigen::MatrixXd &snapshotsModes, Eigen::VectorXd &normalizingWeights)
 Methods implemented: 'ECP' from "ECP, Hernandez, Joaquin Alberto, Manuel Alejandro Caicedo, and Alex Ferrer. "Dimensional hyper-reduction of nonlinear finite element models via empirical cubature.
 
void offlineECP (Eigen::MatrixXd &snapshotsModes, Eigen::VectorXd &normalizingWeights, word folderMethodName)
 
void initSeeds (Eigen::VectorXd mp_not_mask, std::set< label > nodePointsSet)
 TODO.
 
void computeLS (Eigen::MatrixXd &J, Eigen::MatrixXd &JWhole, Eigen::VectorXd &b, Eigen::VectorXd &q)
 TODO.
 
void getModesSVD (SnapshotsListTuple &SnapshotsListTuple, Eigen::MatrixXd &modesSVD, Eigen::VectorXd &fieldWeights, bool saveModesFlag=false)
 TODO.
 
void getModesSVD (SnapshotsListTuple &snapshotsListTuple, Eigen::MatrixXd &modesSVD, Eigen::VectorXd &fieldWeights, Eigen::MatrixXd &modesSVDBoundary, Eigen::VectorXd &fieldWeightsBoundary, bool saveModesFlag)
 TODO.
 
void updateNodes (Eigen::SparseMatrix< double > &P, label &ind_max, Eigen::VectorXd &mp_not_mask)
 TODO.
 
void stackSnapshots (SnapshotsList sList, Eigen::MatrixXd &snapshotsMatrix, Eigen::VectorXd &fieldWeights)
 TODO.
 
void stackSnapshotsBoundary (SnapshotsList sList, List< Eigen::MatrixXd > &snapshotsMatrixBoundary, List< Eigen::VectorXd > &fieldWeightsBoundary)
 TODO.
 
void saveModes (SnapshotsList sList, Eigen::MatrixXd &snapshotsMatrix, unsigned int &rowIndex, unsigned int &modeIndex, word folder)
 TODO.
 
void saveModes (SnapshotsList sList, Eigen::MatrixXd &snapshotsMatrix, Eigen::MatrixXd &snapshotsMatrixBoundary, unsigned int &rowIndex, unsigned int &rowIndexBoundary, unsigned int &modeIndex, word folder)
 TODO.
 
void stackNames (SnapshotsList sList)
 TODO.
 
void stackDimensions (SnapshotsList sList)
 TODO.
 
void sumDimensions (double sum, SnapshotsList sList)
 TODO.
 
void evaluatePinv (Eigen::SparseMatrix< double > &Projector, Eigen::MatrixXd &Modes, Eigen::VectorXd &fieldWeights)
 Compute the pseudo-inverse of the matrix M restricted with the projector P.
 
void evaluateWPU (Eigen::SparseMatrix< double > &Projector, Eigen::MatrixXd &Modes, Eigen::VectorXd &fieldWeights, Eigen::VectorXd &quadratureWeights)
 Compute the pseudo-inverse of the matrix M restricted with the projector P.
 
void generateSubmesh (label layers, const fvMesh &mesh)
 Compute the submesh common to all fields in SnapshotsLists.
 
List< label > global2local (List< label > &points, fvMeshSubset &submesh)
 Get local indices in the submesh from indices in the global ones.
 
autoPtr< FieldType > interpolateField (const FieldType &field)
 TODO.
 
constexpr unsigned int get_field_dim ()
 TODO.
 
constexpr unsigned int compute_vectorial_dim (LastList x)
 TODO.
 
constexpr unsigned int compute_vectorial_dim (List &&head, RemainingLists &&...tail)
 TODO.
 
void eigen2fields (Eigen::VectorXd &eFields, FieldsArgs &&... oFields)
 TODO.
 
void initReshapeMat (Eigen::SparseMatrix< double > &reshapeMat)
 TODO.
 
void createMasks (bool offlineStage=true)
 TODO.
 
void getSnapMatrix (Eigen::MatrixXd &snapMatrix, Eigen::VectorXd &fieldWeights)
 TODO.
 
void getSnapMatrix (Eigen::MatrixXd &snapMatrix, Eigen::VectorXd &fieldWeights, List< Eigen::MatrixXd > &snapMatrixBoundary, List< Eigen::VectorXd > &fieldWeightsBoundary)
 TODO.
 
- Public Member Functions inherited from DEIM< fvScalarMatrix >
 DEIM (PtrList< fvScalarMatrix > &SnapShotsMatrix, label MaxModes, word FunctionName, word FieldName)
 Construct DEIM for non-linear function.
 
 DEIM (PtrList< fvScalarMatrix > &SnapShotsMatrix, label MaxModesA, label MaxModesB, word MatrixName)
 Construct DEIM for matrix with non-linear dependency.
 
S generateSubmesh (label layers, const fvMesh &mesh, S field, label secondTime=0)
 Function to generate the submesh for the nonlinear function case.
 
S generateSubmeshMatrix (label layers, const fvMesh &mesh, S field, label secondTime=0)
 Function to generate the submesh for the nonlinear matrix function case (RHS)
 
S generateSubmeshVector (label layers, const fvMesh &mesh, S field, label secondTime=0)
 Function to generate the submesh for the nonlinear matrix function case (LHS)
 
generateSubField (F &field)
 Function to generate a a subfield in the location of the magic points.
 
generateSubFieldMatrix (F &field)
 Function to generate a a subfield in the location of the magic points computed for the Matrix (LHS)
 
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
 
label getNcells (label sizeM)
 
label getNcells (label sizeM)
 
void setMagicPoints (labelList &newMagicPoints, labelList &newxyz)
 Function to set the magic points externally.
 

Static Public Member Functions

static volScalarField evaluate_expression (volScalarField &S, Eigen::MatrixXd mu)
 
static fvScalarMatrix evaluate_expression (volScalarField &T, Eigen::MatrixXd mu)
 
- Static Public Member Functions inherited from HyperReduction< PtrList< volScalarField > & >
static double s_optimality (Eigen::MatrixXd &A)
 TODO.
 

Public Attributes

Eigen::VectorXd theta
 
PtrList< volScalarField > fields
 
autoPtr< volScalarField > subField
 
PtrList< volScalarField > fieldsA
 
autoPtr< volScalarField > fieldA
 
autoPtr< volScalarField > fieldB
 
PtrList< volScalarField > fieldsB
 
- Public Attributes inherited from HyperReduction< PtrList< volScalarField > & >
word methodName
 
unsigned int vectorial_dim
 
unsigned int sumFieldsDim
 
ITHACAparameterspara
 
label n_boundary_patches
 
List< label > n_boundary_cells_list
 
label n_boundary_cells
 
label n_modes
 The maximum number of modes to be considered.
 
label n_nodes
 The maximum number of modes to be considered.
 
label n_snapshots
 The length of the snapshots lists.
 
Eigen::VectorXi initialSeeds
 
Eigen::VectorXi nodes
 
word problemName
 The name of the non-linear function e.g. HR_method/residual.
 
SnapshotsListTuple snapshotsListTuple
 The snapshots matrix containing the nonlinear function or operator.
 
List< word > fieldNames
 Names of the fields.
 
List< unsigned int > fieldDims
 Dimensions of the fields.
 
label n_cells
 Int Number of Cells;.
 
label n_cellsSubfields
 Int Number of Cells in submeshes;.
 
autoPtr< IOList< label > > nodePoints
 Nodes in the case of the a nonlinear function.
 
autoPtr< IOList< labelList > > totalNodePoints
 List of label lists of the nodes and corresponding surrounding nodes.
 
autoPtr< IOList< label > > uniqueNodePoints
 List of the unique indices of the nodes that define the submesh.
 
word folderProblem
 Folder for the HR problem.
 
word folderMethod
 Folder for the selected HR method.
 
List< label > localNodePoints
 Indices of the local node points in the subMesh.
 
Eigen::MatrixXd basisMatrix
 Orthonormal basis of HR.
 
Eigen::VectorXd normalizingWeights
 
Eigen::MatrixXd renormalizedBasisMatrix
 Renormalized basis of HR.
 
Eigen::MatrixXd pinvPU
 
Eigen::MatrixXd wPU
 
Eigen::VectorXd eigenValueseig
 
Eigen::SparseMatrix< double > P
 The P matrix of the HyperReduction method. The nodes are ordered in the order of insertion during the greedy procedure. The components related to the same node follow immediately.
 
Eigen::SparseMatrix< double > field2submesh
 
Eigen::SparseMatrix< double > submesh2nodes
 
Eigen::VectorXi submesh2nodesMask
 
Eigen::VectorXd quadratureWeights
 Quadrature weights. Ordered in the same order of matrix P.
 
autoPtr< fvMeshSubset > submesh
 Submesh of the HyperReduction method.
 
autoPtr< volVectorField > submesh_field
 Submeshes.
 
Eigen::MatrixXd MatrixOnline
 Online Matrix.
 
- Public Attributes inherited from DEIM< fvScalarMatrix >
PtrList< fvScalarMatrix > SnapShotsMatrix
 The snapshots matrix containing the nonlinear function or operator.
 
PtrList< fvScalarMatrix > modes
 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.
 

Additional Inherited Members

- Public Types inherited from HyperReduction< PtrList< volScalarField > & >
using SnapshotsListTuple
 
using FieldsTuple
 
using NthFieldListType
 
using NthFieldType
 
- Static Public Attributes inherited from HyperReduction< PtrList< volScalarField > & >
static constexpr auto n_fields
 

Detailed Description

Examples
08DEIM.C, and 09DEIM_ROM.C.

Definition at line 41 of file 08DEIM.C.

Member Function Documentation

◆ evaluate_expression() [1/2]

static volScalarField DEIM_function::evaluate_expression ( volScalarField & S,
Eigen::MatrixXd mu )
inlinestatic
Examples
08DEIM.C, and 09DEIM_ROM.C.

Definition at line 45 of file 08DEIM.C.

◆ evaluate_expression() [2/2]

static fvScalarMatrix DEIM_function::evaluate_expression ( volScalarField & T,
Eigen::MatrixXd mu )
inlinestatic

Definition at line 51 of file 09DEIM_ROM.C.

◆ HyperReduction() [1/2]

HyperReduction< SnapshotsLists >::HyperReduction ( label n_modes,
label n_nodes,
Eigen::VectorXi initialSeeds,
word problemName,
SnapshotsLists &&... snapshotsLists )

Construct HyperReduction class, interpolation-based.

SnapshotsLists is a variadic argument of PtrLists of fields e.g. for incompressible Navier-Stokes PtrList<volVectorField>, PtrList<volScalarField> for velocity and pressure.

Parameters
[in]hrMethodthe chosen HR method
[in]n_modesdimension of the HR basis
[in]n_nodesnumber of nodes
[in]initialSeedsinitial nodes
[in]problemNamename of the function to be hyper-reduced
[in]snapshotsListslists of fields

Definition at line 76 of file hyperReduction.templates.H.

◆ HyperReduction() [2/2]

HyperReduction< SnapshotsLists >::HyperReduction ( label n_modes,
label n_nodes,
unsigned int vectorial_dim,
label n_cells,
Eigen::VectorXi initialSeeds,
word problemName )

Construct HyperReduction class.

Parameters
[in]n_modesDimension of the HR basis
[in]n_nodesNumber of nodes
[in]vectorial_dimField dimension (1 for volScalarField 3 for volVectorField)
[in]n_cellsNumber of cells
[in]initialSeedsInitial nodes
[in]problemNameName of the function to be hyper-reduced

Definition at line 92 of file hyperReduction.templates.H.

◆ onlineCoeffs()

Eigen::VectorXd DEIM_function::onlineCoeffs ( Eigen::MatrixXd mu)
inline

Definition at line 58 of file 08DEIM.C.

◆ onlineCoeffsA()

Eigen::MatrixXd DEIM_function::onlineCoeffsA ( Eigen::MatrixXd mu)
inline
Examples
09DEIM_ROM.C.

Definition at line 71 of file 09DEIM_ROM.C.

◆ onlineCoeffsB()

Eigen::MatrixXd DEIM_function::onlineCoeffsB ( Eigen::MatrixXd mu)
inline
Examples
09DEIM_ROM.C.

Definition at line 91 of file 09DEIM_ROM.C.

Member Data Documentation

◆ fieldA

autoPtr<volScalarField> DEIM_function::fieldA
Examples
09DEIM_ROM.C.

Definition at line 109 of file 09DEIM_ROM.C.

◆ fieldB

autoPtr<volScalarField> DEIM_function::fieldB
Examples
09DEIM_ROM.C.

Definition at line 110 of file 09DEIM_ROM.C.

◆ fields

PtrList<volScalarField> DEIM_function::fields
Examples
08DEIM.C.

Definition at line 73 of file 08DEIM.C.

◆ fieldsA

PtrList<volScalarField> DEIM_function::fieldsA
Examples
09DEIM_ROM.C.

Definition at line 108 of file 09DEIM_ROM.C.

◆ fieldsB

PtrList<volScalarField> DEIM_function::fieldsB
Examples
09DEIM_ROM.C.

Definition at line 111 of file 09DEIM_ROM.C.

◆ subField

autoPtr<volScalarField> DEIM_function::subField
Examples
08DEIM.C.

Definition at line 74 of file 08DEIM.C.

◆ theta

Eigen::VectorXd DEIM_function::theta
Examples
08DEIM.C, and 09DEIM_ROM.C.

Definition at line 72 of file 08DEIM.C.


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