Loading...
Searching...
No Matches
Functions
ITHACAstream Namespace Reference

Namespace for input-output manipulation. More...

Functions

template<typename Type >
void exportFvMatrix (fvMatrix< Type > &Matrix, word folder, word MatrixName)
 Export an Fv Matrix to folder together with its source term.
 
template<typename T , int dim>
void exportMatrix (Eigen::Matrix< T, -1, dim > &matrix, word Name, word type="python", word folder="./Matrices")
 Export the reduced matrices in numpy (type=python), matlab (type=matlab) and txt (type=eigen) format The function is implemented for a second order matrix.
 
template void exportMatrix (Eigen::Matrix< double, -1, -1 > &matrix, word Name, word type, word folder)
 
template void exportMatrix (Eigen::Matrix< int, -1, -1 > &matrix, word Name, word type, word folder)
 
template void exportMatrix (Eigen::Matrix< float, -1, -1 > &matrix, word Name, word type, word folder)
 
template void exportMatrix (Eigen::Matrix< double, -1, 1 > &matrix, word Name, word type, word folder)
 
template void exportMatrix (Eigen::Matrix< int, -1, 1 > &matrix, word Name, word type, word folder)
 
template void exportMatrix (Eigen::Matrix< float, -1, 1 > &matrix, word Name, word type, word folder)
 
void exportMatrix (List< Eigen::MatrixXd > &matrix, word Name, word type="python", word folder="./Matrices")
 Export the reduced matrices in numpy (type=python), matlab (type=matlab) and txt (type=eigen) format The function is implemented for a third order matrix The eigen matrix is stored as a set of two dimensional matrices where each matrix is in a different file.
 
void exportVector (Eigen::VectorXd &vector, word Name, word type, word folder)
 
template<typename T >
void exportTensor (Eigen::Tensor< T, 3 > tensor, word Name, word type="python", word folder="./Matrices")
 Export the reduced tensor in numpy (tipo=python), matlab (tipo=matlab) and txt (tipo=eigen) format.
 
template void exportTensor (Eigen::Tensor< double, 3 > tensor, word Name, word type, word folder)
 
template void exportTensor (Eigen::Tensor< int, 3 > tensor, word Name, word type, word folder)
 
template void exportTensor (Eigen::Tensor< float, 3 > tensor, word Name, word type, word folder)
 
List< Eigen::MatrixXd > readMatrix (word folder, word mat_name)
 Read a three dimensional matrix from a txt file in Eigen format.
 
Eigen::MatrixXd readMatrix (word filename)
 Read a two dimensional matrix from a txt file in Eigen format.
 
template<class Type , template< class > class PatchField, class GeoMesh >
void read_fields (PtrList< GeometricField< Type, PatchField, GeoMesh > > &Lfield, word Name, fileName casename, int first_snap=0, int n_snap=0)
 Function to read a list of fields from the name of the field and casename.
 
template<class Type , template< class > class PatchField, class GeoMesh >
void read_fields (PtrList< GeometricField< Type, PatchField, GeoMesh > > &Lfield, GeometricField< Type, PatchField, GeoMesh > &field, fileName casename, int first_snap=0, int n_snap=0)
 Function to read a list of fields from the name of the field if it is already existing.
 
template<class Type , template< class > class PatchField, class GeoMesh >
void readMiddleFields (PtrList< GeometricField< Type, PatchField, GeoMesh > > &Lfield, GeometricField< Type, PatchField, GeoMesh > &field, fileName casename)
 Funtion to read a list of volVectorField from name of the field including all the intermediate snapshots.
 
template<class Type , template< class > class PatchField, class GeoMesh >
void readConvergedFields (PtrList< GeometricField< Type, PatchField, GeoMesh > > &Lfield, GeometricField< Type, PatchField, GeoMesh > &field, fileName casename)
 Function to read a list of volVectorField from name of the field including only converged snapshots.
 
int numberOfFiles (word folder, word MatrixName, word ext="")
 Count the number of files with a certain name prefix, used by reading functions of list of matrices.
 
template<class Type , template< class > class PatchField, class GeoMesh >
void exportFields (PtrList< GeometricField< Type, PatchField, GeoMesh > > &field, word folder, word fieldname)
 Function to export a scalar of vector field.
 
template void exportFields (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &field, word folder, word fieldname)
 
template void exportFields (PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &field, word folder, word fieldname)
 
template void exportFields (PtrList< GeometricField< vector, fvPatchField, volMesh > > &field, word folder, word fieldname)
 
