Loading...
Searching...
No Matches
ITHACAutilities Namespace Reference

Namespace to implement some useful assign operation of OF fields. More...

Namespaces

namespace  ITHACAsurfacetools
 

Functions

template<class TypeField >
PtrList< TypeField > averageSubtract (PtrList< TypeField > fields, Eigen::MatrixXd ind, PtrList< TypeField > &ave)
 A function to compute time-averaged fields for a set of different parameter samples and also the fields with the corresponding averaged subtracted.
 
template PtrList< volScalarField > averageSubtract (PtrList< volScalarField > fields, Eigen::MatrixXd ind, PtrList< volScalarField > &ave)
 
template PtrList< volVectorField > averageSubtract (PtrList< volVectorField > fields, Eigen::MatrixXd ind, PtrList< volVectorField > &ave)
 
template<class TypeField >
TypeField computeAverage (PtrList< TypeField > &fields)
 Calculates the average of a list of fields.
 
template volVectorField computeAverage (PtrList< volVectorField > &fields)
 
template volScalarField computeAverage (PtrList< volScalarField > &fields)
 
template<typename Type >
void assignIF (GeometricField< Type, fvPatchField, volMesh > &field, Type value)
 Assign internal field.
 
template void assignIF (GeometricField< scalar, fvPatchField, volMesh > &field, scalar value)
 
template void assignIF (GeometricField< vector, fvPatchField, volMesh > &field, vector value)
 
template<typename Type >
void assignIF (GeometricField< Type, fvPatchField, volMesh > &field, Type &value, List< label > &indices)
 Assign internal field.
 
template void assignIF (GeometricField< scalar, fvPatchField, volMesh > &s, scalar &value, List< label > &indices)
 
template void assignIF (GeometricField< vector, fvPatchField, volMesh > &s, vector &value, List< label > &indices)
 
template<typename Type >
void assignIF (GeometricField< Type, fvPatchField, volMesh > &field, Type &value, label index)
 Assign internal field.
 
template void assignIF (GeometricField< scalar, fvPatchField, volMesh > &field, scalar &value, label index)
 
template void assignIF (GeometricField< vector, fvPatchField, volMesh > &field, vector &value, label index)
 
void assignONE (volScalarField &s, List< label > &L)
 Assign one to volScalarField.
 
void assignBC (GeometricField< scalar, fvPatchField, volMesh > &s, label BC_ind, double value)
 Assign uniform Boundary Condition to a volScalarField.
 
void assignBC (GeometricField< scalar, fvPatchField, volMesh > &s, label BC_ind, Eigen::MatrixXd valueVec)
 Assign Boundary Condition to a volScalarField.
 
void assignBC (GeometricField< scalar, fvPatchField, volMesh > &s, label BC_ind, List< double > valueList)
 Assign Boundary Condition to a volScalarField.
 
void assignBC (GeometricField< vector, fvPatchField, volMesh > &s, label BC_ind, vector value)
 Assign Boundary Condition to a volVectorField.
 
void assignBC (GeometricField< tensor, fvPatchField, volMesh > &s, label BC_ind, tensor value)
 Assign Boundary Condition to a volTensorField.
 
void assignBC (GeometricField< vector, fvPatchField, volMesh > &s, label BC_ind, Eigen::MatrixXd valueVec)
 Assign Boundary Condition to a volVectorField.
 
void assignBC (GeometricField< tensor, fvPatchField, volMesh > &s, label BC_ind, Eigen::MatrixXd valueVec)
 Assign Boundary Condition to a volTensorField.
 
void assignBC (GeometricField< scalar, fvsPatchField, surfaceMesh > &field, label BC_ind, Eigen::MatrixXd value)
 Assign Boundary Condition to a surfaceField.
 
void assignBC (GeometricField< vector, fvsPatchField, surfaceMesh > &s, label BC_ind, Eigen::MatrixXd valueVec)
 
void assignBC (GeometricField< vector, fvPatchField, volMesh > &s, label BC_ind, List< vector > valueList)
 Assign Boundary Condition to a volVectorField.
 
void assignBC (GeometricField< tensor, fvPatchField, volMesh > &s, label BC_ind, List< tensor > valueList)
 Assign Boundary Condition to a volTensorField.
 
template<typename Type >
void assignBC (GeometricField< Type, fvsPatchField, surfaceMesh > &field, label BC_ind, List< Type > &value)
 Assign Boundary Condition to a surfaceField.
 
template void assignBC (GeometricField< scalar, fvsPatchField, surfaceMesh > &s, label BC_ind, List< scalar > &valueList)
 
template void assignBC (GeometricField< vector, fvsPatchField, surfaceMesh > &s, label BC_ind, List< vector > &valueList)
 
template<typename Type >
void assignBC (GeometricField< Type, fvsPatchField, surfaceMesh > &field, label BC_ind, Type &value)
 Assign Boundary Condition to a surfaceField.
 
template void assignBC (GeometricField< scalar, fvsPatchField, surfaceMesh > &s, label BC_ind, scalar &valueList)
 
template void assignBC (GeometricField< vector, fvsPatchField, surfaceMesh > &s, label BC_ind, vector &valueList)
 
template<typename Type >
void changeNeumann2Dirichlet (GeometricField< Type, fvPatchField, volMesh > &field, Type &value)
 Change all Neumann boundary conditions to Dirichlet boundary conditions.
 
template void changeNeumann2Dirichlet (GeometricField< scalar, fvPatchField, volMesh > &field, scalar &value)
 
template void changeNeumann2Dirichlet (GeometricField< vector, fvPatchField, volMesh > &field, vector &value)
 
template<typename Type >
void assignZeroDirichlet (GeometricField< Type, fvPatchField, volMesh > &field)
 Assign zero internal field.
 
template void assignZeroDirichlet (GeometricField< vector, fvPatchField, volMesh > &field)
 
template void assignZeroDirichlet (GeometricField< scalar, fvPatchField, volMesh > &field)
 
template<typename Type >
void setBoxToValue (GeometricField< Type, fvPatchField, volMesh > &field, Eigen::MatrixXd Box, Type value)
 Set value of a volScalarField to a constant inside a given box.
 
template void setBoxToValue (GeometricField< scalar, fvPatchField, volMesh > &field, Eigen::MatrixXd Box, scalar value)
 
template void setBoxToValue (GeometricField< vector, fvPatchField, volMesh > &field, Eigen::MatrixXd Box, vector value)
 
template<typename Type >
void setIndices2Value (labelList &ind2set, List< Type > &value2set, labelList &movingIDS, List< Type > &originalList)
 Sets some given Indices of a list of objects to given values.
 
template void setIndices2Value (labelList &ind2set, List< scalar > &value2set, labelList &movingIDS, List< scalar > &originalList)
 
template void setIndices2Value (labelList &ind2set, List< vector > &value2set, labelList &movingIDS, List< vector > &originalList)
 
template<class Type >
void changeBCtype (GeometricField< Type, fvPatchField, volMesh > &field, word BCtype, label BC_ind)
 Change the boundary condition type for a GeometricField.
 
template void changeBCtype< scalar > (GeometricField< scalar, fvPatchField, volMesh > &field, word BCtype, label BC_ind)
 
template void changeBCtype< vector > (GeometricField< vector, fvPatchField, volMesh > &field, word BCtype, label BC_ind)
 
template<typename Type >
void assignMixedBC (GeometricField< Type, fvPatchField, volMesh > &field, label BC_ind, List< Type > &value, List< Type > &grad, List< scalar > &valueFrac)
 Assign value of a boundary condition of type "mixed".
 
template void assignMixedBC< scalar > (GeometricField< scalar, fvPatchField, volMesh > &field, label BC_ind, List< scalar > &value, List< scalar > &grad, List< scalar > &valueFrac)
 
template void assignMixedBC< vector > (GeometricField< vector, fvPatchField, volMesh > &field, label BC_ind, List< vector > &value, List< vector > &grad, List< scalar > &valueFrac)
 
template<typename Type >
void normalizeFields (PtrList< GeometricField< Type, fvPatchField, volMesh > > &fields)
 Normalize list of Geometric fields.
 
template void normalizeFields (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields)
 
template void normalizeFields (PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields)
 
template<typename Type >
Eigen::MatrixXd getValues (GeometricField< Type, fvPatchField, volMesh > &field, labelList &indices)
 
template<>
Eigen::MatrixXd getValues (GeometricField< vector, fvPatchField, volMesh > &field, labelList &indices, labelList *xyz)
 
template<>
Eigen::MatrixXd getValues (GeometricField< scalar, fvPatchField, volMesh > &field, labelList &indices, labelList *xyz)
 
template<typename T >
Eigen::MatrixXd getValues (PtrList< GeometricField< T, fvPatchField, volMesh > > &fields, labelList &indices, labelList *xyz)
 
template Eigen::MatrixXd getValues (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields, labelList &indices, labelList *xyz)
 
template Eigen::MatrixXd getValues (PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields, labelList &indices, labelList *xyz)
 
template<typename Type >
void assignMixedBC (GeometricField< Type, fvPatchField, volMesh > &field, label BC_ind, Eigen::MatrixXd &value, Eigen::MatrixXd &grad, Eigen::MatrixXd &valueFrac)
 Assign value of a boundary condition of type "mixed".
 
template<typename Type >
Eigen::MatrixXd getValues (GeometricField< Type, fvPatchField, volMesh > &field, labelList &indices, labelList *xyz=NULL)
 ///
 
template<typename Type >
Eigen::MatrixXd getValues (PtrList< GeometricField< Type, fvPatchField, volMesh > > &field, labelList &indices, labelList *xyz=NULL)
 Gets the values from a list of indices.
 
template<class Type , template< class > class PatchField, class GeoMesh >
PtrList< GeometricField< Type, PatchField, GeoMesh > > reconstructFromCoeff (PtrList< GeometricField< Type, PatchField, GeoMesh > > &modes, Eigen::MatrixXd &coeff_matrix, label Nmodes)
 Exact reconstruction using a certain number of modes for a list of fields and the projection coefficients.
 
template PtrList< GeometricField< scalar, fvPatchField, volMesh > > reconstructFromCoeff (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &modes, Eigen::MatrixXd &coeff_matrix, label Nmodes)
 
template PtrList< GeometricField< vector, fvPatchField, volMesh > > reconstructFromCoeff (PtrList< GeometricField< vector, fvPatchField, volMesh > > &modes, Eigen::MatrixXd &coeff_matrix, label Nmodes)
 
template PtrList< GeometricField< tensor, fvPatchField, volMesh > > reconstructFromCoeff (PtrList< GeometricField< tensor, fvPatchField, volMesh > > &modes, Eigen::MatrixXd &coeff_matrix, label Nmodes)
 
template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< Type, PatchField, GeoMesh > > &fields, label nModes=0, bool consider_volumes=true)
 Gets the mass matrix using the eigen routine.
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &modes, label Nmodes, bool consider_volumes)
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &modes, label Nmodes, bool consider_volumes=false)
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< vector, fvPatchField, volMesh > > &modes, label Nmodes, bool consider_volumes)
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< tensor, fvPatchField, volMesh > > &modes, label Nmodes, bool consider_volumes)
 
