Added inline function for centroid
This commit is contained in:
parent
c9f26f66ff
commit
b2dfd709ec
2 changed files with 10 additions and 0 deletions
|
@ -138,6 +138,9 @@ public:
|
||||||
//- Return volume
|
//- Return volume
|
||||||
inline scalar mag() const;
|
inline scalar mag() const;
|
||||||
|
|
||||||
|
//- Return centre
|
||||||
|
inline vector centre() const;
|
||||||
|
|
||||||
//- Return circum-centre
|
//- Return circum-centre
|
||||||
inline vector circumCentre() const;
|
inline vector circumCentre() const;
|
||||||
|
|
||||||
|
|
|
@ -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>
|
template<class Point, class PointRef>
|
||||||
inline vector tetrahedron<Point, PointRef>::circumCentre() const
|
inline vector tetrahedron<Point, PointRef>::circumCentre() const
|
||||||
{
|
{
|
||||||
|
|
Reference in a new issue