template void exportFields (PtrList< GeometricField< tensor, fvPatchField, volMesh > > &field, word folder, word fieldname)
 
template<class Type , template< class > class PatchField, class GeoMesh >
void exportSolution (GeometricField< Type, PatchField, GeoMesh > &s, fileName subfolder, fileName folder, word fieldName)
 Export a field to file in a certain folder and subfolder.
 
template void exportSolution (GeometricField< scalar, fvPatchField, volMesh > &s, fileName subfolder, fileName folder, word fieldName)
 
template void exportSolution (GeometricField< vector, fvPatchField, volMesh > &s, fileName subfolder, fileName folder, word fieldName)
 
template void exportSolution (GeometricField< tensor, fvPatchField, volMesh > &s, fileName subfolder, fileName folder, word fieldName)
 
template void exportSolution (GeometricField< scalar, fvsPatchField, surfaceMesh > &s, fileName subfolder, fileName folder, word fieldName)
 
template<class Type , template< class > class PatchField, class GeoMesh >
void exportSolution (GeometricField< Type, PatchField, GeoMesh > &s, fileName subfolder, fileName folder)
 Export a field to file in a certain folder and subfolder.
 
template void exportSolution (GeometricField< scalar, fvPatchField, volMesh > &s, fileName subfolder, fileName folder)
 
template void exportSolution (GeometricField< vector, fvPatchField, volMesh > &s, fileName subfolder, fileName folder)
 
template void exportSolution (GeometricField< tensor, fvPatchField, volMesh > &s, fileName subfolder, fileName folder)
 
template void exportSolution (GeometricField< scalar, fvsPatchField, surfaceMesh > &s, fileName subfolder, fileName folder)
 
template void exportSolution (GeometricField< scalar, pointPatchField, pointMesh > &s, fileName subfolder, fileName folder)
 
template void exportSolution (GeometricField< vector, pointPatchField, pointMesh > &s, fileName subfolder, fileName folder)
 
template void exportSolution (GeometricField< tensor, pointPatchField, pointMesh > &s, fileName subfolder, fileName folder)
 
void writePoints (pointField points, fileName folder, fileName subfolder)
 Write points of a mesh to a file.
 
void printProgress (double percentage)
 Print progress bar given the percentage.
 
template<typename T >
void save (const List< Eigen::SparseMatrix< T > > &MatrixList, word folder, word MatrixName)
 
template<typename T >
void load (List< Eigen::SparseMatrix< T > > &MatrixList, word folder, word MatrixName)
 
template void read_fields (PtrList< volScalarField > &Lfield, word Name, fileName casename, int first_snap, int n_snap)
 
template void read_fields (PtrList< volVectorField > &Lfield, word Name, fileName casename, int first_snap, int n_snap)
 
template void read_fields (PtrList< volTensorField > &Lfield, word Name, fileName casename, int first_snap, int n_snap)
 
template void read_fields (PtrList< surfaceScalarField > &Lfield, word Name, fileName casename, int first_snap, int n_snap)
 
template void read_fields (PtrList< surfaceVectorField > &Lfield, word Name, fileName casename, int first_snap, int n_snap)
 
template void read_fields (PtrList< volScalarField > &Lfield, volScalarField &field, fileName casename, int first_snap, int n_snap)
 
template void read_fields (PtrList< volVectorField > &Lfield, volVectorField &field, fileName casename, int first_snap, int n_snap)
 
template void read_fields (PtrList< volTensorField > &Lfield, volTensorField &field, fileName casename, int first_snap, int n_snap)
 
template void read_fields (PtrList< surfaceScalarField > &Lfield, surfaceScalarField &field, fileName casename, int first_snap, int n_snap)
 
template void read_fields (PtrList< surfaceVectorField > &Lfield, surfaceVectorField &field, fileName casename, int first_snap, int n_snap)
 
template void readMiddleFields (PtrList< volScalarField > &Lfield, volScalarField &field, fileName casename)
 
template void readMiddleFields (PtrList< volVectorField > &Lfield, volVectorField &field, fileName casename)
 
template void readMiddleFields (PtrList< volTensorField > &Lfield, volTensorField &field, fileName casename)
 
template void readMiddleFields (PtrList< surfaceScalarField > &Lfield, surfaceScalarField &field, fileName casename)
 
template void readMiddleFields (PtrList< surfaceVectorField > &Lfield, surfaceVectorField &field, fileName casename)
 
template void readConvergedFields (PtrList< volScalarField > &Lfield, volScalarField &field, fileName casename)
 