template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< Type, PatchField, GeoMesh > > &fields, PtrList< GeometricField< Type, PatchField, GeoMesh > > &fields2, label nModes=0, bool consider_volumes=true)
 Gets the cross mass matrix using the eigen routine.
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &modes, PtrList< GeometricField< scalar, fvPatchField, volMesh > > &modes2, label Nmodes, bool consider_volumes)
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &modes, PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &modes2, label Nmodes, bool consider_volumes=false)
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< vector, fvPatchField, volMesh > > &modes, PtrList< GeometricField< vector, fvPatchField, volMesh > > &modes2, label Nmodes, bool consider_volumes)
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< tensor, fvPatchField, volMesh > > &modes, PtrList< GeometricField< tensor, fvPatchField, volMesh > > &modes2, label Nmodes, bool consider_volumes)
 
template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< Type, PatchField, GeoMesh > > &fields, PtrList< GeometricField< Type, PatchField, GeoMesh > > &fields2, Eigen::VectorXd weights, label Nmodes=0, bool consider_volumes=true)
 Gets the cross mass matrix using the eigen routine.
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &modes, PtrList< GeometricField< scalar, fvPatchField, volMesh > > &modes2, Eigen::VectorXd weights, label Nmodes=0, bool consider_volumes)
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &modes, PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &modes2, Eigen::VectorXd weights, label Nmodes=0, bool consider_volumes)
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< vector, fvPatchField, volMesh > > &modes, PtrList< GeometricField< vector, fvPatchField, volMesh > > &modes2, Eigen::VectorXd weights, label Nmodes=0, bool consider_volumes)
 
template Eigen::MatrixXd getMassMatrix (PtrList< GeometricField< tensor, fvPatchField, volMesh > > &modes, PtrList< GeometricField< tensor, fvPatchField, volMesh > > &modes2, Eigen::VectorXd weights, label Nmodes=0, bool consider_volumes)
 
template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::VectorXd getMassMatrixFV (GeometricField< Type, PatchField, GeoMesh > &snapshot)
 Gets a vector containing the volumes of each cell of the mesh.
 
template Eigen::VectorXd getMassMatrixFV (GeometricField< scalar, fvPatchField, volMesh > &snapshot)
 
template Eigen::VectorXd getMassMatrixFV (GeometricField< vector, fvPatchField, volMesh > &snapshot)
 
template Eigen::VectorXd getMassMatrixFV (GeometricField< tensor, fvPatchField, volMesh > &snapshot)
 
template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::VectorXd getCoeffs (GeometricField< Type, PatchField, GeoMesh > &snapshot, PtrList< GeometricField< Type, PatchField, GeoMesh > > &modes, label Nmodes=0, bool consider_volumes=true)
 Projects a snapshot on a basis function and gets the coefficients of the projection.
 
template Eigen::VectorXd getCoeffs (GeometricField< scalar, fvPatchField, volMesh > &snapshot, PtrList< GeometricField< scalar, fvPatchField, volMesh > > &modes, label Nmodes, bool consider_volumes)
 
template Eigen::VectorXd getCoeffs (GeometricField< scalar, fvsPatchField, surfaceMesh > &snapshot, PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &modes, label Nmodes, bool consider_volumes=false)
 
template Eigen::VectorXd getCoeffs (GeometricField< vector, fvPatchField, volMesh > &snapshot, PtrList< GeometricField< vector, fvPatchField, volMesh > > &modes, label Nmodes, bool consider_volumes)
 
template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd getCoeffs (PtrList< GeometricField< Type, PatchField, GeoMesh > > &snapshot, PtrList< GeometricField< Type, PatchField, GeoMesh > > &modes, label Nmodes=0, bool consider_volumes=true)
 Projects snapshots on a basis function and gets the coefficients of the projection.
 
template Eigen::MatrixXd getCoeffs (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &snapshot, PtrList< GeometricField< scalar, fvPatchField, volMesh > > &modes, label Nmodes, bool consider_volumes)
 
template Eigen::MatrixXd getCoeffs (PtrList< GeometricField< vector, fvPatchField, volMesh > > &snapshot, PtrList< GeometricField< vector, fvPatchField, volMesh > > &modes, label Nmodes, bool consider_volumes)
 
template Eigen::MatrixXd getCoeffs (PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &snapshot, PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &modes, label Nmodes, bool consider_volumes)
 
Eigen::MatrixXd parTimeCombMat (List< Eigen::VectorXd > acquiredSnapshotsTimes, Eigen::MatrixXd parameters)
 A method to compute the time-parameter combined matrix whose any single element corresponds to a unique snapshot in the snapshots acquired for the offline stage.
 
template<>
double L2Norm (GeometricField< scalar, fvPatchField, volMesh > &field)
 
template<>
double L2Norm (GeometricField< vector, fvPatchField, volMesh > &field)
 
template<>
double LinfNorm (GeometricField< scalar, fvPatchField, volMesh > &field)
 
template<>
double LinfNorm (GeometricField< vector, fvPatchField, volMesh > &field)
 
template<class Type , template< class > class PatchField, class GeoMesh >
double errorFrobRel (GeometricField< Type, PatchField, GeoMesh > &field1, GeometricField< Type, PatchField, GeoMesh > &field2, List< label > *labels=NULL)
 Computes the relative error between two Fields in the Frobenius norm.
 
template double errorFrobRel (GeometricField< scalar, fvPatchField, volMesh > &field1, GeometricField< scalar, fvPatchField, volMesh > &field2, List< label > *labels)
 
template double errorFrobRel (GeometricField< vector, fvPatchField, volMesh > &field1, GeometricField< vector, fvPatchField, volMesh > &field2, List< label > *labels)
 
template double errorFrobRel (GeometricField< scalar, fvsPatchField, surfaceMesh > &field1, GeometricField< scalar, fvsPatchField, surfaceMesh > &field2, List< label > *labels)
 
template<typename T >
double errorLinfRel (GeometricField< T, fvPatchField, volMesh > &field1, GeometricField< T, fvPatchField, volMesh > &field2, List< label > *labels=NULL)
 Computes the relative error between two geometric Fields in Linf norm.
 
template double errorLinfRel (GeometricField< scalar, fvPatchField, volMesh > &field1, GeometricField< scalar, fvPatchField, volMesh > &field2, List< label > *labels)
 
template double errorLinfRel (GeometricField< vector, fvPatchField, volMesh > &field1, GeometricField< vector, fvPatchField, volMesh > &field2, List< label > *labels)
 
template<>
double errorL2Abs (GeometricField< vector, fvPatchField, volMesh > &field1, GeometricField< vector, fvPatchField, volMesh > &field2, volScalarField &Volumes)
 
template<>
double errorL2Abs (GeometricField< scalar, fvPatchField, volMesh > &field1, GeometricField< scalar, fvPatchField, volMesh > &field2, volScalarField &Volumes)
 
template<typename T >
double errorL2Abs (GeometricField< T, fvPatchField, volMesh > &field1, GeometricField< T, fvPatchField, volMesh > &field2, List< label > *labels=NULL)
 Computes the absolute error between two Fields in L2 norm.
 
template double errorL2Abs (GeometricField< scalar, fvPatchField, volMesh > &field1, GeometricField< scalar, fvPatchField, volMesh > &field2, List< label > *labels)
 
template double errorL2Abs (GeometricField< vector, fvPatchField, volMesh > &field1, GeometricField< vector, fvPatchField, volMesh > &field2, List< label > *labels)
 
template<class T , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd errorFrobRel (PtrList< GeometricField< T, PatchField, GeoMesh > > &fields1, PtrList< GeometricField< T, PatchField, GeoMesh > > &fields2, List< label > *labels=NULL)
 Computes the relative error in the Frobenius norm between two lists of fields.
 
template Eigen::MatrixXd errorFrobRel (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields2, List< label > *labels)
 
template Eigen::MatrixXd errorFrobRel (PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields2, List< label > *labels)
 
template Eigen::MatrixXd errorFrobRel (PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &fields1, PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > &fields2, List< label > *labels)
 
template<typename T >
Eigen::MatrixXd errorL2Abs (PtrList< GeometricField< T, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< T, fvPatchField, volMesh > > &fields2, PtrList< volScalarField > &Volumes)
 Computes the relative error in L2 norm between two lists of Fields given the list of mesh volumes fields.
 
template Eigen::MatrixXd errorL2Abs (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields2, PtrList< volScalarField > &Volumes)
 
template Eigen::MatrixXd errorL2Abs (PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields2, PtrList< volScalarField > &Volumes)
 
template<typename T >
Eigen::MatrixXd errorL2Abs (PtrList< GeometricField< T, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< T, fvPatchField, volMesh > > &fields2, List< label > *labels=NULL)
 Computes the absolute error in L2 norm between two lists of Fields.
 
template Eigen::MatrixXd errorL2Abs (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields2, List< label > *labels)
 
template Eigen::MatrixXd errorL2Abs (PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields2, List< label > *labels)
 
template<typename T >
double errorL2Rel (GeometricField< T, fvPatchField, volMesh > &field1, GeometricField< T, fvPatchField, volMesh > &field2, List< label > *labels=NULL)
 Computes the relative error between two geometric Fields in L2 norm.
 
template double errorL2Rel (GeometricField< scalar, fvPatchField, volMesh > &field1, GeometricField< scalar, fvPatchField, volMesh > &field2, List< label > *labels)
 
template double errorL2Rel (GeometricField< vector, fvPatchField, volMesh > &field1, GeometricField< vector, fvPatchField, volMesh > &field2, List< label > *labels)
 
template<typename T >
Eigen::MatrixXd errorL2Rel (PtrList< GeometricField< T, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< T, fvPatchField, volMesh > > &fields2, List< label > *labels=NULL)
 Computes the relative error in L2 norm between two lists of fields.
 
template Eigen::MatrixXd errorL2Rel (PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< scalar, fvPatchField, volMesh > > &fields2, List< label > *labels)
 
template Eigen::MatrixXd errorL2Rel (PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields1, PtrList< GeometricField< vector, fvPatchField, volMesh > > &fields2, List< label > *labels)
 
template<>
double H1Seminorm (GeometricField< scalar, fvPatchField, volMesh > &field)
 
template<>
double H1Seminorm (GeometricField< vector, fvPatchField, volMesh > &field)
 
template<class Type , template< class > class PatchField, class GeoMesh >
double frobNorm (GeometricField< Type, PatchField, GeoMesh > &field)
 Evaluate the Frobenius norm of a field.
 
template double frobNorm (GeometricField< scalar, fvPatchField, volMesh > &field)
 
template double frobNorm (GeometricField< vector, fvPatchField, volMesh > &field)
 
double L2normOnPatch (fvMesh &mesh, volScalarField &field, word patch)
 Evaluate the L2 norm of a field on a boundary patch.
 
