37 namespace functionObjects
50 { modeType::mdMag,
"magnitude" },
51 { modeType::mdCmpt,
"component" },
135 location_ =
dict.getOrDefault(
"location",
true);
137 mode_ = modeTypeNames_.getOrDefault(
"mode",
dict, modeType::mdMag);
139 fieldSet_.read(
dict);
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;
virtual bool write()
Write the fieldMinMax.
virtual OFstream & file()
Return access to the file (if only 1)
defineTypeNameAndDebug(ObukhovLength, 0)
virtual bool execute()
Execute, currently does nothing.
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.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static const Enum< modeType > modeTypeNames_
Mode type names.
static bool & parRun() noexcept
Test if this a parallel run.
virtual void writeFileHeader(Ostream &os)
Output file header information.
volFieldSelection fieldSet_
Fields to assess min/max.
fieldMinMax(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
bool writtenHeader_
Flag to identify whether the header has been written.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
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.
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
virtual bool read(const dictionary &)
Read the field min/max data.
wordHashSet selectionNames() const
Return the current field selection.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Header files for all the primitive types that Fields are instantiated for.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
bool location_
Flag to write location of min/max values.
virtual bool read(const dictionary &dict)
Read.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
virtual bool updateSelection()
Update the selection using current contents of obr_.
virtual bool read(const dictionary &dict)
Read optional controls.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
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.