template void readConvergedFields (PtrList< volVectorField > &Lfield, volVectorField &field, fileName casename)
 
template void readConvergedFields (PtrList< volTensorField > &Lfield, volTensorField &field, fileName casename)
 
template void readConvergedFields (PtrList< surfaceScalarField > &Lfield, surfaceScalarField &field, fileName casename)
 
template void readConvergedFields (PtrList< surfaceVectorField > &Lfield, surfaceVectorField &field, fileName casename)
 
template<typename T >
void exportList (T &list, word folder, word filename)
 Export a list to file.
 
template void exportList (Field< scalar > &list, word folder, word filename)
 
template void exportList (Field< vector > &list, word folder, word filename)
 
template void exportList (Field< tensor > &list, word folder, word filename)
 
template void save (const List< Eigen::SparseMatrix< double > > &MatrixList, word folder, word MatrixName)
 
template void load (List< Eigen::SparseMatrix< double > > &MatrixList, word folder, word MatrixName)
 
template<typename T , int Nrows, typename IND >
void SaveSparseMatrix (Eigen::SparseMatrix< T, Nrows, IND > &m, word folder, word MatrixName)
 Export an Eigen sparse matrix into bynary format file.
 
template<typename T , int Nrows, typename IND >
void ReadSparseMatrix (Eigen::SparseMatrix< T, Nrows, IND > &m, word folder, word MatrixName)
 Read an Eigen sparse matrix from a bynary format file.
 
template<typename MatrixType >
void SaveDenseMatrix (MatrixType &Matrix, word folder, word MatrixName)
 Save a dense matrix to a binary format file.
 
template<typename MatrixType >
void ReadDenseMatrix (MatrixType &Matrix, word folder, word MatrixName)
 Read a dense matrix from a binary format file.
 
template<typename TensorType >
void SaveDenseTensor (TensorType &Tensor, word folder, word MatrixName)
 Save a dense tensor to file.
 
template<typename TensorType >
void ReadDenseTensor (TensorType &Tensor, word folder, word MatrixName)
 Read a dense tensor from file.
 
template<typename MatrixType >
void SaveSparseMatrixList (List< MatrixType > &MatrixList, word folder, word MatrixName)
 Save a sparse matrix list to bynary files.
 
template<typename T , int Nrows, typename IND >
void ReadSparseMatrixList (List< Eigen::SparseMatrix< T, Nrows, IND > > &m, word folder, word MatrixName)
 Read a sparse matrix list to bynary files.
 
template<typename MatrixType >
void SaveDenseMatrixList (List< MatrixType > &MatrixList, word folder, word MatrixName)
 Save a dense matrix list to bynary files.
 
template<typename MatrixType >
void ReadDenseMatrixList (List< MatrixType > &m, word folder, word MatrixName)
 Read a sparse matrix list to bynary files.
 

Detailed Description

Namespace for input-output manipulation.

Function Documentation

◆ exportFields() [1/5]

template void ITHACAstream::exportFields ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & field,
word folder,
word fieldname )

◆ exportFields() [2/5]

template void ITHACAstream::exportFields ( PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & field,
word folder,
word fieldname )

◆ exportFields() [3/5]

template void ITHACAstream::exportFields ( PtrList< GeometricField< tensor, fvPatchField, volMesh > > & field,
word folder,
word fieldname )

◆ exportFields() [4/5]

template<class Type , template< class > class PatchField, class GeoMesh >
void ITHACAstream::exportFields ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & field,
word folder,
word fieldname )

Function to export a scalar of vector field.

Parameters
[in]fieldThe field you want to export.
[in]folderThe folder where you want to save the field.
[in]fieldnameThe name you want to give to the file.
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Examples
06POD_RBF.C.

Definition at line 715 of file ITHACAstream.C.

◆ exportFields() [5/5]

template void ITHACAstream::exportFields ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & field,
word folder,
word fieldname )

◆ exportFvMatrix()

template<typename Type >
void ITHACAstream::exportFvMatrix ( fvMatrix< Type > & Matrix,
word folder,
word MatrixName )

Export an Fv Matrix to folder together with its source term.

Parameters
MatrixThe matrix
[in]folderThe folder
[in]MatrixNameThe fieldname
Template Parameters
Typecan be scalar or vector

Definition at line 44 of file ITHACAstream.C.

◆ exportList() [1/4]

template void ITHACAstream::exportList ( Field< scalar > & list,
word folder,
word filename )

◆ exportList() [2/4]

template void ITHACAstream::exportList ( Field< tensor > & list,
word folder,
word filename )