double L2productOnPatch (fvMesh &mesh, List< scalar > &field1, List< scalar > &field2, word patch)
 Evaluate the L2 inner product between two scalarLists.
 
double LinfNormOnPatch (fvMesh &mesh, volScalarField &field, word patch)
 Evaluate the Linf norm of a field on a boundary patch.
 
double integralOnPatch (fvMesh &mesh, volScalarField &field, word patch)
 Evaluate the integral on a patch.
 
double integralOnPatch (fvMesh &mesh, List< scalar > field, word patch)
 Evaluate the integral on a patch.
 
template<typename T >
double errorL2Abs (GeometricField< T, fvPatchField, volMesh > &field1, GeometricField< T, fvPatchField, volMesh > &field2, volScalarField &Volumes)
 Computes the absolute error between two geometric Fields in L2 norm, given the mesh volumes field.
 
template<class T >
double L2Norm (GeometricField< T, fvPatchField, volMesh > &field)
 Evaluate the L2 norm of a geometric field.
 
template<class T >
double LinfNorm (GeometricField< T, fvPatchField, volMesh > &field)
 Evaluate the Linf norm of a geometric field.
 
template<class T >
double H1Seminorm (GeometricField< T, fvPatchField, volMesh > &field)
 Evaluate the H1 seminorm of a geoemtri.
 
labelList getIndicesFromBox (const fvMesh &mesh, List< label > indices, Eigen::MatrixXd Box, List< vector > &points2Move)
 Gives the indices conteined into a defined box.
 
List< label > getIndices (const fvMesh &mesh, int index, int layers)
 Gets the indices of the cells around a certain cell.
 
List< label > getIndices (const fvMesh &mesh, int index_row, int index_col, int layers)
 Gets the indices of the cells around a certain cell.
 
void getPointsFromPatch (fvMesh &mesh, label ind, List< vector > &points, labelList &indices)
 Get the polabel coordinates and indices from patch.
 
List< vector > displacedSegment (List< vector > x0, double mux1, double mux2, double muy1, double muy2)
 Get position of displaced segment of points given the displacements of the end points.
 
vector displacePolabel (vector x0, vector x_low, vector x_up, double mux_low, double mux_up, double muy_low, double muy_up, double muz_low=0.0, double muz_up=0.0)
 Displace a Polabel belonging to a given segment.
 
Field< vector > rotateMesh (fvMesh &mesh, double r1, double r2, vector axis, double alpha, labelList movingPointsIDs, List< double > radii, word angleVariationMethod="Linear", double v=3)
 A function that rotates the mesh rigidly, by a fixed specified angle for the points lying within a disc of radius r1, and by a an angle which diminishes from the former angle to zero either linearly or following a Sinusoidal relation or Sigmoid function in a disc of radius r2 larger than r1.
 
Eigen::MatrixXd rotationMatrix (vector AxisOfRotation, double AngleOfRotation)
 Functions that return a Rotation Matrix given an axis of rotation and an angle in degrees.
 
Eigen::VectorXd boudaryFaceToCellDistance (fvMesh &mesh, label BC_ind)
 Compute the distance between the boundary face center and the boundary cell center.
 
List< label > getIndicesFromDisc (const fvMesh &mesh, double radius, vector origin, vector axis, List< double > &radii)
 Gets the indices of the points which are inside a disc of a specified radius before carrying out a rotation around an axis.
 
template<typename type_f >
List< label > getIndicesFromBox (GeometricField< type_f, fvPatchField, volMesh > &field, Eigen::MatrixXd Box)
 Gets the indices from coordinates of a given box.
 
template List< label > getIndicesFromBox (GeometricField< scalar, fvPatchField, volMesh > &field, Eigen::MatrixXd Box)
 
template List< label > getIndicesFromBox (GeometricField< vector, fvPatchField, volMesh > &field, Eigen::MatrixXd Box)
 
template<typename type_f >
fvMeshSubset * getSubMeshFromBox (GeometricField< type_f, fvPatchField, volMesh > &field, Eigen::MatrixXd Box)
 Gets a subMesh from a box of coordinates and a given field (used only for the mesh).
 
template fvMeshSubset * getSubMeshFromBox (GeometricField< scalar, fvPatchField, volMesh > &field, Eigen::MatrixXd Box)
 
template fvMeshSubset * getSubMeshFromBox (GeometricField< vector, fvPatchField, volMesh > &field, Eigen::MatrixXd Box)
 
volScalarField meshNonOrtho (fvMesh &mesh, volScalarField &NonOrtho)
 Returns a scalarField that containes the non-orthogonality value of a given mesh.
 
List< vector > rotatePoints (const List< vector > &originalPoints, vector AxisOfRotation, double AngleOfRotation)
 Rotate a list of points in clockwise direction given an axis of rotation and an angle in degrees.
 
void createSymLink (word folder)
 Creates symbolic links to 0, system and constant.
 
void createSymLink (word linkFolder, word destFolder)
 Creates a symbolic link to linkFolder into the destFolder.
 
bool check_folder (word folder)
 Checks if a folder exists.
 
bool check_off ()
 Check if the offline data folder "./ITHACAoutput/Offline" exists.
 
bool check_file (std::string fileName)
 Function that returns true if a file exists.
 
bool check_pod ()
 Check if the POD data folder "./ITHACAoutput/POD" exists.
 
bool check_sup ()
 Check if the supremizer folder exists.
 
Eigen::MatrixXd rand (label rows, label cols, double min, double max)
 Generates random matrix with random values in an interval.
 
Eigen::MatrixXd rand (label rows, Eigen::MatrixXd minMax)
 Generates random matrix with random values in an interval.
 
bool isInteger (double ratio)
 This function checks if ratio is an integer.
 
bool isTurbulent ()
 This function checks if the case is turbulent.
 
template<typename T >
List< TcombineList (List< List< T > > &doubleList)
 Combine a list of list into a single list with unique elements.
 
template List< label > combineList (List< List< label > > &doubleList)
 
Eigen::MatrixXd pinv_eigen_based (Eigen::MatrixXd &origin, const float er=0)
 Using the Eigen library, using the SVD decomposition method to solve the matrix pseudo-inverse, the default error er is 0.
 
Eigen::MatrixXd invertMatrix (Eigen::MatrixXd &matrixToInvert, const word inversionMethod)
 Invert a matrix given the method name in the ITHACAdict.
 

Detailed Description

Namespace to implement some useful assign operation of OF fields.

Namespace to implement some useful functions inside ITHACA-FV.

Namespace to implement some useful system calls inside ITHACA-FV.

Namespace to implement projection coefficients calculation and mass matrices.

Function Documentation

◆ assignBC() [1/17]

void ITHACAutilities::assignBC ( GeometricField< scalar, fvPatchField, volMesh > & s,
label BC_ind,
double value )

Assign uniform Boundary Condition to a volScalarField.

Parameters
[in]sfield where you want to assign the BC.
[in]BC_indThe BC index.
[in]valueThe value you want to assign (it must be a double).

Definition at line 143 of file ITHACAassign.C.

◆ assignBC() [2/17]

void ITHACAutilities::assignBC ( GeometricField< scalar, fvPatchField, volMesh > & s,
label BC_ind,
Eigen::MatrixXd valueVec )

Assign Boundary Condition to a volScalarField.

Parameters
[in]sfield where you want to assign the BC.
[in]BC_indThe BC index.
[in]valueVecThe value you want to assign (it must be an Eigen MatrixXd).

Definition at line 157 of file ITHACAassign.C.

◆ assignBC() [3/17]

void ITHACAutilities::assignBC ( GeometricField< scalar, fvPatchField, volMesh > & s,
label BC_ind,
List< double > valueList )

Assign Boundary Condition to a volScalarField.

Parameters
[in]sfield where you want to assign the BC.
[in]BC_indThe BC index.
[in]valueListThe value you want to assign (it must be a list of doubles).

Definition at line 174 of file ITHACAassign.C.

◆ assignBC() [4/17]

void ITHACAutilities::assignBC ( GeometricField< scalar, fvsPatchField, surfaceMesh > & field,
label BC_ind,
Eigen::MatrixXd value )

Assign Boundary Condition to a surfaceField.

Parameters
fieldfield where you want to assign the BC.
[in]BC_indThe bc ind
valueyou want to assign (it must be column matrix).
Template Parameters
TypeType of field (vector or scalar)

Definition at line 312 of file ITHACAassign.C.

◆ assignBC() [5/17]

template void ITHACAutilities::assignBC ( GeometricField< scalar, fvsPatchField, surfaceMesh > & s,
label BC_ind,
List< scalar > & valueList )

◆ assignBC() [6/17]

template void ITHACAutilities::assignBC ( GeometricField< scalar, fvsPatchField, surfaceMesh > & s,
label BC_ind,
scalar & valueList )

◆ assignBC() [7/17]

void ITHACAutilities::assignBC ( GeometricField< tensor, fvPatchField, volMesh > & s,
label BC_ind,
Eigen::MatrixXd valueVec )

Assign Boundary Condition to a volTensorField.

Parameters
[in]sfield where you want to assign the BC.
[in]BC_indThe BC index.
[in]valueVecThe value you want to assign (it must be an Eigen MatrixXd).

Definition at line 293 of file ITHACAassign.C.

◆ assignBC() [8/17]

void ITHACAutilities::assignBC ( GeometricField< tensor, fvPatchField, volMesh > & s,
label BC_ind,
List< tensor > valueList )

Assign Boundary Condition to a volTensorField.

Parameters
[in]sfield where you want to assign the BC.
[in]BC_indThe BC index.
[in]valueListThe value you want to assign (it must be a list of tensors).

Definition at line 409 of file ITHACAassign.C.

◆ assignBC() [9/17]

void ITHACAutilities::assignBC ( GeometricField< tensor, fvPatchField, volMesh > & s,
label BC_ind,
tensor value )

Assign Boundary Condition to a volTensorField.

Parameters
[in]sfield where you want to assign the BC.
[in]BC_indThe BC index.
[in]valueThe value you want to assign (it must be an OpenFOAM tensor).

Definition at line 259 of file ITHACAassign.C.

◆ assignBC() [10/17]

template<typename Type >
void ITHACAutilities::assignBC ( GeometricField< Type, fvsPatchField, surfaceMesh > & field,
label BC_ind,
List< Type > & value )

Assign Boundary Condition to a surfaceField.

Parameters
fieldfield where you want to assign the BC.
[in]BC_indThe bc ind
valueyou want to assign (it must be a list of double or vector).
Template Parameters
TypeType of field (vector or scalar)

Definition at line 471 of file ITHACAassign.C.

◆ assignBC() [11/17]

template<typename Type >
void ITHACAutilities::assignBC ( GeometricField< Type, fvsPatchField, surfaceMesh > & field,
label BC_ind,
Type & value )

Assign Boundary Condition to a surfaceField.

Parameters
fieldfield where you want to assign the BC.
[in]BC_indThe bc ind
valueyou want to assign (it must be a double or vector).
Template Parameters
TypeType of field (vector or scalar)

