Go to the documentation of this file.
35 namespace functionObjects
110 internalField_(
true),
129 dict.readIfPresent<
bool>(
"internalField", internalField_);
131 threshold_ =
dict.get<scalar>(
"threshold");
133 dict.readIfPresent<
vector>(
"referencePosition", C0_);
152 if (!isA<processorPolyPatch>(pp) && !isA<emptyPolyPatch>(pp))
154 patchIDs_.insert(patchi);
159 if (!internalField_ && patchIDs_.empty())
162 <<
"No internal field or patches selected - no field extent "
163 <<
"information will be generated" <<
endl;
166 fieldSet_.read(
dict);
183 writeFileHeader(file());
187 for (
const word& fieldName : fieldSet_.selectionNames())
189 calcFieldExtents<scalar>(fieldName,
true);
190 calcFieldExtents<vector>(fieldName);
191 calcFieldExtents<sphericalTensor>(fieldName);
192 calcFieldExtents<symmTensor>(fieldName);
193 calcFieldExtents<tensor>(fieldName);
labelHashSet patchIDs_
Patches to assess.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
tmp< volScalarField > calcMask(const GeometricField< Type, fvPatchField, volMesh > &field) const
Return the field mask.
A class for handling words, derived from Foam::string.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
bool writtenHeader_
Flag to identify whether the header has been written.
A class for managing temporary objects.
static constexpr const zero Zero
Global zero (0)
bool read(const char *buf, int32_t &val)
Same as readInt32.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
volFieldSelection fieldSet_
Fields to assess.
virtual bool execute()
Execute, currently does nothing.
wordHashSet selectionNames() const
Return the current field selection.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Write a (commented) header property and value pair.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
#define forAll(list, i)
Loop across all elements in list.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual void writeBreak(Ostream &os) const
Write a break marker to the stream.
virtual bool read(const dictionary &dict)
Read.
A patch is a list of labels that address the faces in the global face list.
bool internalField_
Flag to write the internal field extents.
point C0_
Reference position.
virtual void writeFileHeader(Ostream &os)
Output file header information.
virtual bool updateSelection()
Update the selection using current contents of obr_.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
wordList patchNames(nPatches)
fieldExtents(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
scalar threshold_
Threshold value.
virtual bool read(const dictionary &dict)
Read optional controls.
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
const word & name() const noexcept
Return name.
virtual bool read(const dictionary &)
Read the field extents data.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
labelList indices(const wordRe &matcher, const bool useGroups=true) const
Return (sorted) patch indices for all matches.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const fvMesh & mesh_
Reference to the fvMesh.
A List of wordRe with additional matching capabilities.
defineTypeNameAndDebug(ObukhovLength, 0)
virtual bool write()
Write the fieldExtents.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Base class for writing single files from the function objects.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
dimensionedScalar pos(const dimensionedScalar &ds)