◆ exportList() [3/4]

template void ITHACAstream::exportList ( Field< vector > & list,
word folder,
word filename )

◆ exportList() [4/4]

template<typename T >
void ITHACAstream::exportList ( T & list,
word folder,
word filename )

Export a list to file.

Parameters
[in]listThe list
[in]filenameName of saved file
[in]folderFolder where the field is stored
Template Parameters
Tgeneric list type object

Definition at line 956 of file ITHACAstream.C.

◆ exportMatrix() [1/8]

template void ITHACAstream::exportMatrix ( Eigen::Matrix< double, -1, -1 > & matrix,
word Name,
word type,
word folder )

◆ exportMatrix() [2/8]

template void ITHACAstream::exportMatrix ( Eigen::Matrix< double, -1, 1 > & matrix,
word Name,
word type,
word folder )

◆ exportMatrix() [3/8]

template void ITHACAstream::exportMatrix ( Eigen::Matrix< float, -1, -1 > & matrix,
word Name,
word type,
word folder )

◆ exportMatrix() [4/8]

template void ITHACAstream::exportMatrix ( Eigen::Matrix< float, -1, 1 > & matrix,
word Name,
word type,
word folder )

◆ exportMatrix() [5/8]

template void ITHACAstream::exportMatrix ( Eigen::Matrix< int, -1, -1 > & matrix,
word Name,
word type,
word folder )

◆ exportMatrix() [6/8]

template void ITHACAstream::exportMatrix ( Eigen::Matrix< int, -1, 1 > & matrix,
word Name,
word type,
word folder )

◆ exportMatrix() [7/8]

template<typename T , int dim>
void ITHACAstream::exportMatrix ( Eigen::Matrix< T, -1, dim > & matrix,
word Name,
word type = "python",
word folder = "./Matrices" )

Export the reduced matrices in numpy (type=python), matlab (type=matlab) and txt (type=eigen) format The function is implemented for a second order matrix.

Parameters
[in]matrixEigen::MatrixXd that you want to export.
[in]NameName of saved file.
[in]typeFormat of the file: numpy (type="python"), matlab (type="matlab"), txt (type="eigen").
[in]folderDirectory in which the fali is saved.
Template Parameters
TThe matrix can be of integers, double or float
Examples
03steadyNS.C, 06POD_RBF.C, 10UnsteadyBBEnclosed.C, and 11UnsteadyBBOpen.C.

Definition at line 55 of file ITHACAstream.C.

◆ exportMatrix() [8/8]

void ITHACAstream::exportMatrix ( List< Eigen::MatrixXd > & matrix,
word Name,
word type = "python",
word folder = "./Matrices" )

Export the reduced matrices in numpy (type=python), matlab (type=matlab) and txt (type=eigen) format The function is implemented for a third order matrix The eigen matrix is stored as a set of two dimensional matrices where each matrix is in a different file.

Parameters
[in]matrixEigen::MatrixXd that you want to export.
[in]NameName of saved file.
[in]typeFormat of the file: numpy (type="python"), matlab (type="matlab"), txt (type="eigen").
[in]folderDirectory in which the file is saved.

Definition at line 173 of file ITHACAstream.C.

◆ exportSolution() [1/13]

template void ITHACAstream::exportSolution ( GeometricField< scalar, fvPatchField, volMesh > & s,
fileName subfolder,
fileName folder )

◆ exportSolution() [2/13]

template void ITHACAstream::exportSolution ( GeometricField< scalar, fvPatchField, volMesh > & s,
fileName subfolder,
fileName folder,
word fieldName )

◆ exportSolution() [3/13]

template void ITHACAstream::exportSolution ( GeometricField< scalar, fvsPatchField, surfaceMesh > & s,
fileName subfolder,
fileName folder )

◆ exportSolution() [4/13]

template void ITHACAstream::exportSolution ( GeometricField< scalar, fvsPatchField, surfaceMesh > & s,
fileName subfolder,
fileName folder,
word fieldName )

◆ exportSolution() [5/13]

template void ITHACAstream::exportSolution ( GeometricField< scalar, pointPatchField, pointMesh > & s,
fileName subfolder,
fileName folder )

◆ exportSolution() [6/13]

template void ITHACAstream::exportSolution ( GeometricField< tensor, fvPatchField, volMesh > & s,
fileName subfolder,
fileName folder )

◆ exportSolution() [7/13]

template void ITHACAstream::exportSolution ( GeometricField< tensor, fvPatchField, volMesh > & s,
fileName subfolder,
fileName folder,
word fieldName )