Definition at line 544 of file ITHACAassign.C.

◆ assignBC() [12/17]

void ITHACAutilities::assignBC ( GeometricField< vector, fvPatchField, volMesh > & s,
label BC_ind,
Eigen::MatrixXd valueVec )

Assign Boundary Condition to a volVectorField.

Parameters
[in]sfield where you want to assign the BC.
[in]BC_indThe BC index.
[in]valueVecThe value you want to assign (it must be an Eigen MatrixXd).

Definition at line 275 of file ITHACAassign.C.

◆ assignBC() [13/17]

void ITHACAutilities::assignBC ( GeometricField< vector, fvPatchField, volMesh > & s,
label BC_ind,
List< vector > valueList )

Assign Boundary Condition to a volVectorField.

Parameters
[in]sfield where you want to assign the BC.
[in]BC_indThe BC index.
[in]valueListThe value you want to assign (it must be a list of vectors).

Definition at line 347 of file ITHACAassign.C.

◆ assignBC() [14/17]

void ITHACAutilities::assignBC ( GeometricField< vector, fvPatchField, volMesh > & s,
label BC_ind,
vector value )

Assign Boundary Condition to a volVectorField.

Parameters
[in]sfield where you want to assign the BC.
[in]BC_indThe BC index.
[in]valueThe value you want to assign (it must be an OpenFOAM vector).

Definition at line 243 of file ITHACAassign.C.

◆ assignBC() [15/17]

void ITHACAutilities::assignBC ( GeometricField< vector, fvsPatchField, surfaceMesh > & s,
label BC_ind,
Eigen::MatrixXd valueVec )

Definition at line 328 of file ITHACAassign.C.

◆ assignBC() [16/17]

template void ITHACAutilities::assignBC ( GeometricField< vector, fvsPatchField, surfaceMesh > & s,
label BC_ind,
List< vector > & valueList )

◆ assignBC() [17/17]

template void ITHACAutilities::assignBC ( GeometricField< vector, fvsPatchField, surfaceMesh > & s,
label BC_ind,
vector & valueList )

◆ assignIF() [1/9]

template void ITHACAutilities::assignIF ( GeometricField< scalar, fvPatchField, volMesh > & field,
scalar & value,
label index )

◆ assignIF() [2/9]

template void ITHACAutilities::assignIF ( GeometricField< scalar, fvPatchField, volMesh > & field,
scalar value )

◆ assignIF() [3/9]

template void ITHACAutilities::assignIF ( GeometricField< scalar, fvPatchField, volMesh > & s,
scalar & value,
List< label > & indices )

◆ assignIF() [4/9]

template<typename Type >
void ITHACAutilities::assignIF ( GeometricField< Type, fvPatchField, volMesh > & field,
Type & value,
label index )

Assign internal field.

Parameters
[in,out]fieldField to which assign the internal field
valueThe value you want to assign
indexThe index where you want assign
Template Parameters
TypeType of field vector or scalar

Definition at line 124 of file ITHACAassign.C.

◆ assignIF() [5/9]

template<typename Type >
void ITHACAutilities::assignIF ( GeometricField< Type, fvPatchField, volMesh > & field,
Type & value,
List< label > & indices )

Assign internal field.

Parameters
[in,out]fieldField to which assign the internal field
valueThe value you want to assign
indicesThe list of indices where you want assign
Template Parameters
TypeType of field vector or scalar

Definition at line 109 of file ITHACAassign.C.

◆ assignIF() [6/9]

template<typename Type >
void ITHACAutilities::assignIF ( GeometricField< Type, fvPatchField, volMesh > & field,
Type value )

Assign internal field.

Parameters
[in,out]fieldField to which assign the internal field
valueThe value you want to assign
Template Parameters
TypeType of field vector or scalar

Definition at line 94 of file ITHACAassign.C.

◆ assignIF() [7/9]

template void ITHACAutilities::assignIF ( GeometricField< vector, fvPatchField, volMesh > & field,
vector & value,
label index )

◆ assignIF() [8/9]

template void ITHACAutilities::assignIF ( GeometricField< vector, fvPatchField, volMesh > & field,
vector value )

◆ assignIF() [9/9]

template void ITHACAutilities::assignIF ( GeometricField< vector, fvPatchField, volMesh > & s,
vector & value,
List< label > & indices )

◆ assignMixedBC() [1/2]

template<typename Type >
void ITHACAutilities::assignMixedBC ( GeometricField< Type, fvPatchField, volMesh > & field,
label BC_ind,
Eigen::MatrixXd & value,
Eigen::MatrixXd & grad,
Eigen::MatrixXd & valueFrac )

Assign value of a boundary condition of type "mixed".

Parameters
[in,out]fieldField
[in]BC_indIndex of the boundary patch
[in]valueReference fixed value
[in]gradReference normal gradient
[in]valueFracWeight field
Template Parameters
TypeType of the field, it can be scalar or vector.

◆ assignMixedBC() [2/2]

template<typename Type >
void ITHACAutilities::assignMixedBC ( GeometricField< Type, fvPatchField, volMesh > & field,
label BC_ind,
List< Type > & value,
List< Type > & grad,
List< scalar > & valueFrac )

Assign value of a boundary condition of type "mixed".

Parameters
[in,out]fieldField
[in]BC_indIndex of the boundary patch
[in]valueReference fixed value
[in]gradReference normal gradient
[in]valueFracWeight field
Template Parameters
TypeType of the field, it can be scalar or vector.

Definition at line 702 of file ITHACAassign.C.

◆ assignMixedBC< scalar >()

template void ITHACAutilities::assignMixedBC< scalar > ( GeometricField< scalar, fvPatchField, volMesh > & field,
label BC_ind,
List< scalar > & value,
List< scalar > & grad,
List< scalar > & valueFrac )

◆ assignMixedBC< vector >()

template void ITHACAutilities::assignMixedBC< vector > ( GeometricField< vector, fvPatchField, volMesh > & field,
label BC_ind,
List< vector > & value,
List< vector > & grad,
List< scalar > & valueFrac )

◆ assignONE()

void ITHACAutilities::assignONE ( volScalarField & s,
List< label > & L )

Assign one to volScalarField.

Parameters
[in,out]sfield where you want to assign the internal field condition
LList of indices

Definition at line 135 of file ITHACAassign.C.

◆ assignZeroDirichlet() [1/3]

template void ITHACAutilities::assignZeroDirichlet ( GeometricField< scalar, fvPatchField, volMesh > & field)

◆ assignZeroDirichlet() [2/3]

template<typename Type >
void ITHACAutilities::assignZeroDirichlet ( GeometricField< Type, fvPatchField, volMesh > & field)

Assign zero internal field.

Change all non-zero Dirichlet boundary condition values to zero. Change all Neumann boundary conditions to Dirichlet boundary conditions.

Parameters
[in,out]fieldField of which the BCs need to be changed
Template Parameters
TypeType of field (vector or scalar)

Definition at line 586 of file ITHACAassign.C.

◆ assignZeroDirichlet() [3/3]

template void ITHACAutilities::assignZeroDirichlet ( GeometricField< vector, fvPatchField, volMesh > & field)

◆ averageSubtract() [1/3]

template<class TypeField >
PtrList< TypeField > ITHACAutilities::averageSubtract ( PtrList< TypeField > fields,
Eigen::MatrixXd ind,
PtrList< TypeField > & ave )

A function to compute time-averaged fields for a set of different parameter samples and also the fields with the corresponding averaged subtracted.

Parameters
[in]fieldsThe fields from which the time-averaged fields have to be computed
[in]indThe indices at which fields for different samples of the parameter start
aveThe computed time-averaged fields
Template Parameters
TypeFieldType of field
Returns
A list of fields which correspond to the original fields subtracted by the time-averaged part

Definition at line 31 of file ITHACAassign.C.

◆ averageSubtract() [2/3]

template PtrList< volScalarField > ITHACAutilities::averageSubtract ( PtrList< volScalarField > fields,
Eigen::MatrixXd ind,
PtrList< volScalarField > & ave )

◆ averageSubtract() [3/3]

template PtrList< volVectorField > ITHACAutilities::averageSubtract ( PtrList< volVectorField > fields,
Eigen::MatrixXd ind,
PtrList< volVectorField > & ave )

◆ boudaryFaceToCellDistance()

Eigen::VectorXd ITHACAutilities::boudaryFaceToCellDistance ( fvMesh & mesh,
label BC_ind )

Compute the distance between the boundary face center and the boundary cell center.

Parameters
[in]BC_indIndex of the boundary patch
[in]meshMesh
Returns
Vector of the face to cell center distance in Eigen format

Definition at line 295 of file ITHACAgeometry.C.

◆ changeBCtype()

template<class Type >
void ITHACAutilities::changeBCtype ( GeometricField< Type, fvPatchField, volMesh > & field,
word BCtype,
label BC_ind )

Change the boundary condition type for a GeometricField.

Parameters
fieldThe field
[in]BCtypeThe The BC type you want to set
[in]BC_indThe BC index
Template Parameters
TypeThe type of field it can be scalar or vector

Definition at line 686 of file ITHACAassign.C.

◆ changeBCtype< scalar >()

template void ITHACAutilities::changeBCtype< scalar > ( GeometricField< scalar, fvPatchField, volMesh > & field,
word BCtype,
label BC_ind )

◆ changeBCtype< vector >()

template void ITHACAutilities::changeBCtype< vector > ( GeometricField< vector, fvPatchField, volMesh > & field,
word BCtype,
label BC_ind )

◆ changeNeumann2Dirichlet() [1/3]

template void ITHACAutilities::changeNeumann2Dirichlet ( GeometricField< scalar, fvPatchField, volMesh > & field,
scalar & value )

◆ changeNeumann2Dirichlet() [2/3]

template<typename Type >
void ITHACAutilities::changeNeumann2Dirichlet ( GeometricField< Type, fvPatchField, volMesh > & field,
Type & value )

Change all Neumann boundary conditions to Dirichlet boundary conditions.

Parameters
[in,out]fieldField of which the BCs need to be changed
valueThe value you want to assign
Template Parameters
TypeType of field vector or scalar

Definition at line 566 of file ITHACAassign.C.

◆ changeNeumann2Dirichlet() [3/3]

template void ITHACAutilities::changeNeumann2Dirichlet ( GeometricField< vector, fvPatchField, volMesh > & field,
vector & value )

◆ check_file()

bool ITHACAutilities::check_file ( std::string fileName)

Function that returns true if a file exists.

Parameters
[in]fileNameThe name of the file
Returns
1 if the file exists 0 elsewhere.

Definition at line 136 of file ITHACAsystem.C.

◆ check_folder()

bool ITHACAutilities::check_folder ( word folder)

Checks if a folder exists.

Parameters
[in]folderThe folder you want to check.
Returns
1 if the folder exists 0 elsewhere.
Examples
10UnsteadyBBEnclosed.C, and 11UnsteadyBBOpen.C.

