36 namespace functionObjects
111 internalField_(true),
131 dict.readIfPresent<
bool>(
"internalField", internalField_);
133 threshold_ =
dict.get<scalar>(
"threshold");
135 dict.readIfPresent<
vector>(
"referencePosition", C0_);
153 !isA<processorPolyPatch>(
pp)
154 && !isA<emptyPolyPatch>(
pp)
157 patchSet.insert(patchi);
161 patchIDs_ = patchSet.sortedToc();
164 if (!internalField_ && patchIDs_.empty())
167 <<
"No internal field or patches selected - no field extent " 168 <<
"information will be generated" <<
endl;
171 fieldSet_.read(
dict);
188 writeFileHeader(file());
192 for (
const word& fieldName : fieldSet_.selectionNames())
194 calcFieldExtents<scalar>(fieldName,
true);
195 calcFieldExtents<vector>(fieldName);
196 calcFieldExtents<sphericalTensor>(fieldName);
197 calcFieldExtents<symmTensor>(fieldName);
198 calcFieldExtents<tensor>(fieldName);
const polyBoundaryMesh & pbm
defineTypeNameAndDebug(ObukhovLength, 0)
Computes the spatial minimum and maximum extents of an input field.
labelList patchIDs_
Patches to assess.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void writeBreak(Ostream &os) const
Write a break marker to the stream.
const word & name() const noexcept
Return the object name.
tmp< volScalarField > calcMask(const GeometricField< Type, fvPatchField, volMesh > &field) const
Return the field mask.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
wordList selectionNames() const
Return the current field selection, in sorted order.
point C0_
Reference position.
bool writtenHeader_
Flag to identify whether the header has been written.
Abstract base-class for Time/database function objects.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
scalar threshold_
Threshold value.
#define forAll(list, i)
Loop across all elements in list.
dimensionedScalar pos(const dimensionedScalar &ds)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
virtual bool write()
Write the fieldExtents.
virtual void writeFileHeader(Ostream &os)
Output file header information.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
wordList patchNames(nPatches)
A List of wordRe with additional matching capabilities.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Write a (commented) header property and value pair.
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)
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
virtual bool read(const dictionary &dict)
Read.
volFieldSelection fieldSet_
Fields to assess.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual bool updateSelection()
Update the selection using current contents of obr_.
virtual bool read(const dictionary &)
Read the field extents data.
virtual bool read(const dictionary &dict)
Read optional controls.
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
bool internalField_
Flag to write the internal field extents.
virtual bool execute()
Execute, currently does nothing.
A class for managing temporary objects.
A patch is a list of labels that address the faces in the global face list.
Base class for writing single files from the function objects.
const fvMesh & mesh_
Reference to the fvMesh.
fieldExtents(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static constexpr const zero Zero
Global zero (0)
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.