66 for (
const word& fieldName :
fieldSet_.selectionNames())
74 const word& patchName =
mesh_.boundaryMesh()[patchi].name();
111 internalField_(true),
131 dict.readIfPresent<
bool>(
"internalField", internalField_);
133 threshold_ =
dict.get<scalar>(
"threshold");
135 dict.readIfPresent<
vector>(
"referencePosition", C0_);
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);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const polyBoundaryMesh & pbm
Generic GeometricField class.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
virtual bool read(const dictionary &dict)
Read and set the function object if its data have changed.
Computes the spatial minimum and maximum extents of an input field.
volFieldSelection fieldSet_
Fields to assess.
scalar threshold_
Threshold value.
void calcFieldExtents(const word &fieldName, const bool calcMag=false)
Main calculation.
fieldExtents(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
bool internalField_
Flag to write the internal field extents.
tmp< volScalarField > calcMask(const GeometricField< Type, fvPatchField, volMesh > &field) const
Return the field mask.
point C0_
Reference position.
virtual void writeFileHeader(Ostream &os)
Output file header information.
virtual bool execute()
Execute the function-object operations.
virtual bool write()
Write the function-object results.
labelList patchIDs_
Patches to assess.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
virtual bool updateSelection()
Update the selection using current contents of obr_.
Base class for writing single files from the function objects.
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
void writeHeaderValue(Ostream &os, const string &property, const Type &value) const
Write a (commented) header property and value pair.
writeFile(const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true, const string &ext=".dat")
Construct from objectRegistry, prefix, fileName.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual bool read(const dictionary &dict)
Read.
virtual void writeBreak(Ostream &os) const
Write a break marker to the stream.
bool writtenHeader_
Flag to identify whether the header has been written.
virtual OFstream & file()
Return access to the file (if only 1).
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
A patch is a list of labels that address the faces in the global face list.
A class for managing temporary objects.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
dimensionedScalar pos(const dimensionedScalar &ds)
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
static constexpr const zero Zero
Global zero (0).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
constexpr char nl
The newline '\n' character (0x0a).
wordList patchNames(nPatches)
#define forAll(list, i)
Loop across all elements in list.