33 Type Foam::functionObjects::fieldValues::fieldValueDelta::applyOperation
45 result = value1 + value2;
50 result = value1 - value2;
55 result =
min(value1, value2);
60 result =
max(value1, value2);
65 result = 0.5*(value1 + value2);
71 <<
"Unable to process operation "
82 void Foam::functionObjects::fieldValues::fieldValueDelta::processFields
87 const wordList fields1 = region1Ptr_->fields();
89 const dictionary& results1 = region1Ptr_->resultDict();
90 const dictionary& results2 = region2Ptr_->resultDict();
97 const word& fieldName = fields1[i];
102 obr_.foundObject<VolField<Type>>(fieldName)
103 || obr_.foundObject<SurfaceField<Type>>(fieldName)
105 && results2.found(fieldName)
108 results1.lookup(fieldName) >> r1;
109 results2.lookup(fieldName) >> r2;
111 Type result = applyOperation(r1, r2);
113 Log <<
" " << operationTypeNames_[operation_]
114 <<
"(" << 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)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)