36namespace functionObjects
49 { limitType::MIN,
"min" },
50 { limitType::MAX,
"max" },
51 { limitType::BOTH,
"both" },
68 auto&
field = *fieldPtr;
113 limit_ = limitTypeNames_.get(
"limit",
dict);
117 min_ =
dict.get<scalar>(
"min");
118 Info<<
" Imposing lower limit " << min_ <<
nl;
123 max_ =
dict.get<scalar>(
"max");
124 Info<<
" Imposing upper limit " << max_ <<
nl;
127 fieldSet_.read(
dict);
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();
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...
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.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Limits input fields to user-specified min and max bounds.
@ MIN
limit by minimum value
@ MAX
limit by maximum value
scalar min_
Minimum limit.
limitType limit_
Limiting type.
bool limitScalarField(const word &fieldName)
Limit a scalar field.
static const Enum< limitType > limitTypeNames_
Limit type names.
virtual bool read(const dictionary &dict)
Read the field min/max data.
scalar max_
Maximum limit.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write the limitFields.
const objectRegistry & obr_
Reference to the region objectRegistry.
Type * getObjectPtr(const word &name, const bool recursive=false) const
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Header files for all the primitive types that Fields are instantiated for.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
messageStream Info
Information stream (stdout output on master, null elsewhere)
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.
Type gMin(const FieldField< Field, Type > &f)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Type gMax(const FieldField< Field, Type > &f)
constexpr char nl
The newline '\n' character (0x0a)