diff --git a/src/functionObjects/field/fieldStatistics/fieldStatistics.C b/src/functionObjects/field/fieldStatistics/fieldStatistics.C index 8f9b37d960..ba9bbccbe4 100644 --- a/src/functionObjects/field/fieldStatistics/fieldStatistics.C +++ b/src/functionObjects/field/fieldStatistics/fieldStatistics.C @@ -128,9 +128,9 @@ void Foam::functionObjects::fieldStatistics::writeFileHeader writeHeader(os, word("Field Statistics: " + fieldName)); writeCommented(os, "Time"); - // Number of input statistics (i.e., statistics_) could be lesser than that - // of output statistics (i.e., results_; e.g., cell index of min value). - // Therefore, the output file columns are based on output statistics. + // Number of input statistics (i.e., statistics_) should be the same with + // that of output statistics (i.e., results_). However, for consistency, + // the output file columns are based on output statistics. const auto& result = results_(fieldName); for (const auto& iter : result.csorted()) @@ -359,7 +359,7 @@ bool Foam::functionObjects::fieldStatistics::read(const dictionary& dict) statistics_.insert(m, createStatistic(m, mode_)); } - // Reset and reprepare the output statistics + // Reset the output-statistics container results_.clear(); // Reset and reprepare the output statistics diff --git a/src/functionObjects/field/fieldStatistics/fieldStatistics.H b/src/functionObjects/field/fieldStatistics/fieldStatistics.H index 14531671e8..3c8bdf1319 100644 --- a/src/functionObjects/field/fieldStatistics/fieldStatistics.H +++ b/src/functionObjects/field/fieldStatistics/fieldStatistics.H @@ -31,15 +31,18 @@ Group grpFieldFunctionObjects Description + Calculates various statistics of the specified fields. Operands: \table - Operand | Type | Location - input | - | - - output file | dat | \/postProcessing/\/\/\ - output field | - | - + Operand | Type | Location + input | vol\Field(s) | Registry + output file | dat | \/postProcessing/\/\/\ + output field | - | - \endtable + where \c \=Scalar/Vector/SymmTensor/Tensor. + Usage Minimal example by using \c system/controlDict.functions: \verbatim @@ -53,9 +56,9 @@ Usage // Optional entries mode ; - internal ; mean ; extrema ; + internal ; // Inherited entries ... @@ -70,10 +73,10 @@ Usage fields | List of operand fields | wordList | yes | - statistics | List of operand statistics | wordList | yes | - mode | Output format of the statistical results | word | no | magnitude + mean | Type of the mean operation | word | no | arithmetic internal | Flag to use internal fields only in computing statistics | bool | no | false - mean | Type of the mean operation | word | no | arithmetic - extrema | Flag to enable extrema metadata calculations | bool | no | false + extrema | Flag to enable extrema data calculations | bool | no | false \endtable Available statistics of the operand field through the \c statistics entry: @@ -180,7 +183,7 @@ class fieldStatistics //- Name of the statistic word name_; - //- Calculate the value of the specified statistic + //- Return the value of the specified statistic std::function calc; };