Commit 5062c50e authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: surfaceNoise - using mean for surface average

parent a0b598a5
......@@ -297,13 +297,13 @@ Foam::scalar surfaceNoise::writeSurfaceData
);
// TODO: Move faceAreas to demand-driven function in MeshedSurface
scalarField faceAreas(surf.faces().size());
forAll(faceAreas, i)
{
faceAreas[i] = surf.faces()[i].mag(surf.points());
}
// areaAverage = sum(allData*faceAreas)/sum(faceAreas);
// scalarField faceAreas(surf.faces().size());
// forAll(faceAreas, i)
// {
// faceAreas[i] = surf.faces()[i].mag(surf.points());
// }
//
// areaAverage = sum(allData*faceAreas)/sum(faceAreas);
areaAverage = sum(allData)/allData.size();
}
Pstream::scatter(areaAverage);
......@@ -326,13 +326,13 @@ Foam::scalar surfaceNoise::writeSurfaceData
);
// TODO: Move faceAreas to demand-driven function in MeshedSurface
scalarField faceAreas(surf.faces().size());
forAll(faceAreas, i)
{
faceAreas[i] = surf.faces()[i].mag(surf.points());
}
// return sum(data*faceAreas)/sum(faceAreas);
// scalarField faceAreas(surf.faces().size());
// forAll(faceAreas, i)
// {
// faceAreas[i] = surf.faces()[i].mag(surf.points());
// }
//
// return sum(data*faceAreas)/sum(faceAreas);
return sum(data)/data.size();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment