111 #ifndef functionObjects_fieldStatistics_H 112 #define functionObjects_fieldStatistics_H 117 #include <functional> 124 namespace functionObjects
131 class fieldStatistics
133 public fvMeshFunctionObject,
139 enum class modeType : char
146 static const Enum<modeType> modeTypeNames_;
149 enum class meanType : char
156 static const Enum<meanType> meanTypeNames_;
159 enum class calcType : char
169 static const Enum<calcType> calcTypeNames_;
175 using variantInput = std::variant
185 using variantOutput = std::variant
201 std::function<variantOutput(variantInput)> calc;
208 variantOutput value_;
236 volFieldSelection fieldSet_;
257 statistic createStatistic(
const word& statName,
const modeType
mode);
261 bool calcStat(
const word& fieldName);
288 template<
class GeoField>
290 flatten(
const GeoField&
field)
const;
293 template<
class GeoField>
300 void writeStatData();
306 void writeExtremaFileHeader(
Ostream&
os,
const word& fieldName);
309 void writeExtremaData();
312 void logExtremaData();
354 virtual bool write();
Field< sphericalTensor > sphericalTensorField
Specialisation of Field<T> for sphericalTensor.
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
virtual ~fieldStatistics()=default
Destructor.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const word & name() const noexcept
Return the name of this functionObject.
void operator=(const fieldStatistics &)=delete
No copy assignment.
An ordered pair of two objects of type <T> with first() and second() elements.
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual bool write()
Write function object results.
virtual bool execute()
Execute function object.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
TypeName("fieldStatistics")
Runtime type information.
virtual bool read(const dictionary &)
Read function object settings.
Field< vector > vectorField
Specialisation of Field<T> for vector.
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.
A class for managing temporary objects.
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
fieldStatistics(const fieldStatistics &)=delete
No copy construct.