◆ exportSolution() [8/13]

template void ITHACAstream::exportSolution ( GeometricField< tensor, pointPatchField, pointMesh > & s,
fileName subfolder,
fileName folder )

◆ exportSolution() [9/13]

template<class Type , template< class > class PatchField, class GeoMesh >
void ITHACAstream::exportSolution ( GeometricField< Type, PatchField, GeoMesh > & s,
fileName subfolder,
fileName folder )

Export a field to file in a certain folder and subfolder.

Parameters
[in]sField
[in]subfolderSubfolder where the field is stored
[in]folderFolder where the field is stored
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.

Definition at line 792 of file ITHACAstream.C.

◆ exportSolution() [10/13]

template<class Type , template< class > class PatchField, class GeoMesh >
void ITHACAstream::exportSolution ( GeometricField< Type, PatchField, GeoMesh > & s,
fileName subfolder,
fileName folder,
word fieldName )

Export a field to file in a certain folder and subfolder.

Parameters
[in]sField
[in]subfolderSubfolder where the field is stored
[in]folderFolder where the field is stored
[in]fieldNameName of the field/file
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Examples
06POD_RBF.C, 08DEIM.C, 09DEIM_ROM.C, 20incrementalPOD.C, and IHTP01inverseLaplacian.C.

Definition at line 746 of file ITHACAstream.C.

◆ exportSolution() [11/13]

template void ITHACAstream::exportSolution ( GeometricField< vector, fvPatchField, volMesh > & s,
fileName subfolder,
fileName folder )

◆ exportSolution() [12/13]

template void ITHACAstream::exportSolution ( GeometricField< vector, fvPatchField, volMesh > & s,
fileName subfolder,
fileName folder,
word fieldName )

◆ exportSolution() [13/13]

template void ITHACAstream::exportSolution ( GeometricField< vector, pointPatchField, pointMesh > & s,
fileName subfolder,
fileName folder )

◆ exportTensor() [1/4]

template void ITHACAstream::exportTensor ( Eigen::Tensor< double, 3 > tensor,
word Name,
word type,
word folder )

◆ exportTensor() [2/4]

template void ITHACAstream::exportTensor ( Eigen::Tensor< float, 3 > tensor,
word Name,
word type,
word folder )

◆ exportTensor() [3/4]

template void ITHACAstream::exportTensor ( Eigen::Tensor< int, 3 > tensor,
word Name,
word type,
word folder )

◆ exportTensor() [4/4]

template<typename T >
void ITHACAstream::exportTensor ( Eigen::Tensor< T, 3 > tensor,
word Name,
word type = "python",
word folder = "./Matrices" )

Export the reduced tensor in numpy (tipo=python), matlab (tipo=matlab) and txt (tipo=eigen) format.

Parameters
[in]tensorThe tensor that you want to export.
[in]NameName of saved file.
[in]typeFormat of the file: numpy (type="python"), matlab (type="matlab"), txt (type="eigen").
[in]folderDirectory in which the fali is saved.
[in]folderfolder string to identify the folder where you want to save the file.
Template Parameters
TThe tensor can be of integers, double or float

Definition at line 264 of file ITHACAstream.C.

◆ exportVector()

void ITHACAstream::exportVector ( Eigen::VectorXd & vector,
word Name,
word type,
word folder )

Definition at line 255 of file ITHACAstream.C.

◆ load() [1/2]

template void ITHACAstream::load ( List< Eigen::SparseMatrix< double > > & MatrixList,
word folder,
word MatrixName )

◆ load() [2/2]

template<typename T >
void ITHACAstream::load ( List< Eigen::SparseMatrix< T > > & MatrixList,
word folder,
word MatrixName )

Definition at line 892 of file ITHACAstream.C.

◆ numberOfFiles()

int ITHACAstream::numberOfFiles ( word folder,
word MatrixName,
word ext = "" )

Count the number of files with a certain name prefix, used by reading functions of list of matrices.

Parameters
[in]folderThe folder
[in]MatrixNameThe matrix name
Returns
Number of files matching the request

Definition at line 694 of file ITHACAstream.C.

◆ printProgress()

void ITHACAstream::printProgress ( double percentage)

Print progress bar given the percentage.

Parameters
[in]percentageThe percentage

Definition at line 865 of file ITHACAstream.C.

◆ read_fields() [1/12]

