38 static inline scalar
MagOp(
const Type& val)
56 bool Foam::functionObjects::fieldValues::multiFieldValue::applyOperation
58 const word& resultType,
70 Field<Type>
values(foNames.size());
73 values[i] = this->getObjectResult<Type>(foNames[i], entryNames[i]);
89 for (label i = 1; i <
values.size(); ++i)
98 for (label i = 1; i <
values.size(); ++i)
107 for (label i = 1; i <
values.size(); ++i)
131 <<
"Unable to process operation " 138 os << opName <<
flatOutput(entryNames, FlatOutput::ParenComma{});
139 const word resultName(
os.str());
140 Log <<
" " << resultName <<
" = " << result <<
endl;
virtual OFstream & file()
Return access to the file (if only 1)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static scalar MagOp(const Type &val)
Return magnitude of a given value unless the given Type is scalar.
void setResult(const word &entryName, const Type &value)
Add result.
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
constexpr char tab
The tab '\t' character(0x09)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
#define forAll(list, i)
Loop across all elements in list.
Divide first entry by values.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
word resultType(const word &entryName) const
Retrieve the result type.
Divide first entry by values componentwise.
static const Enum< operationType > operationTypeNames_
Operation type names.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
scalar MagOp< scalar >(const scalar &val)
Return self if a given Type is scalar.
errorManip< error > abort(error &err)
OBJstream os(runTime.globalPath()/outputName)
List< word > wordList
List of word.
Subtract values from first entry.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
static constexpr const zero Zero
Global zero (0)