Definition at line 89 of file ITHACAsystem.C.

◆ check_off()

bool ITHACAutilities::check_off ( )

Check if the offline data folder "./ITHACAoutput/Offline" exists.

Returns
1 if the folder exists 0 elsewhere.

Definition at line 107 of file ITHACAsystem.C.

◆ check_pod()

bool ITHACAutilities::check_pod ( )

Check if the POD data folder "./ITHACAoutput/POD" exists.

Returns
1 if the folder exists 0 elsewhere.

Definition at line 143 of file ITHACAsystem.C.

◆ check_sup()

bool ITHACAutilities::check_sup ( )

Check if the supremizer folder exists.

Returns
1 if the folder exists 0 elsewhere.

Definition at line 173 of file ITHACAsystem.C.

◆ combineList() [1/2]

template List< label > ITHACAutilities::combineList ( List< List< label > > & doubleList)

◆ combineList() [2/2]

template<typename T >
List< T > ITHACAutilities::combineList ( List< List< T > > & doubleList)

Combine a list of list into a single list with unique elements.

Parameters
doubleListThe list of list
Template Parameters
Ttype of element label, double, etc...
Returns
list in unique order

Definition at line 111 of file ITHACAutilities.C.

◆ computeAverage() [1/3]

template<class TypeField >
TypeField ITHACAutilities::computeAverage ( PtrList< TypeField > & fields)

Calculates the average of a list of fields.

Parameters
fieldsThe fields
Template Parameters
TypeField{ description }
Returns
The average.

Definition at line 74 of file ITHACAassign.C.

◆ computeAverage() [2/3]

template volScalarField ITHACAutilities::computeAverage ( PtrList< volScalarField > & fields)

◆ computeAverage() [3/3]

template volVectorField ITHACAutilities::computeAverage ( PtrList< volVectorField > & fields)

◆ createSymLink() [1/2]

void ITHACAutilities::createSymLink ( word folder)

Creates symbolic links to 0, system and constant.

Parameters
[in]folderThe folder where to create the symbolic links
Examples
10UnsteadyBBEnclosed.C, and 11UnsteadyBBOpen.C.

Definition at line 30 of file ITHACAsystem.C.

◆ createSymLink() [2/2]

void ITHACAutilities::createSymLink ( word linkFolder,
word destFolder )

Creates a symbolic link to linkFolder into the destFolder.

Parameters
[in]linkFolderThe folder to be linked
[in]destFolderThe folder where to create the symbolic link

Definition at line 78 of file ITHACAsystem.C.

◆ displacedSegment()

List< vector > ITHACAutilities::displacedSegment ( List< vector > x0,
double mux1,
double mux2,
double muy1,
double muy2 )

Get position of displaced segment of points given the displacements of the end points.

Parameters
[in]x0The points of the segment before displacement
[in]mux1The x displacement of the 1st end of the segment
[in]mux2The x displacement of the 2nd end of the segment
[in]muy1The y displacement of the 1st end of the segment
[in]muy2The y displacement of the 2nd end of the segment
Returns
The points coordinates of the displaced segment

Definition at line 132 of file ITHACAgeometry.C.

◆ displacePolabel()

vector ITHACAutilities::displacePolabel ( vector x0,
vector x_low,
vector x_up,
double mux_low,
double mux_up,
double muy_low,
double muy_up,
double muz_low = 0.0,
double muz_up = 0.0 )

Displace a Polabel belonging to a given segment.

Parameters
[in]x0The initial coordinate of the polabel
[in]x_lowThe position of the lower end of the segment
[in]x_upThe posizion of the upper end of the segment
[in]mux_lowThe x displacement of the lower end of the segment
[in]mux_upThe x displacement of the upper end of the segment
[in]muy_lowThe y displacement of the lower end of the segment
[in]muy_upThe y displacement of the upper end of the segment
[in]muz_lowThe z displacement of the lower end of the segment
[in]muz_upThe z displacement of the upper end of the segment
Returns
The displaced polabel

Definition at line 159 of file ITHACAgeometry.C.

◆ errorFrobRel() [1/8]

template double ITHACAutilities::errorFrobRel ( GeometricField< scalar, fvPatchField, volMesh > & field1,
GeometricField< scalar, fvPatchField, volMesh > & field2,
List< label > * labels )

◆ errorFrobRel() [2/8]

template double ITHACAutilities::errorFrobRel ( GeometricField< scalar, fvsPatchField, surfaceMesh > & field1,
GeometricField< scalar, fvsPatchField, surfaceMesh > & field2,
List< label > * labels )

◆ errorFrobRel() [3/8]

template<class Type , template< class > class PatchField, class GeoMesh >
double ITHACAutilities::errorFrobRel ( GeometricField< Type, PatchField, GeoMesh > & field1,
GeometricField< Type, PatchField, GeoMesh > & field2,
List< label > * labels = NULL )

Computes the relative error between two Fields in the Frobenius norm.

Parameters
field1The reference field to which the norm is computed
field2The field for which the error is computed
labels(optional) a list of labels with the indices were you want to compute the error
Template Parameters
TypeType of field, can be scalar or vector
PatchFieldType of PatchField, surface or volumetric
GeoMeshType of Mesh, surface or volumetric
Returns
Frobenius norm of the relative error.
Examples
06POD_RBF.C.

Definition at line 78 of file ITHACAerror.C.

◆ errorFrobRel() [4/8]

template double ITHACAutilities::errorFrobRel ( GeometricField< vector, fvPatchField, volMesh > & field1,
GeometricField< vector, fvPatchField, volMesh > & field2,
List< label > * labels )

◆ errorFrobRel() [5/8]

template Eigen::MatrixXd ITHACAutilities::errorFrobRel ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields2,
List< label > * labels )

◆ errorFrobRel() [6/8]

template Eigen::MatrixXd ITHACAutilities::errorFrobRel ( PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & fields1,
PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & fields2,
List< label > * labels )

◆ errorFrobRel() [7/8]

template<class T , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd ITHACAutilities::errorFrobRel ( PtrList< GeometricField< T, PatchField, GeoMesh > > & fields1,
PtrList< GeometricField< T, PatchField, GeoMesh > > & fields2,
List< label > * labels = NULL )

Computes the relative error in the Frobenius norm between two lists of fields.

Parameters
[in]field1The reference field to which the norm is computed
[in]field2The field for which the error is computed
[in]labels(optional) a list of labels with the indices were you want to compute the error
Template Parameters
Ttype of field
Returns
Column vector, in each row the Frobenius norm of the relative error.

Definition at line 270 of file ITHACAerror.C.

◆ errorFrobRel() [8/8]

template Eigen::MatrixXd ITHACAutilities::errorFrobRel ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields2,
List< label > * labels )

◆ errorL2Abs() [1/12]

template double ITHACAutilities::errorL2Abs ( GeometricField< scalar, fvPatchField, volMesh > & field1,
GeometricField< scalar, fvPatchField, volMesh > & field2,
List< label > * labels )

◆ errorL2Abs() [2/12]

template<>
double ITHACAutilities::errorL2Abs ( GeometricField< scalar, fvPatchField, volMesh > & field1,
GeometricField< scalar, fvPatchField, volMesh > & field2,
volScalarField & Volumes )

Definition at line 211 of file ITHACAerror.C.

◆ errorL2Abs() [3/12]

template<typename T >
double ITHACAutilities::errorL2Abs ( GeometricField< T, fvPatchField, volMesh > & field1,
GeometricField< T, fvPatchField, volMesh > & field2,
List< label > * labels = NULL )

Computes the absolute error between two Fields in L2 norm.

Parameters
[in]field1The reference field to which the norm is computed
[in]field2The field for which the error is computed
[in]labels(optional) a list of labels with the indices were you want to compute the error
Template Parameters
Ttype of field
Returns
L2 norm of the absolute error.

Definition at line 222 of file ITHACAerror.C.

◆ errorL2Abs() [4/12]

template<typename T >
double ITHACAutilities::errorL2Abs ( GeometricField< T, fvPatchField, volMesh > & field1,
GeometricField< T, fvPatchField, volMesh > & field2,
volScalarField & Volumes )

Computes the absolute error between two geometric Fields in L2 norm, given the mesh volumes field.

Parameters
[in]field1The reference field to which the norm is computed
[in]field2The field for which the error is computed
[in]labels(optional) a list of labels with the indices were you want to compute the error
Template Parameters
Ttype of field
Returns
L2 norm of the absolute error.

◆ errorL2Abs() [5/12]

template double ITHACAutilities::errorL2Abs ( GeometricField< vector, fvPatchField, volMesh > & field1,
GeometricField< vector, fvPatchField, volMesh > & field2,
List< label > * labels )

◆ errorL2Abs() [6/12]

template<>
double ITHACAutilities::errorL2Abs ( GeometricField< vector, fvPatchField, volMesh > & field1,
GeometricField< vector, fvPatchField, volMesh > & field2,
volScalarField & Volumes )
Examples
09DEIM_ROM.C, and IHTP01inverseLaplacian.C.

Definition at line 200 of file ITHACAerror.C.

◆ errorL2Abs() [7/12]

template Eigen::MatrixXd ITHACAutilities::errorL2Abs ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields2,
List< label > * labels )

◆ errorL2Abs() [8/12]

template Eigen::MatrixXd ITHACAutilities::errorL2Abs ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields2,
PtrList< volScalarField > & Volumes )

◆ errorL2Abs() [9/12]

template<typename T >
Eigen::MatrixXd ITHACAutilities::errorL2Abs ( PtrList< GeometricField< T, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< T, fvPatchField, volMesh > > & fields2,
List< label > * labels = NULL )

Computes the absolute error in L2 norm between two lists of Fields.

Parameters
[in]field1The reference field to which the norm is computed
[in]field2The field for which the error is computed
[in]labels(optional) a list of labels with the indices were you want to compute the error
Template Parameters
Ttype of field
Returns
column vector, in each row the L2 norm of the absolute error.

Definition at line 339 of file ITHACAerror.C.

◆ errorL2Abs() [10/12]

template<typename T >
Eigen::MatrixXd ITHACAutilities::errorL2Abs ( PtrList< GeometricField< T, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< T, fvPatchField, volMesh > > & fields2,
PtrList< volScalarField > & Volumes )

Computes the relative error in L2 norm between two lists of Fields given the list of mesh volumes fields.

Parameters
[in]fields1The fields 1, scalar or vector
[in]fields2The fields 2, scalar or vector
[in]VolumesThe list of the mesh volumes fields
Template Parameters
TypeFieldtype of field
Returns
Column vector, in each row the L2 norm of the error.

Definition at line 308 of file ITHACAerror.C.

◆ errorL2Abs() [11/12]

template Eigen::MatrixXd ITHACAutilities::errorL2Abs ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields2,
List< label > * labels )

◆ errorL2Abs() [12/12]

template Eigen::MatrixXd ITHACAutilities::errorL2Abs ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields2,
PtrList< volScalarField > & Volumes )

◆ errorL2Rel() [1/6]