template<class Type , template< class > class PatchField, class GeoMesh >
void ITHACAstream::read_fields ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & Lfield,
GeometricField< Type, PatchField, GeoMesh > & field,
fileName casename,
int first_snap = 0,
int n_snap = 0 )

Function to read a list of fields from the name of the field if it is already existing.

Parameters
[in]Lfielda PtrList of OpenFOAM fields where you want to store the field.
[in]fieldThe field used as template to read other fields.
[in]casenameThe folder where the field is stored.
[in]first_snapThe first snapshots from which you want to start reading the field.
[in]n_snapThe number of snapshots you want to read.
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.

Definition at line 549 of file ITHACAstream.C.

◆ read_fields() [2/12]

template<class Type , template< class > class PatchField, class GeoMesh >
void ITHACAstream::read_fields ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & Lfield,
word Name,
fileName casename,
int first_snap = 0,
int n_snap = 0 )

Function to read a list of fields from the name of the field and casename.

Parameters
[in]Lfielda PtrList of OpenFOAM fields where you want to store the field.
[in]NameThe name of the field you want to read.
[in]casenameThe folder where the field is stored.
[in]first_snapThe first snapshots from which you want to start reading the field.
[in]n_snapThe number of snapshots you want to read.
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Examples
02thermalBlock.C, 03steadyNS.C, 04unsteadyNS.C, 06POD_RBF.C, 09DEIM_ROM.C, 10UnsteadyBBEnclosed.C, 11UnsteadyBBOpen.C, 17YJunction.C, 19UnsteadyNSExplicit.C, and 20incrementalPOD.C.

Definition at line 454 of file ITHACAstream.C.

◆ read_fields() [3/12]

template void ITHACAstream::read_fields ( PtrList< surfaceScalarField > & Lfield,
surfaceScalarField & field,
fileName casename,
int first_snap,
int n_snap )

◆ read_fields() [4/12]

template void ITHACAstream::read_fields ( PtrList< surfaceScalarField > & Lfield,
word Name,
fileName casename,
int first_snap,
int n_snap )

◆ read_fields() [5/12]

template void ITHACAstream::read_fields ( PtrList< surfaceVectorField > & Lfield,
surfaceVectorField & field,
fileName casename,
int first_snap,
int n_snap )

◆ read_fields() [6/12]

template void ITHACAstream::read_fields ( PtrList< surfaceVectorField > & Lfield,
word Name,
fileName casename,
int first_snap,
int n_snap )

◆ read_fields() [7/12]

template void ITHACAstream::read_fields ( PtrList< volScalarField > & Lfield,
volScalarField & field,
fileName casename,
int first_snap,
int n_snap )

◆ read_fields() [8/12]

template void ITHACAstream::read_fields ( PtrList< volScalarField > & Lfield,
word Name,
fileName casename,
int first_snap,
int n_snap )

◆ read_fields() [9/12]

template void ITHACAstream::read_fields ( PtrList< volTensorField > & Lfield,
volTensorField & field,
fileName casename,
int first_snap,
int n_snap )

◆ read_fields() [10/12]

template void ITHACAstream::read_fields ( PtrList< volTensorField > & Lfield,
word Name,
fileName casename,
int first_snap,
int n_snap )

◆ read_fields() [11/12]

template void ITHACAstream::read_fields ( PtrList< volVectorField > & Lfield,
volVectorField & field,
fileName casename,
int first_snap,
int n_snap )

◆ read_fields() [12/12]

template void ITHACAstream::read_fields ( PtrList< volVectorField > & Lfield,
word Name,
fileName casename,
int first_snap,
int n_snap )

◆ readConvergedFields() [1/6]

template<class Type , template< class > class PatchField, class GeoMesh >
void ITHACAstream::readConvergedFields ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & Lfield,
GeometricField< Type, PatchField, GeoMesh > & field,
fileName casename )

Function to read a list of volVectorField from name of the field including only converged snapshots.

Parameters
[in]Lfielda PtrList of OpenFOAM fields where you want to store the field.
[in]fieldThe field used as template to read other fields.
[in]casenameThe folder where the field is stored.
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.

Definition at line 659 of file ITHACAstream.C.

◆ readConvergedFields() [2/6]

template void ITHACAstream::readConvergedFields ( PtrList< surfaceScalarField > & Lfield,
surfaceScalarField & field,
fileName casename )

◆ readConvergedFields() [3/6]

template void ITHACAstream::readConvergedFields ( PtrList< surfaceVectorField > & Lfield,
surfaceVectorField & field,
fileName casename )

◆ readConvergedFields() [4/6]

