36#include "fvMeshSubset.H"
73 std::tuple<List<Eigen::SparseMatrix<double >>, List<Eigen::VectorXd >>
116 List<Eigen::SparseMatrix<double >>
UA;
151 autoPtr<IOList<label >>
xyz;
167 Eigen::SparseMatrix<double>
P;
168 List<Eigen::SparseMatrix<double >>
PA;
169 Eigen::SparseMatrix<double>
PB;
200 label secondTime = 0);
216 label secondTime = 0);
231 label secondTime = 0);
293 void check3DIndices(label& ind_rowA, label& ind_colA, label& xyz_rowA,
319 void setMagicPoints(labelList& newMagicPoints, labelList& newxyz);
Header file of the EigenFunctions class.
Header file of the Foam2Eigen class.
Header file of the ITHACAPOD class.
Header file of the ITHACAutilities namespace.
autoPtr< fvMeshSubset > submeshA
Submesh of the DEIM method.
Eigen::VectorXd theta
Online vector.
List< Eigen::SparseMatrix< double > > MatrixOnlineA
Online Matrices.
Eigen::VectorXd thetaA
Online vector.
autoPtr< fvMeshSubset > submesh
Submesh of the DEIM method.
std::tuple< List< Eigen::SparseMatrix< double > >, List< Eigen::VectorXd > > Matrix_Modes
Matrix Modes.
label MaxModes
The maximum number of modes to be considered.
autoPtr< IOList< label > > uniqueMagicPoints
List of unique indices that define the submesh.
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,...
Eigen::VectorXd thetaB
Online vector.
List< label > localMagicPointsAcol
Indices of the local magic points in the subMesh.
S generateSubmesh(label layers, const fvMesh &mesh, S field, label secondTime=0)
Function to generate the submesh for the nonlinear function case.
autoPtr< IOList< label > > magicPointsAcol
Magic points in the case of the a matrix function (cols indices)
autoPtr< IOList< labelList > > totalMagicPointsA
Magic points and indices of the surrounding layers.
S generateSubmeshMatrix(label layers, const fvMesh &mesh, S field, label secondTime=0)
Function to generate the submesh for the nonlinear matrix function case (RHS)
Eigen::MatrixXd MatrixOnlineB
Online Matrices.
autoPtr< IOList< label > > magicPoints
Magic points in the case of the a nonlinear function.
List< label > localMagicPointsB
Indices of the local magic points in the subMesh.
S generateSubmeshVector(label layers, const fvMesh &mesh, S field, label secondTime=0)
Function to generate the submesh for the nonlinear matrix function case (LHS)
autoPtr< IOList< label > > xyz
Definition of the x, y, z coordinate of the identified element in the matrix or source term 0 for x,...
word MatrixName
The name of the matrix.
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,...
Eigen::MatrixXd U
The U matrix of the DEIM method.
DEIM(PtrList< T > &SnapShotsMatrix, label MaxModes, word FunctionName, word FieldName)
Construct DEIM for non-linear function.
List< label > localMagicPoints
Indices of the local magic points in the subMesh.
autoPtr< IOList< labelList > > totalMagicPoints
Magic points and indices of the surrounding layers.
F generateSubFieldVector(F &field)
Function to generate a a subfield in the location of the magic points computed for the Matrix (RHS)
Eigen::MatrixXd MatrixModes
The matrix containing the modes.
autoPtr< IOList< label > > uniqueMagicPointsA
List of unique indices that define the submesh.
List< Eigen::SparseMatrix< double > > PA
The P matrix of the DEIM method.
List< label > localMagicPointsArow
Indices of the local magic points in the subMesh.
word Folder
Folder for nonlinear functions.
PtrList< T > modes
The POD modes of the DEIM procedure that can be.
word FolderM
Folder in the matrix case.
autoPtr< IOList< label > > uniqueMagicPointsB
List of unique indices that define the submesh.
void check3DIndices(label &ind_rowA, label &ind_colA, label &xyz_rowA, label &xyz_colA)
check3DIndices in case of three dimensional fields
autoPtr< IOList< label > > magicPointsArow
Magic points in the case of the a matrix function (rows indices)
Eigen::SparseMatrix< double > P
The P matrix of the DEIM method.
autoPtr< IOList< labelList > > totalMagicPointsB
Magic points and indices of the surrounding layers.
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,...
F generateSubField(F &field)
Function to generate a a subfield in the location of the magic points.
Eigen::MatrixXd MatrixOnline
Online Matrices.
bool runSubMesh
Bool variable to check if the SubMesh is available.
List< Eigen::SparseMatrix< double > > UA
The U matrix of the DEIM method.
autoPtr< fvMeshSubset > submeshB
Submesh of the DEIM method.
autoPtr< IOList< label > > magicPointsB
Magic points in the case of the a matrix function, right hand side.
label getNcells(label sizeM)
get the number of cells from the dimension of a LHS matrix
void onlineCoeffs()
Function to get the onlineCoeffs of the DEIM approx.
F generateSubFieldMatrix(F &field)
Function to generate a a subfield in the location of the magic points computed for the Matrix (LHS)
double tolerance
A given tolerance.
Eigen::SparseMatrix< double > PB
The P matrix of the DEIM method.
void setMagicPoints(labelList &newMagicPoints, labelList &newxyz)
Function to set the magic points externally.
PtrList< T > SnapShotsMatrix
The snapshots matrix containing the nonlinear function or operator.
label Ncells
Int Number of Cells;.
Eigen::MatrixXd UB
The U matrix of the DEIM method.
word FunctionName
The name of the non-linear function.
List< label > global2local(List< label > &points, fvMeshSubset &submesh)
Get local indices in the submeshe from indices in the global ones.
bool runSubMeshA
Bool variable to check if the SubMesh is available.
bool runSubMeshB
Bool variable to check if the SubMesh is available.
volScalarField S(IOobject("S", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), T.mesh(), dimensionedScalar("zero", dimensionSet(0, 0, -1, 1, 0, 0, 0), 0))