mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Revert "BUG: Contuation from commit ca0799cbc7 - updated cellSource"
This reverts commit b8c2cbaaec.
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -72,32 +72,32 @@ Type Foam::fieldValues::cellSource::processValues
|
|||||||
{
|
{
|
||||||
case opSum:
|
case opSum:
|
||||||
{
|
{
|
||||||
result = gSum(values);
|
result = sum(values);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case opVolAverage:
|
case opVolAverage:
|
||||||
{
|
{
|
||||||
result = gSum(values*V)/gSum(V);
|
result = sum(values*V)/sum(V);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case opVolIntegrate:
|
case opVolIntegrate:
|
||||||
{
|
{
|
||||||
result = gSum(values*V);
|
result = sum(values*V);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case opWeightedAverage:
|
case opWeightedAverage:
|
||||||
{
|
{
|
||||||
result = gSum(values*weightField)/gSum(weightField);
|
result = sum(values*weightField)/sum(weightField);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case opMin:
|
case opMin:
|
||||||
{
|
{
|
||||||
result = gMin(values);
|
result = min(values);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case opMax:
|
case opMax:
|
||||||
{
|
{
|
||||||
result = gMax(values);
|
result = max(values);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -128,10 +128,10 @@ bool Foam::fieldValues::cellSource::writeValues(const word& fieldName)
|
|||||||
combineFields(setFieldValues<scalar>(weightFieldName_))
|
combineFields(setFieldValues<scalar>(weightFieldName_))
|
||||||
);
|
);
|
||||||
|
|
||||||
Type result = processValues(values, V, weightField);
|
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
Type result = processValues(values, V, weightField);
|
||||||
|
|
||||||
if (valueOutput_)
|
if (valueOutput_)
|
||||||
{
|
{
|
||||||
IOField<Type>
|
IOField<Type>
|
||||||
|
|||||||
@ -158,10 +158,11 @@ bool Foam::fieldValues::faceSource::writeValues(const word& fieldName)
|
|||||||
magSf = combineFields(magSf);
|
magSf = combineFields(magSf);
|
||||||
weightField = combineFields(weightField);
|
weightField = combineFields(weightField);
|
||||||
|
|
||||||
Type result = processValues(values, magSf, weightField);
|
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
|
Type result = processValues(values, magSf, weightField);
|
||||||
|
|
||||||
if (valueOutput_)
|
if (valueOutput_)
|
||||||
{
|
{
|
||||||
IOField<Type>
|
IOField<Type>
|
||||||
|
|||||||
Reference in New Issue
Block a user