Added inline function for centroid

This commit is contained in:
Hrvoje Jasak 2010-12-27 11:47:20 +00:00
parent c9f26f66ff
commit b2dfd709ec
2 changed files with 10 additions and 0 deletions

View file

@ -138,6 +138,9 @@ public:
//- Return volume
inline scalar mag() const;
//- Return centre
inline vector centre() const;
//- Return circum-centre
inline vector circumCentre() const;

View file

@ -133,6 +133,13 @@ inline scalar tetrahedron<Point, PointRef>::mag() const
}
template<class Point, class PointRef>
inline vector tetrahedron<Point, PointRef>::centre() const
{
return 0.25*(a_ + b_ + c_ + d_);
}
template<class Point, class PointRef>
inline vector tetrahedron<Point, PointRef>::circumCentre() const
{