SQUASH: simplify the weighted average routine
This commit is contained in:
parent
188bce8c38
commit
d5764cee62
@ -121,8 +121,7 @@ T Foam::functionObjects::fieldStatistics::calcMean(const Field<T>& field)
|
||||
{
|
||||
if (internal_ && (mean_ == VOLUMETRIC))
|
||||
{
|
||||
const Field<scalar>& V = mesh_.V();
|
||||
return (gSum(V*field)/gSum(V));
|
||||
return gWeightedAverage(mesh_.V(), field);
|
||||
}
|
||||
|
||||
return gAverage(field);
|
||||
|
Loading…
Reference in New Issue
Block a user