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" },
88 runTimeCondition(
name, obr,
dict, state),
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)
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.
addToRunTimeSelectionTable(runTimeCondition, averageCondition, dictionary)
Base class for function objects, adding functionality to read/write state information (data required ...
minMaxCondition(const word &name, const objectRegistry &obr, const dictionary &dict, stateFunctionObject &state)
Ostream & endl(Ostream &os)
static const Enum< modeType > modeTypeNames_
stateFunctionObject & state_
Registry of regIOobjects.
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
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
fileName::Type type(const fileName &name, const bool followLink=true)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
word name(const expressions::valueTypeCode typeCode)
const wordList fieldNames_
Header files for all the primitive types that Fields are instantiated for.
#define WarningInFunction