Short cut for swept volumes in triangular faces
This commit is contained in:
parent
174de76792
commit
b1a9712945
1 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
|
Reference in a new issue