34bool Foam::functionObjects::fieldValues::multiFieldValue::applyOperation
36 const word& resultType,
37 const wordList& foNames,
38 const wordList& entryNames
48 Field<Type>
values(foNames.size());
51 values[i] = this->getObjectResult<Type>(foNames[i], entryNames[i]);
67 for (label i = 1; i <
values.size(); ++i)
91 <<
"Unable to process operation "
98 os << opName <<
flatOutput(entryNames, FlatOutput::ParenComma{});
99 const word resultName(
os.str());
100 Log <<
" " << resultName <<
" = " << result <<
endl;
static const Enum< operationType > operationTypeNames_
Operation type names.
@ opAverage
Average value.
@ opSubtract
Subtract values from first entry.
@ opAdd
Add values (same as sum)
void setResult(const word &entryName, const Type &value)
Add result.
word resultType(const word &entryName) const
Retrieve the result type.
virtual OFstream & file()
Return access to the file (if only 1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
constexpr char tab
The tab '\t' character(0x09)
#define forAll(list, i)
Loop across all elements in list.