30#ifndef ITHACAfieldsOperations_H
31#define ITHACAfieldsOperations_H
37#pragma GCC diagnostic push
38#pragma GCC diagnostic ignored "-Wold-style-cast"
40#pragma GCC diagnostic pop
41using namespace std::placeholders;
43#include "ITHACAparameters.H"
70void multField(T &f1,
const Eigen::VectorXd alphaVec);
81void multField(PtrList<T> &f1,
const Eigen::VectorXd alphaVec);
95void addFields(T& f1,
const T& f2c,
double alpha = 1.0);
115volTensorField
tensorFieldProduct(
const volScalarField& coef,
const volTensorField& S);
123volTensorField
tensorFieldProduct(
const volTensorField& coef,
const volTensorField& S);
158template<
class TypeField>
160 fields, Eigen::MatrixXd ind, PtrList<TypeField>& ave);
172template<
class TypeField>
183template<
typename Type>
185 PtrList<GeometricField<Type, fvPatchField, volMesh >>& fields);
199template<
typename Type>
200Eigen::MatrixXd getValues(GeometricField<Type, fvPatchField,
201 volMesh>& field, labelList& indices, labelList* xyz = NULL);
215template<
typename Type>
216Eigen::MatrixXd getValues(PtrList<GeometricField<Type, fvPatchField,
217 volMesh >>& field, labelList& indices, labelList* xyz = NULL);
Header file of the ITHACAassign file.
Header file of the geometry namespace.
Header file of the ITHACAstream class, it contains the implementation of several methods for input ou...
Header file of the ITHACAsystem file.
Namespace to implement some useful assign operation of OF fields.
int dimensionField(const volTensorField &v)
Return the dimension of a volTensorField.
volTensorField tensorFieldProduct(const volScalarField &coef, const volTensorField &S)
Tensor field product between a volScalarField and a volTensorField.
void multField(T &f1, double alpha)
Multiplication between a field of type vol[Scalar|Vector|Tensor]Field and a double.
TypeField computeAverage(PtrList< TypeField > &fields)
Calculates the average of a list of fields.
void normalizeFields(PtrList< GeometricField< Type, fvPatchField, volMesh > > &fields)
Normalize list of Geometric fields.
void addFields(T &f1, const T &f2c, double alpha)
Perform the following operation f1 + f2 * alpha with f1 and f2 being of type vol[Scalar|Vector|Tensor...
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 fiel...
void subtractFields(T &f1, const T &f2)
Perform the substraction (f1 - f2) between two fields of type vol[Scalar|Vector|Tensor]Field and alph...