Go to the documentation of this file.
32 void Foam::functionObjects::fieldValues::fieldValueDelta::applyOperation
34 const word& resultType,
37 const word& entryName1,
38 const word& entryName2,
49 Type value1 = this->getObjectResult<Type>(name1, entryName1);
50 Type value2 = this->getObjectResult<Type>(name2, entryName2);
58 result = value1 + value2;
63 result = value1 - value2;
68 result =
min(value1, value2);
73 result =
max(value1, value2);
78 result = 0.5*(value1 + value2);
84 <<
"Unable to process operation "
90 const word resultName(opName +
'(' + entryName1 +
',' + entryName2 +
')');
92 Log <<
" " << resultName <<
" = " << result <<
endl;
virtual OFstream & file()
Return access to the file (if only 1)
static constexpr const zero Zero
Global zero (0)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word resultType(const word &entryName) const
Retrieve the result type.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void setResult(const word &entryName, const Type &value)
Add result.
static const Enum< operationType > operationTypeNames_
Operation type names.