31 Type Foam::functionObjects::fieldValues::fieldValueDelta::applyOperation
43 result = value1 + value2;
48 result = value1 - value2;
53 result =
min(value1, value2);
58 result =
max(value1, value2);
63 result = 0.5*(value1 + value2);
69 <<
"Unable to process operation "
80 void Foam::functionObjects::fieldValues::fieldValueDelta::processFields
85 const wordList fields1 = region1Ptr_->fields();
87 const dictionary& results1 = region1Ptr_->resultDict();
88 const dictionary& results2 = region2Ptr_->resultDict();
95 const word& fieldName = fields1[i];
100 obr_.foundObject<VolField<Type>>(fieldName)
101 || obr_.foundObject<SurfaceField<Type>>(fieldName)
103 && results2.found(fieldName)
106 results1.lookup(fieldName) >> r1;
107 results2.lookup(fieldName) >> r2;
109 Type result = applyOperation(r1, r2);
111 Log <<
" " << operationTypeNames_[operation_]
112 <<
"(" << fieldName <<
") = " << result
#define forAll(list, i)
Loop across all elements in list.
static bool master(const label communicator=0)
Am I the master process.
static const NamedEnum< operationType, 5 > operationTypeNames_
Operation type names.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define Log
Report write to Foam::Info if the local log switch is true.
List< word > wordList
A List of words.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)