51 { modeType::mdCmpt,
"component" },
96 for (
const word& fieldName :
fieldSet_.selectionNames())
135 location_ =
dict.getOrDefault(
"location",
true);
137 mode_ = modeTypeNames_.getOrDefault(
"mode",
dict, modeType::mdMag);
153 writeFileHeader(file());
155 if (!location_) writeCurrentTime(file());
158 for (
const word& fieldName : fieldSet_.selectionNames())
160 calcMinMaxFields<scalar>(fieldName, mdCmpt);
161 calcMinMaxFields<vector>(fieldName, mode_);
162 calcMinMaxFields<sphericalTensor>(fieldName, mode_);
163 calcMinMaxFields<symmTensor>(fieldName, mode_);
164 calcMinMaxFields<tensor>(fieldName, mode_);
167 if (!location_) file()<<
endl;
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
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.
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static bool & parRun() noexcept
Test if this a parallel run.
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 values and locations of field minima and maxima. These are good indicators of calculatio...
volFieldSelection fieldSet_
Fields to assess min/max.
bool location_
Flag to write location of min/max values.
modeType mode_
Mode for min/max - only applicable for ranks > 0.
fieldMinMax(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
void calcMinMaxFields(const word &fieldName, const modeType &mode)
Calculate the field min/max.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
static const Enum< modeType > modeTypeNames_
Mode type names.
modeType
Options for the mode types.
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.
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.
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.
virtual void writeCurrentTime(Ostream &os) const
Write the current time to stream.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
bool read(const char *buf, int32_t &val)
Same as readInt32.
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.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
constexpr char nl
The newline '\n' character (0x0a).