diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C index 5a593f0bf1..17948c2b24 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.C +++ b/src/OpenFOAM/meshes/meshShapes/face/face.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -676,26 +676,29 @@ Foam::scalar Foam::face::sweptVol const pointField& newPoints ) const { - if (size() == 3) - { - return - ( - triPointRef - ( - oldPoints[operator[](0)], - oldPoints[operator[](1)], - oldPoints[operator[](2)] - ).sweptVol - ( - triPointRef - ( - newPoints[operator[](0)], - newPoints[operator[](1)], - newPoints[operator[](2)] - ) - ) - ); - } + // This Optimization causes a small discrepancy between the swept-volume of + // opposite faces of complex cells with triangular faces opposing polygons. + // It could be used without problem for tetrahedral cells + // if (size() == 3) + // { + // return + // ( + // triPointRef + // ( + // oldPoints[operator[](0)], + // oldPoints[operator[](1)], + // oldPoints[operator[](2)] + // ).sweptVol + // ( + // triPointRef + // ( + // newPoints[operator[](0)], + // newPoints[operator[](1)], + // newPoints[operator[](2)] + // ) + // ) + // ); + // } scalar sv = 0; @@ -708,39 +711,40 @@ Foam::scalar Foam::face::sweptVol label nPoints = size(); - point nextOldPoint = centreOldPoint; - point nextNewPoint = centreNewPoint; - - for (register label pI = 0; pI < nPoints; ++pI) + for (register label pi=0; pi