template double ITHACAutilities::errorL2Rel ( GeometricField< scalar, fvPatchField, volMesh > & field1,
GeometricField< scalar, fvPatchField, volMesh > & field2,
List< label > * labels )

◆ errorL2Rel() [2/6]

template<typename T >
double ITHACAutilities::errorL2Rel ( GeometricField< T, fvPatchField, volMesh > & field1,
GeometricField< T, fvPatchField, volMesh > & field2,
List< label > * labels = NULL )

Computes the relative error between two geometric Fields in L2 norm.

Parameters
[in]field1The reference field to which the norm is computed
[in]field2The field for which the error is computed
[in]labels(optional) a list of labels with the indices were you want to compute the error
Template Parameters
Ttype of field
Returns
L2 norm of the relative error.
Examples
02thermalBlock.C, 06POD_RBF.C, 08DEIM.C, 10UnsteadyBBEnclosed.C, 11UnsteadyBBOpen.C, and IHTP01inverseLaplacian.C.

Definition at line 372 of file ITHACAerror.C.

◆ errorL2Rel() [3/6]

template double ITHACAutilities::errorL2Rel ( GeometricField< vector, fvPatchField, volMesh > & field1,
GeometricField< vector, fvPatchField, volMesh > & field2,
List< label > * labels )

◆ errorL2Rel() [4/6]

template Eigen::MatrixXd ITHACAutilities::errorL2Rel ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields2,
List< label > * labels )

◆ errorL2Rel() [5/6]

template<typename T >
Eigen::MatrixXd ITHACAutilities::errorL2Rel ( PtrList< GeometricField< T, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< T, fvPatchField, volMesh > > & fields2,
List< label > * labels = NULL )

Computes the relative error in L2 norm between two lists of fields.

Parameters
[in]field1The reference field to which the norm is computed
[in]field2The field for which the error is computed
[in]labels(optional) a list of labels with the indices were you want to compute the error
Template Parameters
Ttype of field
Returns
Column vector, in each row the L2 norm of the relative error.

Definition at line 430 of file ITHACAerror.C.

◆ errorL2Rel() [6/6]

template Eigen::MatrixXd ITHACAutilities::errorL2Rel ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields1,
PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields2,
List< label > * labels )

◆ errorLinfRel() [1/3]

template double ITHACAutilities::errorLinfRel ( GeometricField< scalar, fvPatchField, volMesh > & field1,
GeometricField< scalar, fvPatchField, volMesh > & field2,
List< label > * labels )

◆ errorLinfRel() [2/3]

template<typename T >
double ITHACAutilities::errorLinfRel ( GeometricField< T, fvPatchField, volMesh > & field1,
GeometricField< T, fvPatchField, volMesh > & field2,
List< label > * labels = NULL )

Computes the relative error between two geometric Fields in Linf norm.

Parameters
[in]field1The reference field to which the norm is computed
[in]field2The field for which the error is computed
[in]labels(optional) a list of labels with the indices were you want to compute the error
Template Parameters
Ttype of field
Returns
Linf norm of the relative error.
Examples
IHTP01inverseLaplacian.C.

Definition at line 142 of file ITHACAerror.C.

◆ errorLinfRel() [3/3]

template double ITHACAutilities::errorLinfRel ( GeometricField< vector, fvPatchField, volMesh > & field1,
GeometricField< vector, fvPatchField, volMesh > & field2,
List< label > * labels )

◆ frobNorm() [1/3]

template double ITHACAutilities::frobNorm ( GeometricField< scalar, fvPatchField, volMesh > & field)

◆ frobNorm() [2/3]

template<class Type , template< class > class PatchField, class GeoMesh >
double ITHACAutilities::frobNorm ( GeometricField< Type, PatchField, GeoMesh > & field)

Evaluate the Frobenius norm of a field.

Parameters
[in]fieldThe field.
Template Parameters
TType of field, scalar or vector
Returns
Frobenius norm of the field.

Definition at line 482 of file ITHACAerror.C.

◆ frobNorm() [3/3]

template double ITHACAutilities::frobNorm ( GeometricField< vector, fvPatchField, volMesh > & field)

◆ getCoeffs() [1/8]

template Eigen::VectorXd ITHACAutilities::getCoeffs ( GeometricField< scalar, fvPatchField, volMesh > & snapshot,
PtrList< GeometricField< scalar, fvPatchField, volMesh > > & modes,
label Nmodes,
bool consider_volumes )

◆ getCoeffs() [2/8]

template Eigen::VectorXd ITHACAutilities::getCoeffs ( GeometricField< scalar, fvsPatchField, surfaceMesh > & snapshot,
PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & modes,
label Nmodes,
bool consider_volumes = false )

◆ getCoeffs() [3/8]

template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::VectorXd ITHACAutilities::getCoeffs ( GeometricField< Type, PatchField, GeoMesh > & snapshot,
PtrList< GeometricField< Type, PatchField, GeoMesh > > & modes,
label Nmodes = 0,
bool consider_volumes = true )

Projects a snapshot on a basis function and gets the coefficients of the projection.

Parameters
[in]snapshotThe snapshot.
[in]modesThe modes.
[in]NmodesThe number of modes
[in]consider_volumesConsider volumes or not, in not equals Frobenius Projection
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Returns
The coefficients of the projection.
Examples
10UnsteadyBBEnclosed.C, and 11UnsteadyBBOpen.C.

Definition at line 317 of file ITHACAcoeffsMass.C.

◆ getCoeffs() [4/8]

template Eigen::VectorXd ITHACAutilities::getCoeffs ( GeometricField< vector, fvPatchField, volMesh > & snapshot,
PtrList< GeometricField< vector, fvPatchField, volMesh > > & modes,
label Nmodes,
bool consider_volumes )

◆ getCoeffs() [5/8]

template Eigen::MatrixXd ITHACAutilities::getCoeffs ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & snapshot,
PtrList< GeometricField< scalar, fvPatchField, volMesh > > & modes,
label Nmodes,
bool consider_volumes )

◆ getCoeffs() [6/8]

template Eigen::MatrixXd ITHACAutilities::getCoeffs ( PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & snapshot,
PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & modes,
label Nmodes,
bool consider_volumes )

◆ getCoeffs() [7/8]

template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd ITHACAutilities::getCoeffs ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & snapshot,
PtrList< GeometricField< Type, PatchField, GeoMesh > > & modes,
label Nmodes = 0,
bool consider_volumes = true )

Projects snapshots on a basis function and gets the coefficients of the projection.

Parameters
[in]snapshotThe snapshots.
[in]modesThe modes.
[in]NmodesThe number of modes you want to use
[in]consider_volumesThe consider volumes (if not equals Frobenius Projection)
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Returns
The coefficients of the projection.

Definition at line 379 of file ITHACAcoeffsMass.C.

◆ getCoeffs() [8/8]

template Eigen::MatrixXd ITHACAutilities::getCoeffs ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & snapshot,
PtrList< GeometricField< vector, fvPatchField, volMesh > > & modes,
label Nmodes,
bool consider_volumes )

◆ getIndices() [1/2]

List< label > ITHACAutilities::getIndices ( const fvMesh & mesh,
int index,
int layers )

Gets the indices of the cells around a certain cell.

Parameters
meshThe mesh
[in]indexThe index of the considered cell
[in]layersThe number of layers to be considered
Returns
The indices.

Definition at line 62 of file ITHACAgeometry.C.

◆ getIndices() [2/2]

List< label > ITHACAutilities::getIndices ( const fvMesh & mesh,
int index_row,
int index_col,
int layers )

Gets the indices of the cells around a certain cell.

Parameters
meshThe mesh
[in]index_rowThe index of the considered cell
[in]index_colThe index of the considered cell
[in]layersThe number of layers to be considered
Returns
The indices.

Definition at line 88 of file ITHACAgeometry.C.

◆ getIndicesFromBox() [1/4]

labelList ITHACAutilities::getIndicesFromBox ( const fvMesh & mesh,
List< label > indices,
Eigen::MatrixXd Box,
List< vector > & points2Move )

Gives the indices conteined into a defined box.

Parameters
[in]meshThe mesh
[in]indicesThe list where indices have to be stored
[in]BoxThe box defined by two opposite points
[in]points2MoveThe list containing the coordines of the points into the box
Returns
the labels list of the points

Definition at line 31 of file ITHACAgeometry.C.

◆ getIndicesFromBox() [2/4]

template List< label > ITHACAutilities::getIndicesFromBox ( GeometricField< scalar, fvPatchField, volMesh > & field,
Eigen::MatrixXd Box )

◆ getIndicesFromBox() [3/4]

template<typename type_f >
List< label > ITHACAutilities::getIndicesFromBox ( GeometricField< type_f, fvPatchField, volMesh > & field,
Eigen::MatrixXd Box )

Gets the indices from coordinates of a given box.

Parameters
fieldA geometric Field from OpenFoam field
[in]BoxThe box
Template Parameters
type_ftype of the Field can be Scalar or Vector
Returns
The indices from box.

Definition at line 347 of file ITHACAgeometry.C.

◆ getIndicesFromBox() [4/4]

template List< label > ITHACAutilities::getIndicesFromBox ( GeometricField< vector, fvPatchField, volMesh > & field,
Eigen::MatrixXd Box )

◆ getIndicesFromDisc()

List< label > ITHACAutilities::getIndicesFromDisc ( const fvMesh & mesh,
double radius,
vector origin,
vector axis,
List< double > & radii )

Gets the indices of the points which are inside a disc of a specified radius before carrying out a rotation around an axis.

Parameters
meshThe mesh for which you want to find the indices of the points inside a disc
[in]radiusThe radius of the disc
[in]originThe origin of the disc
[in]axisThe axis of the rotation
radiiThe distances of the points lying inside the disc to the origin
Returns
The indices of the points lying inside the specified the disc.

Definition at line 316 of file ITHACAgeometry.C.

◆ getMassMatrix() [1/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & modes,
label Nmodes,
bool consider_volumes )

◆ getMassMatrix() [2/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & modes,
PtrList< GeometricField< scalar, fvPatchField, volMesh > > & modes2,
Eigen::VectorXd weights,
label Nmodes = 0,
bool consider_volumes )

◆ getMassMatrix() [3/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & modes,
PtrList< GeometricField< scalar, fvPatchField, volMesh > > & modes2,
label Nmodes,
bool consider_volumes )

◆ getMassMatrix() [4/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & modes,
label Nmodes,
bool consider_volumes = false )

◆ getMassMatrix() [5/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & modes,
PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & modes2,
Eigen::VectorXd weights,
label Nmodes = 0,
bool consider_volumes )

◆ getMassMatrix() [6/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & modes,
PtrList< GeometricField< scalar, fvsPatchField, surfaceMesh > > & modes2,
label Nmodes,
bool consider_volumes = false )

◆ getMassMatrix() [7/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< tensor, fvPatchField, volMesh > > & modes,
label Nmodes,
bool consider_volumes )

