face: add special treatment for the sweptVol of a triangular face

This commit is contained in:
Henry 2011-10-26 14:35:34 +01:00
parent 0d9fdfc5c3
commit 721da9c038

View File

@ -655,6 +655,27 @@ Foam::scalar Foam::face::sweptVol
const pointField& newPoints const pointField& newPoints
) const ) 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)]
)
)
);
}
scalar sv = 0; scalar sv = 0;
// Calculate the swept volume by breaking the face into triangles and // Calculate the swept volume by breaking the face into triangles and