template void ITHACAstream::readConvergedFields ( PtrList< volScalarField > & Lfield,
volScalarField & field,
fileName casename )

◆ readConvergedFields() [5/6]

template void ITHACAstream::readConvergedFields ( PtrList< volTensorField > & Lfield,
volTensorField & field,
fileName casename )

◆ readConvergedFields() [6/6]

template void ITHACAstream::readConvergedFields ( PtrList< volVectorField > & Lfield,
volVectorField & field,
fileName casename )

◆ ReadDenseMatrix()

template<typename MatrixType >
void ITHACAstream::ReadDenseMatrix ( MatrixType & Matrix,
word folder,
word MatrixName )

Read a dense matrix from a binary format file.

Parameters
[in,out]MatrixEigen dense matrix
[in]folderFolder from where you want to read the matrix
[in]MatrixNameName of the input file
Template Parameters
MatrixTypetype of the matrix, i.e. double, float, ...

Definition at line 632 of file ITHACAstream.H.

◆ ReadDenseMatrixList()

template<typename MatrixType >
void ITHACAstream::ReadDenseMatrixList ( List< MatrixType > & m,
word folder,
word MatrixName )

Read a sparse matrix list to bynary files.

Parameters
[in,out]MatrixListThe matrix list
[in]folderThe folder from where you want to read the files
[in]MatrixNameThe matrix name prefix, files are the named with an incremental number
Template Parameters
MatrixTypeMatrixType type of the matrix, i.e. double, float, ...

Definition at line 742 of file ITHACAstream.H.

◆ ReadDenseTensor()

template<typename TensorType >
void ITHACAstream::ReadDenseTensor ( TensorType & Tensor,
word folder,
word MatrixName )

Read a dense tensor from file.

Parameters
[in/out]Tensor The tensor
[in]folderFolder where you want to read the tensor
[in]MatrixNameThe matrix name
Template Parameters
TensorTypetype of the tensor, i.e. double, float, ...

Definition at line 679 of file ITHACAstream.H.

◆ readMatrix() [1/2]

Eigen::MatrixXd ITHACAstream::readMatrix ( word filename)

Read a two dimensional matrix from a txt file in Eigen format.

Parameters
[in]filenameThe filename of the matrix.
Returns
The Eigen::MatrixXd that contains the imported matrix.

Definition at line 400 of file ITHACAstream.C.

◆ readMatrix() [2/2]

List< Eigen::MatrixXd > ITHACAstream::readMatrix ( word folder,
word mat_name )

Read a three dimensional matrix from a txt file in Eigen format.

Parameters
[in]folderThe folder where the txt files are located
[in]mat_nameThe matrix name
Returns
List <Eigen::MatrixXd> that contains the imported matrix.
Examples
02thermalBlock.C, 03steadyNS.C, 06POD_RBF.C, 10UnsteadyBBEnclosed.C, 11UnsteadyBBOpen.C, 17YJunction.C, and 20incrementalPOD.C.

Definition at line 372 of file ITHACAstream.C.

◆ readMiddleFields() [1/6]

template<class Type , template< class > class PatchField, class GeoMesh >
void ITHACAstream::readMiddleFields ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & Lfield,
GeometricField< Type, PatchField, GeoMesh > & field,
fileName casename )

Funtion to read a list of volVectorField from name of the field including all the intermediate snapshots.

Parameters
[in]Lfielda PtrList of OpenFOAM fields where you want to store the field.
[in]fieldThe field used as template to read other fields.
[in]casenameThe folder where the field is stored.
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.

Definition at line 643 of file ITHACAstream.C.

◆ readMiddleFields() [2/6]

template void ITHACAstream::readMiddleFields ( PtrList< surfaceScalarField > & Lfield,
surfaceScalarField & field,
fileName casename )

◆ readMiddleFields() [3/6]

template void ITHACAstream::readMiddleFields ( PtrList< surfaceVectorField > & Lfield,
surfaceVectorField & field,
fileName casename )

◆ readMiddleFields() [4/6]

template void ITHACAstream::readMiddleFields ( PtrList< volScalarField > & Lfield,
volScalarField & field,
fileName casename )

◆ readMiddleFields() [5/6]

template void ITHACAstream::readMiddleFields ( PtrList< volTensorField > & Lfield,
volTensorField & field,
fileName casename )

◆ readMiddleFields() [6/6]

template void ITHACAstream::readMiddleFields ( PtrList< volVectorField > & Lfield,
volVectorField & field,
fileName casename )

◆ ReadSparseMatrix()