◆ getMassMatrix() [8/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< tensor, fvPatchField, volMesh > > & modes,
PtrList< GeometricField< tensor, fvPatchField, volMesh > > & modes2,
Eigen::VectorXd weights,
label Nmodes = 0,
bool consider_volumes )

◆ getMassMatrix() [9/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< tensor, fvPatchField, volMesh > > & modes,
PtrList< GeometricField< tensor, fvPatchField, volMesh > > & modes2,
label Nmodes,
bool consider_volumes )

◆ getMassMatrix() [10/15]

template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & fields,
label nModes = 0,
bool consider_volumes = true )

Gets the mass matrix using the eigen routine.

Parameters
[in]fieldsThe openFoam fields
[in]consider_volumesTrue if you want to consider the volumes
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Returns
The mass matrix eigen.

Definition at line 68 of file ITHACAcoeffsMass.C.

◆ getMassMatrix() [11/15]

template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & fields,
PtrList< GeometricField< Type, PatchField, GeoMesh > > & fields2,
Eigen::VectorXd weights,
label Nmodes = 0,
bool consider_volumes = true )

Gets the cross mass matrix using the eigen routine.

Parameters
[in]fieldsThe openFoam fields
[in]fields2The second openFoam fields
[in]weightsWeights
[in]consider_volumesTrue if you want to consider the volumes
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Returns
The cross mass matrix eigen.

Definition at line 213 of file ITHACAcoeffsMass.C.

◆ getMassMatrix() [12/15]

template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & fields,
PtrList< GeometricField< Type, PatchField, GeoMesh > > & fields2,
label nModes = 0,
bool consider_volumes = true )

Gets the cross mass matrix using the eigen routine.

Parameters
[in]fieldsThe openFoam fields
[in]consider_volumesTrue if you want to consider the volumes
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Returns
The cross mass matrix eigen.

Definition at line 135 of file ITHACAcoeffsMass.C.

◆ getMassMatrix() [13/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & modes,
label Nmodes,
bool consider_volumes )

◆ getMassMatrix() [14/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & modes,
PtrList< GeometricField< vector, fvPatchField, volMesh > > & modes2,
Eigen::VectorXd weights,
label Nmodes = 0,
bool consider_volumes )

◆ getMassMatrix() [15/15]

template Eigen::MatrixXd ITHACAutilities::getMassMatrix ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & modes,
PtrList< GeometricField< vector, fvPatchField, volMesh > > & modes2,
label Nmodes,
bool consider_volumes )

◆ getMassMatrixFV() [1/4]

template Eigen::VectorXd ITHACAutilities::getMassMatrixFV ( GeometricField< scalar, fvPatchField, volMesh > & snapshot)

◆ getMassMatrixFV() [2/4]

template Eigen::VectorXd ITHACAutilities::getMassMatrixFV ( GeometricField< tensor, fvPatchField, volMesh > & snapshot)

◆ getMassMatrixFV() [3/4]

template<class Type , template< class > class PatchField, class GeoMesh >
Eigen::VectorXd ITHACAutilities::getMassMatrixFV ( GeometricField< Type, PatchField, GeoMesh > & snapshot)

Gets a vector containing the volumes of each cell of the mesh.

Parameters
[in]snapshotA snapshot, scalar or vector field.
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Returns
The FV mass matrix in Eigen::MatrixXd form.
Examples
08DEIM.C.

Definition at line 299 of file ITHACAcoeffsMass.C.

◆ getMassMatrixFV() [4/4]

template Eigen::VectorXd ITHACAutilities::getMassMatrixFV ( GeometricField< vector, fvPatchField, volMesh > & snapshot)

◆ getPointsFromPatch()

void ITHACAutilities::getPointsFromPatch ( fvMesh & mesh,
label ind,
List< vector > & points,
labelList & indices )

Get the polabel coordinates and indices from patch.

Parameters
[in]meshThe mesh
[in]indThe index of the patch from which you want to extract the points
[out]pointsThe coordinates of the points on the patch
[out]indicesThe indices of the points on the patch

Definition at line 116 of file ITHACAgeometry.C.

◆ getSubMeshFromBox() [1/3]

template fvMeshSubset * ITHACAutilities::getSubMeshFromBox ( GeometricField< scalar, fvPatchField, volMesh > & field,
Eigen::MatrixXd Box )

◆ getSubMeshFromBox() [2/3]

template<typename type_f >
fvMeshSubset * ITHACAutilities::getSubMeshFromBox ( GeometricField< type_f, fvPatchField, volMesh > & field,
Eigen::MatrixXd Box )

Gets a subMesh from a box of coordinates and a given field (used only for the mesh).

Parameters
fieldThe field passed
[in]BoxThe box of coordinates 3*2 matrix
Template Parameters
type_ftype of the Field can be Scalar or Vector
Returns
The subMesh from the box. It can later used to interpolate any Field

Definition at line 380 of file ITHACAgeometry.C.

◆ getSubMeshFromBox() [3/3]

template fvMeshSubset * ITHACAutilities::getSubMeshFromBox ( GeometricField< vector, fvPatchField, volMesh > & field,
Eigen::MatrixXd Box )

◆ getValues() [1/8]

template<>
Eigen::MatrixXd ITHACAutilities::getValues ( GeometricField< scalar, fvPatchField, volMesh > & field,
labelList & indices,
labelList * xyz )

Definition at line 831 of file ITHACAassign.C.

◆ getValues() [2/8]

template<typename Type >
Eigen::MatrixXd ITHACAutilities::getValues ( GeometricField< Type, fvPatchField, volMesh > & field,
labelList & indices )

Definition at line 779 of file ITHACAassign.C.

◆ getValues() [3/8]

template<typename Type >
Eigen::MatrixXd ITHACAutilities::getValues ( GeometricField< Type, fvPatchField, volMesh > & field,
labelList & indices,
labelList * xyz = NULL )

///

Gets the values from a list of indices

Parameters
fieldThe field from which you want to extract the values
indicesThe indices at the point
xyzDefinition of the x, y, z coordinate of the value you want to extract 0 for x, 1 for y, 2 for z
Template Parameters
Typetype of the Field can be Scalar or Vector
Returns
The values.

◆ getValues() [4/8]

template<>
Eigen::MatrixXd ITHACAutilities::getValues ( GeometricField< vector, fvPatchField, volMesh > & field,
labelList & indices,
labelList * xyz )

Definition at line 795 of file ITHACAassign.C.

◆ getValues() [5/8]

template Eigen::MatrixXd ITHACAutilities::getValues ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields,
labelList & indices,
labelList * xyz )

◆ getValues() [6/8]

template<typename T >
Eigen::MatrixXd ITHACAutilities::getValues ( PtrList< GeometricField< T, fvPatchField, volMesh > > & fields,
labelList & indices,
labelList * xyz )

Definition at line 848 of file ITHACAassign.C.

◆ getValues() [7/8]

template<typename Type >
Eigen::MatrixXd ITHACAutilities::getValues ( PtrList< GeometricField< Type, fvPatchField, volMesh > > & field,
labelList & indices,
labelList * xyz = NULL )

Gets the values from a list of indices.

Parameters
fieldThe field
indicesThe indices
xyzThe xyz
Template Parameters
Type{ description }
Returns
The values.

◆ getValues() [8/8]

template Eigen::MatrixXd ITHACAutilities::getValues ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields,
labelList & indices,
labelList * xyz )

◆ H1Seminorm() [1/3]

template<>
double ITHACAutilities::H1Seminorm ( GeometricField< scalar, fvPatchField, volMesh > & field)

Definition at line 463 of file ITHACAerror.C.

◆ H1Seminorm() [2/3]

template<class T >
double ITHACAutilities::H1Seminorm ( GeometricField< T, fvPatchField, volMesh > & field)

Evaluate the H1 seminorm of a geoemtri.

Parameters
[in]fieldThe field.
Template Parameters
TType of field, scalar or vector
Returns
H1 seminorm of the volVectorField.

◆ H1Seminorm() [3/3]

template<>
double ITHACAutilities::H1Seminorm ( GeometricField< vector, fvPatchField, volMesh > & field)

Definition at line 472 of file ITHACAerror.C.

◆ integralOnPatch() [1/2]

double ITHACAutilities::integralOnPatch ( fvMesh & mesh,
List< scalar > field,
word patch )

Evaluate the integral on a patch.

Parameters
[in]meshThe mesh.
[in]fieldA list of values of the field on the patch.
[in]patchName of the patch.
Returns
Integral of the field on the patch.

Definition at line 575 of file ITHACAerror.C.

◆ integralOnPatch() [2/2]

double ITHACAutilities::integralOnPatch ( fvMesh & mesh,
volScalarField & field,
word patch )

Evaluate the integral on a patch.

Parameters
[in]meshThe mesh.
[in]fieldThe field.
[in]patchName of the patch.
Returns
Integral of the field on the patch.

Definition at line 556 of file ITHACAerror.C.

◆ invertMatrix()

Eigen::MatrixXd ITHACAutilities::invertMatrix ( Eigen::MatrixXd & matrixToInvert,
const word inversionMethod )

Invert a matrix given the method name in the ITHACAdict.

Parameters
[in]matrixToInvertMatrix to invert
[in]methodNameMethod
Returns
Inversed matrix

Definition at line 162 of file ITHACAutilities.C.

◆ isInteger()

bool ITHACAutilities::isInteger ( double ratio)

This function checks if ratio is an integer.

Parameters
[in]ratioThe ratio
Returns
1 if ratio is an integer

Definition at line 74 of file ITHACAutilities.C.

◆ isTurbulent()

bool ITHACAutilities::isTurbulent ( )

This function checks if the case is turbulent.

Returns
1 if the case is turbulent

Definition at line 90 of file ITHACAutilities.C.

◆ L2Norm() [1/3]

template<>
double ITHACAutilities::L2Norm ( GeometricField< scalar, fvPatchField, volMesh > & field)
Examples
20incrementalPOD.C, and IHTP01inverseLaplacian.C.

Definition at line 41 of file ITHACAerror.C.

◆ L2Norm() [2/3]

template<class T >
double ITHACAutilities::L2Norm ( GeometricField< T, fvPatchField, volMesh > & field)

Evaluate the L2 norm of a geometric field.

Parameters
[in]fieldThe field.
Template Parameters
TType of field, scalar or vector
Returns
L2 norm of the volVectorField.

◆ L2Norm() [3/3]

template<>
double ITHACAutilities::L2Norm ( GeometricField< vector, fvPatchField, volMesh > & field)

Definition at line 49 of file ITHACAerror.C.

◆ L2normOnPatch()

double ITHACAutilities::L2normOnPatch ( fvMesh & mesh,
volScalarField & field,
word patch )

Evaluate the L2 norm of a field on a boundary patch.

Parameters
[in]meshThe mesh.
[in]fieldThe field.
[in]patchName of the patch.
Returns
L2 norm of the field on the patch.

Definition at line 493 of file ITHACAerror.C.

◆ L2productOnPatch()

