Go to the documentation of this file.
36 namespace functionObjects
49 { limitType::MIN,
"min" },
50 { limitType::MAX,
"max" },
51 { limitType::BOTH,
"both" },
68 auto&
field = *fieldPtr;
118 Info<<
" Imposing lower limit " <<
min_ <<
nl;
124 Info<<
" Imposing upper limit " <<
max_ <<
nl;
140 fieldSet_.updateSelection();
145 for (
const word& fieldName : fieldSet_.selectionNames())
149 limitScalarField(fieldName)
150 || limitField<vector>(fieldName)
151 || limitField<sphericalTensor>(fieldName)
152 || limitField<symmTensor>(fieldName)
153 || limitField<tensor>(fieldName)
162 Log <<
" - limited " <<
count <<
'/'
163 << fieldSet_.selectionNames().size() <<
" fields";
174 for (
const word& fieldName : fieldSet_.selectionNames())
176 lookupObject<regIOobject>(fieldName).write();
int debug
Static debugging option.
scalar max_
Maximum limit.
bool limitScalarField(const word &fieldName)
Limit a scalar field.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
static const Enum< limitType > limitTypeNames_
Limit type names.
limitFields(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
EnumType get(const word &enumName) const
The enumeration corresponding to the given name.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
volFieldSelection fieldSet_
Fields to limit.
virtual bool read(const dictionary &dict)
Read the field min/max data.
limitType limit_
Limiting type.
virtual bool write()
Write the limitFields.
messageStream Info
Information stream (stdout output on master, null elsewhere)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual bool execute()
Execute, currently does nothing.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
Macros for easy insertion into run-time selection tables.
const word & name() const noexcept
Return the name of this functionObject.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
virtual const word & type() const =0
Runtime type information.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
defineTypeNameAndDebug(ObukhovLength, 0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Type gMin(const FieldField< Field, Type > &f)
scalar min_
Minimum limit.
virtual bool read(const dictionary &dict)
Read the fieldSelection data from dictionary.
Header files for all the primitive types that Fields are instantiated for.
Type gMax(const FieldField< Field, Type > &f)