diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C index f99521f5e..4dda71073 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/face.C +++ b/src/OpenFOAM/meshes/meshShapes/face/face.C @@ -641,6 +641,29 @@ Foam::scalar Foam::face::sweptVol const pointField& newPoints ) const { + // For a triangle do the swept volume directly. + // Sandeep Menon, 19/Oct/2011 + 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; // Calculate the swept volume by breaking the face into triangles and