double ITHACAutilities::L2productOnPatch ( fvMesh & mesh,
List< scalar > & field1,
List< scalar > & field2,
word patch )

Evaluate the L2 inner product between two scalarLists.

Parameters
[in]meshThe mesh.
[in]field1The first field.
[in]field2The second field.
[in]patchName of the patch.
Returns
L2 norm of the field on the patch.

Definition at line 512 of file ITHACAerror.C.

◆ LinfNorm() [1/3]

template<>
double ITHACAutilities::LinfNorm ( GeometricField< scalar, fvPatchField, volMesh > & field)
Examples
IHTP01inverseLaplacian.C.

Definition at line 57 of file ITHACAerror.C.

◆ LinfNorm() [2/3]

template<class T >
double ITHACAutilities::LinfNorm ( GeometricField< T, fvPatchField, volMesh > & field)

Evaluate the Linf norm of a geometric field.

Parameters
[in]fieldThe field.
Template Parameters
TType of field, scalar or vector
Returns
Linf norm of the volVectorField.

◆ LinfNorm() [3/3]

template<>
double ITHACAutilities::LinfNorm ( GeometricField< vector, fvPatchField, volMesh > & field)

Definition at line 66 of file ITHACAerror.C.

◆ LinfNormOnPatch()

double ITHACAutilities::LinfNormOnPatch ( fvMesh & mesh,
volScalarField & field,
word patch )

Evaluate the Linf norm of a field on a boundary patch.

Parameters
[in]meshThe mesh.
[in]fieldThe field.
[in]patchName of the patch.
Returns
Linf norm of the field on the patch.

Definition at line 531 of file ITHACAerror.C.

◆ meshNonOrtho()

volScalarField ITHACAutilities::meshNonOrtho ( fvMesh & mesh,
volScalarField & NonOrtho )

Returns a scalarField that containes the non-orthogonality value of a given mesh.

Parameters
meshThe mesh for which you want to compute the non-orthogonality value
NonOrthoThe scalarField containing the non-orthogonality
Returns
The scalarField containing the non-orthogonality

Definition at line 400 of file ITHACAgeometry.C.

◆ normalizeFields() [1/3]

template void ITHACAutilities::normalizeFields ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & fields)

◆ normalizeFields() [2/3]

template<typename Type >
void ITHACAutilities::normalizeFields ( PtrList< GeometricField< Type, fvPatchField, volMesh > > & fields)

Normalize list of Geometric fields.

Parameters
fieldsThe fields to be normalized
Template Parameters
Typetype of the Field can be Scalar or Vector
Examples
03steadyNS.C, 04unsteadyNS.C, and 17YJunction.C.

Definition at line 732 of file ITHACAassign.C.

◆ normalizeFields() [3/3]

template void ITHACAutilities::normalizeFields ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & fields)

◆ parTimeCombMat()

Eigen::MatrixXd ITHACAutilities::parTimeCombMat ( List< Eigen::VectorXd > acquiredSnapshotsTimes,
Eigen::MatrixXd parameters )

A method to compute the time-parameter combined matrix whose any single element corresponds to a unique snapshot in the snapshots acquired for the offline stage.

Parameters
[in]acquiredSnapshotsTimesThe time instants at which snapshots are acquired
[in]parametersThe parameters for which the simulations are run ordered with respect to vectors acquiredSnapshotsTimes which contain the corresponding time instants at which we acquired snapshots
Returns
A matrix which has in each row the parameters value and the time instants which correspond to a unique snapshot in the offline folder.

Definition at line 425 of file ITHACAcoeffsMass.C.

◆ pinv_eigen_based()

Eigen::MatrixXd ITHACAutilities::pinv_eigen_based ( Eigen::MatrixXd & origin,
const float er = 0 )

Using the Eigen library, using the SVD decomposition method to solve the matrix pseudo-inverse, the default error er is 0.

Parameters
originMatrix to invert
erError
Returns
Inversed matrix

Definition at line 138 of file ITHACAutilities.C.

◆ rand() [1/2]

Eigen::MatrixXd ITHACAutilities::rand ( label rows,
Eigen::MatrixXd minMax )

Generates random matrix with random values in an interval.

Parameters
[in]rowsNumber of rows
[in]minMaxThe min and max Matrix, it has as many rows as columns of the output matrix.
Returns
Random matrix

Definition at line 56 of file ITHACAutilities.C.

◆ rand() [2/2]

Eigen::MatrixXd ITHACAutilities::rand ( label rows,
label cols,
double min,
double max )

Generates random matrix with random values in an interval.

Parameters
[in]rowsNumber of rows
[in]colsNumber of cols
[in]minMinimum of the interval
[in]maxMaximum of the interval
Returns
the matrix
Examples
08DEIM.C, and 09DEIM_ROM.C.

Definition at line 44 of file ITHACAutilities.C.

◆ reconstructFromCoeff() [1/4]

template PtrList< GeometricField< scalar, fvPatchField, volMesh > > ITHACAutilities::reconstructFromCoeff ( PtrList< GeometricField< scalar, fvPatchField, volMesh > > & modes,
Eigen::MatrixXd & coeff_matrix,
label Nmodes )

◆ reconstructFromCoeff() [2/4]

template PtrList< GeometricField< tensor, fvPatchField, volMesh > > ITHACAutilities::reconstructFromCoeff ( PtrList< GeometricField< tensor, fvPatchField, volMesh > > & modes,
Eigen::MatrixXd & coeff_matrix,
label Nmodes )

◆ reconstructFromCoeff() [3/4]

template<class Type , template< class > class PatchField, class GeoMesh >
PtrList< GeometricField< Type, PatchField, GeoMesh > > ITHACAutilities::reconstructFromCoeff ( PtrList< GeometricField< Type, PatchField, GeoMesh > > & modes,
Eigen::MatrixXd & coeff_matrix,
label Nmodes )

Exact reconstruction using a certain number of modes for a list of fields and the projection coefficients.

Parameters
[in]modesThe modes used for reconstruction as PtrList.
[in]NmodesThe number of modes you want to use.
[in]coeff_matrixThe matrix of coefficients.
Template Parameters
Typevector or scalar.
PatchFieldfvPatchField or fvsPatchField.
GeoMeshvolMesh or surfaceMesh.
Returns
rec_field The reconstructed field as PtrList.
Examples
10UnsteadyBBEnclosed.C, and 11UnsteadyBBOpen.C.

Definition at line 31 of file ITHACAcoeffsMass.C.

◆ reconstructFromCoeff() [4/4]

template PtrList< GeometricField< vector, fvPatchField, volMesh > > ITHACAutilities::reconstructFromCoeff ( PtrList< GeometricField< vector, fvPatchField, volMesh > > & modes,
Eigen::MatrixXd & coeff_matrix,
label Nmodes )

◆ rotateMesh()

Field< vector > ITHACAutilities::rotateMesh ( fvMesh & mesh,
double r1,
double r2,
vector axis,
double alpha,
labelList movingPointsIDs,
List< double > radii,
word angleVariationMethod = "Linear",
double v = 3 )

A function that rotates the mesh rigidly, by a fixed specified angle for the points lying within a disc of radius r1, and by a an angle which diminishes from the former angle to zero either linearly or following a Sinusoidal relation or Sigmoid function in a disc of radius r2 larger than r1.

Parameters
meshThe mesh which you want to rotate rigidly
[in]r1The inner disc radius
[in]r2The outer disc radius
[in]axisThe axis of rotation
[in]alphaThe angle of rotation in degrees
[in]movingPointsIDsThe list of id's of the points to be rotated
[in]radiiThe distances of the points to be rotated to the origin of the rotation
[in]angleVariationMethodThe angle variation method either Linear or Sinusoidal or Sigmoid functions
[in]vThe tuning parameter in case of using the Sigmoid function
Returns
The vector field of the newly rotated points

Definition at line 224 of file ITHACAgeometry.C.

◆ rotatePoints()

List< vector > ITHACAutilities::rotatePoints ( const List< vector > & originalPoints,
vector AxisOfRotation,
double AngleOfRotation )

Rotate a list of points in clockwise direction given an axis of rotation and an angle in degrees.

Parameters
[in]originalPointsThe original points
[in]CentreOfRotationThe Axis Of Rotation
[in]AngleOfRotationThe angle of rotation in degrees
Returns
The Rotated Points

Definition at line 437 of file ITHACAgeometry.C.

◆ rotationMatrix()

Eigen::MatrixXd ITHACAutilities::rotationMatrix ( vector AxisOfRotation,
double AngleOfRotation )

Functions that return a Rotation Matrix given an axis of rotation and an angle in degrees.

Parameters
[in]AxisOfRotationThe axis of rotation
[in]AngleOfRotationThe angle of rotation in degrees
Returns
The rotation matrix in Eigen format

Definition at line 274 of file ITHACAgeometry.C.

◆ setBoxToValue() [1/3]

template void ITHACAutilities::setBoxToValue ( GeometricField< scalar, fvPatchField, volMesh > & field,
Eigen::MatrixXd Box,
scalar value )

◆ setBoxToValue() [2/3]

template<typename Type >
void ITHACAutilities::setBoxToValue ( GeometricField< Type, fvPatchField, volMesh > & field,
Eigen::MatrixXd Box,
Type value )

Set value of a volScalarField to a constant inside a given box.

the Box must be defined with a 2*3 Eigen::MatrixXd in the following way

\[ Box=\begin{bmatrix} x_1 & y_1 & z_1 \ \ \ x_2 & y_2 & z_2 \ \ \end{bmatrix} \]

where \( x_1, y_1, z_1 \) and \( x_2, y_2, z_2 \) are the coordinates of the two corners defining the box.

Parameters
[in]fieldThe field.
[in]BoxThe box.
[in]valueThe value you want to give to the volScalarField
Template Parameters
TypeType of field can be scalar or vector
Examples
02thermalBlock.C, and 20incrementalPOD.C.

Definition at line 606 of file ITHACAassign.C.

◆ setBoxToValue() [3/3]

template void ITHACAutilities::setBoxToValue ( GeometricField< vector, fvPatchField, volMesh > & field,
Eigen::MatrixXd Box,
vector value )

◆ setIndices2Value() [1/3]

template void ITHACAutilities::setIndices2Value ( labelList & ind2set,
List< scalar > & value2set,
labelList & movingIDS,
List< scalar > & originalList )

◆ setIndices2Value() [2/3]

template<typename Type >
void ITHACAutilities::setIndices2Value ( labelList & ind2set,
List< Type > & value2set,
labelList & movingIDS,
List< Type > & originalList )

Sets some given Indices of a list of objects to given values.

Parameters
ind2setThe indices of the list that you want to assign
value2setThe values you want to set
movingIDSThe index of the list in the original list that you want to assign
originalListThe original list
Template Parameters
TypeType of list (scalar or vector)

Definition at line 653 of file ITHACAassign.C.

◆ setIndices2Value() [3/3]

template void ITHACAutilities::setIndices2Value ( labelList & ind2set,
List< vector > & value2set,
labelList & movingIDS,
List< vector > & originalList )