42 #ifndef Foam_tetrahedron_H 43 #define Foam_tetrahedron_H 63 template<
class Po
int,
class Po
intRef>
class tetrahedron;
65 template<
class Po
int,
class Po
intRef>
68 template<
class Po
int,
class Po
intRef>
69 inline Ostream& operator<<(Ostream&, const tetrahedron<Point, PointRef>&);
95 void front() =
delete;
170 template<
class Po
int,
class Po
intRef>
222 PointRef a_, b_, c_, d_;
227 inline static point planeIntersection
235 template<
class TetOp>
236 inline static void decomposePrism
242 template<
class AboveTetOp,
class BelowTetOp>
243 inline static void tetSliceWithPlane
338 inline scalar
mag()
const;
383 template<
class AboveTetOp,
class BelowTetOp>
431 friend Ostream& operator<< <Point, PointRef>
treeBoundBox bounds() const
The bounding box for the tetrahedron.
const Point & c() const noexcept
Return vertex c.
void operator()(const tetPoints &)
Pair< Point > box() const
The enclosing (bounding) box for the tetrahedron.
pointHit containmentSphere(const scalar tol) const
Return (min)containment sphere, i.e. the smallest sphere with.
void operator()(const tetPoints &)
A 1D vector of objects of type <T> with a fixed length <N>.
scalar circumRadius() const
Return circum-radius.
Point circumCentre() const
Return circum-centre.
tetrahedron(const Point &p0, const Point &p1, const Point &p2, const Point &p3)
Construct from four points.
tetrahedron< point, const point & > tetPointRef
A tetrahedron using referred points.
tetPointRef tet() const
Return as tetrahedron reference.
vector Sd() const
Face area normal for side d.
const point & a() const noexcept
The first vertex.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void gradNiSquared(scalarField &buffer) const
Fill buffer with shape function products.
void operator()(const tetPoints &)
storeOp(tetIntersectionList &, label &)
tetPoints()=default
Default construct.
const point & c() const noexcept
The third vertex.
FixedList< tetPoints, 200 > tetIntersectionList
Storage type for tets originating from intersecting tets.
Geometric class that creates a 3D plane and can return the intersection point between a line and the ...
Point barycentricToPoint(const barycentric &bary) const
Calculate the point from the given barycentric coordinates.
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
void tetOverlap(const tetrahedron< Point, PointRef > &tetB, tetIntersectionList &insideTets, label &nInside, tetIntersectionList &outsideTets, label &nOutside) const
Decompose tet into tets inside and outside other tet.
const Point & a() const noexcept
Return vertex a.
scalar quality() const
Return quality: Ratio of tetrahedron and circum-sphere volume, scaled so that a regular tetrahedron h...
Istream & operator>>(Istream &, directionInfo &)
void gradNiGradNi(tensorField &buffer) const
vector Sb() const
Face area normal for side b.
scalar mag() const
Return volume.
vector Sa() const
Face area normal for side a.
Describes the interaction of a object and a (templated) point. It carries the info of a successful hi...
Point centre() const
Return centre (centroid)
bool inside(const point &pt) const
Return true if point is inside tetrahedron.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Pair< point > box() const
The enclosing (bounding) box for the tetrahedron.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const Point & b() const noexcept
Return vertex b.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void back()=delete
The back() accessor (from FixedList) has no purpose.
void sliceWithPlane(const plane &pl, AboveTetOp &aboveOp, BelowTetOp &belowOp) const
Decompose tet into tets above and below plane.
const point & b() const noexcept
The second vertex.
triPointRef tri(const label facei) const
Return i-th face.
barycentric pointToBarycentric(const point &pt) const
Calculate the barycentric coordinates from the given point.
Tet point storage. Default constructable (tetrahedron is not)
void gradNiGradNj(tensorField &buffer) const
pointHit nearestPoint(const point &p) const
Return nearest point to p on tetrahedron. Is p itself.
triangle< point, const point & > triPointRef
A triangle using referred points.
const Point & d() const noexcept
Return vertex d.
treeBoundBox bounds() const
The bounding box for the tetrahedron.
Standard boundBox with extra functionality for use in octree.
Point point_type
The point type.
void gradNiDotGradNj(scalarField &buffer) const
Point randomPoint(Random &rndGen) const
Return a random point in the tetrahedron from a uniform distribution.
vector Sc() const
Face area normal for side c.
const point & d() const noexcept
The fourth vertex.
void flip()
Invert tetrahedron by swapping third and fourth vertices.
const volScalarField & p0
void front()=delete
The front() accessor (from FixedList) has no purpose.