Commit 05cb29de authored by henry's avatar henry
Browse files

Added corrections for complex mesh-motion from Frank Boss

parent c8180a91
......@@ -632,9 +632,8 @@ Foam::scalar Foam::face::sweptVol
// summing their swept volumes.
// Changed to deal with small concavity by using a central decomposition
point centreOldPoint = Foam::average(points(oldPoints));
point centreNewPoint = Foam::average(points(newPoints));
point centreOldPoint = centre(oldPoints);
point centreNewPoint = centre(newPoints);
label nPoints = size();
......
......@@ -318,11 +318,15 @@ inline scalar triangle<Point, PointRef>::quality() const
template<class Point, class PointRef>
inline scalar triangle<Point, PointRef>::sweptVol(const triangle& t) const
{
return (1.0/6.0)*
return (1.0/12.0)*
(
((t.a_ - a_) & ((b_ - a_)^(c_ - a_)))
+ ((t.b_ - b_) & ((c_ - b_)^(t.a_ - b_)))
+ ((c_ - t.c_) & ((t.b_ - t.c_)^(t.a_ - t.c_)))
+ ((t.a_ - a_) & ((b_ - a_)^(c_ - a_)))
+ ((b_ - t.b_) & ((t.a_ - t.b_)^(t.c_ - t.b_)))
+ ((c_ - t.c_) & ((b_ - t.c_)^(t.a_ - t.c_)))
);
}
......
Markdown is supported
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