Go to the documentation of this file.
36 void Foam::functionObjects::runTimeControls::minMaxCondition::
37 setValue<Foam::scalar>
39 const word& valueType,
40 const word& fieldName,
44 state_.getObjectResult(functionObjectName_, fieldName, value);
52 namespace functionObjects
54 namespace runTimeControls
73 { modeType::mdMin,
"minimum" },
74 { modeType::mdMax,
"maximum" },
89 functionObjectName_(
dict.get<
word>(
"functionObject")),
90 mode_(modeTypeNames_.get(
"mode",
dict)),
92 value_(
dict.get<scalar>(
"value"))
100 bool satisfied =
true;
109 const word valueType =
115 <<
"Unable to find entry " << fieldName
117 <<
". Condition will not be applied."
124 setValue<scalar>(valueType, fieldName, v);
125 setValue<vector>(valueType, fieldName, v);
126 setValue<sphericalTensor>(valueType, fieldName, v);
127 setValue<symmTensor>(valueType, fieldName, v);
128 setValue<tensor>(valueType, fieldName, v);
152 << fieldName <<
": value = " << v
153 <<
", threshold value = " <<
value_
154 <<
", satisfied = " << ok <<
endl;
156 satisfied = satisfied && ok;
defineTypeNameAndDebug(averageCondition, 0)
virtual bool apply()
Apply the condition.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Base class for run time conditions.
A class for handling words, derived from Foam::string.
bool active_
On/off switch.
addToRunTimeSelectionTable(runTimeCondition, averageCondition, dictionary)
Base class for function objects, adding functionality to read/write state information (data required ...
word functionObjectName_
Name of function object to retrueve data from.
minMaxCondition(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Constructor.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static const Enum< modeType > modeTypeNames_
virtual void write()
Write.
stateFunctionObject & state_
State.
Registry of regIOobjects.
word name(const complex &c)
Return string representation of complex.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Minimum/maximum run time conditions. If the value type is not scalar, the magnitude of the value is u...
word objectResultType(const word &objectName, const word &entryName) const
Return the type of result.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const scalar value_
Value to compare.
static const word null
An empty word.
const wordList fieldNames_
Field names.
Header files for all the primitive types that Fields are instantiated for.
#define WarningInFunction
Report a warning using Foam::Warning.