37namespace 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;
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,...
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
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.
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.
static const Enum< modeType > modeTypeNames_
Mode type names.
virtual void writeFileHeader(Ostream &os)
Output file header information.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write the fieldMinMax.
virtual bool read(const dictionary &)
Read the field min/max data.
wordHashSet selectionNames() const
Return the current field selection.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
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.
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.
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 class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
OBJstream os(runTime.globalPath()/outputName)
Header files for all the primitive types that Fields are instantiated for.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)