template<typename T , int Nrows, typename IND >
void ITHACAstream::ReadSparseMatrix ( Eigen::SparseMatrix< T, Nrows, IND > & m,
word folder,
word MatrixName )

Read an Eigen sparse matrix from a bynary format file.

Parameters
[in,out]mEigen::SparseMatrix m
[in]folderThe folder from where you want to read the matrix
[in]MatrixNameThe matrix name for the input file
Template Parameters
Ttype of the matrix, i.e. double, float, ...
Nrowsnumber of matrix rows
INDnumber of matrix cols

◆ ReadSparseMatrixList()

template<typename T , int Nrows, typename IND >
void ITHACAstream::ReadSparseMatrixList ( List< Eigen::SparseMatrix< T, Nrows, IND > > & m,
word folder,
word MatrixName )

Read a sparse matrix list to bynary files.

Parameters
[in,out]MatrixListThe matrix list
[in]folderThe folder from where you want to read the files
[in]MatrixNameThe matrix name prefix, files are the named with an incremental number
Template Parameters
MatrixTypeMatrixType type of the matrix, i.e. double, float, ...
Nrowsnumber of matrix rows
INDnumber of matrix cols

◆ save() [1/2]

template void ITHACAstream::save ( const List< Eigen::SparseMatrix< double > > & MatrixList,
word folder,
word MatrixName )

◆ save() [2/2]

template<typename T >
void ITHACAstream::save ( const List< Eigen::SparseMatrix< T > > & MatrixList,
word folder,
word MatrixName )

Definition at line 879 of file ITHACAstream.C.

◆ SaveDenseMatrix()

template<typename MatrixType >
void ITHACAstream::SaveDenseMatrix ( MatrixType & Matrix,
word folder,
word MatrixName )

Save a dense matrix to a binary format file.

Parameters
[in]MatrixEigen dense matrix
[in]folderFolder where you want to save the matrix
[in]MatrixNameName of the output file
Template Parameters
MatrixTypetype of the matrix, i.e. double, float, ...

Definition at line 617 of file ITHACAstream.H.

◆ SaveDenseMatrixList()

template<typename MatrixType >
void ITHACAstream::SaveDenseMatrixList ( List< MatrixType > & MatrixList,
word folder,
word MatrixName )

Save a dense matrix list to bynary files.

Parameters
[in]MatrixListThe matrix list
[in]folderThe folder where you want to save files
[in]MatrixNameThe matrix name prefix, files are the named with an incremental number
Template Parameters
MatrixTypeMatrixType type of the matrix, i.e. double, float, ...

Definition at line 714 of file ITHACAstream.H.

◆ SaveDenseTensor()

template<typename TensorType >
void ITHACAstream::SaveDenseTensor ( TensorType & Tensor,
word folder,
word MatrixName )

Save a dense tensor to file.

Parameters
[in]TensorThe tensor
[in]folderFolder where you want to save the tensor
[in]MatrixNameThe matrix name
Template Parameters
TensorTypetype of the tensor, i.e. double, float, ...

Definition at line 658 of file ITHACAstream.H.

◆ SaveSparseMatrix()

template<typename T , int Nrows, typename IND >
void ITHACAstream::SaveSparseMatrix ( Eigen::SparseMatrix< T, Nrows, IND > & m,
word folder,
word MatrixName )

Export an Eigen sparse matrix into bynary format file.

Parameters
mEigen::SparseMatrix
[in]folderThe folder where you want to save the matrix
[in]MatrixNameThe matrix name for the output file
Template Parameters
Ttype of the matrix, i.e. double, float, ...
Nrowsnumber of matrix rows
INDnumber of matrix cols

◆ SaveSparseMatrixList()

template<typename MatrixType >
void ITHACAstream::SaveSparseMatrixList ( List< MatrixType > & MatrixList,
word folder,
word MatrixName )

Save a sparse matrix list to bynary files.

Parameters
[in]MatrixListThe matrix list
[in]folderThe folder where you want to save files
[in]MatrixNameThe matrix name prefix, files are the named with an incremental number
Template Parameters
MatrixTypeMatrixType type of the matrix, i.e. double, float, ...

Definition at line 704 of file ITHACAstream.H.

◆ writePoints()

void ITHACAstream::writePoints ( pointField points,
fileName folder,
fileName subfolder )

Write points of a mesh to a file.

Parameters
[in]pointsThe points you want to write
[in]folderThe folder where you want to save the file
[in]subfolderThe subfolder where you want to save the file

Definition at line 839 of file ITHACAstream.C.