38#ifndef tetOverlapVolume_H
39#define tetOverlapVolume_H
72 inline void operator()(
const tetPoints& tet)
75 scalar tetVol = t.
mag();
76 vol_.
first() += tetVol;
86 const scalar threshold_;
90 inline hasOverlapOp(
const scalar threshold)
92 threshold_(threshold),
100 tetTetOverlap<tetPointRef::sumVolOp>(
A,
B, iop_);
101 ok_ = (iop_.
vol_ > threshold_);
113 inline sumOverlapOp()
121 tetTetOverlap<tetPointRef::sumVolOp>(
A,
B, iop_);
127 class sumOverlapMomentOp
133 inline sumOverlapMomentOp()
141 tetTetOverlap<sumMomentOp>(
A,
B, iop_);
150 template<
class tetPo
intsOp>
151 static void tetTetOverlap
155 tetPointsOp& insideOp
159 template<
class tetsOp>
160 static void cellCellOverlapMinDecomp
167 tetsOp& combineTetsOp
203 bool cellCellOverlapMinDecomp
210 const scalar threshold = 0.0
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
const T1 & first() const noexcept
Return first.
const T2 & second() const noexcept
Return second.
A face is a list of labels corresponding to mesh vertices.
Mesh consisting of general polyhedral cells.
Cell-face mesh analysis engine.
Calculates the overlap volume of two cells using tetrahedral decomposition.
scalar cellCellOverlapVolumeMinDecomp(const primitiveMesh &meshA, const label cellAI, const primitiveMesh &meshB, const label cellBI, const treeBoundBox &cellBbB) const
Calculates the overlap volume.
ClassName("tetOverlapVolume")
Runtime type information.
labelList overlappingCells(const polyMesh &meshA, const polyMesh &meshB, const label cellBI) const
Return a list of cells in meshA which overlaps with cellBI in.
tetOverlapVolume()
Null constructor.
Tuple2< scalar, point > cellCellOverlapMomentMinDecomp(const primitiveMesh &meshA, const label cellAI, const primitiveMesh &meshB, const label cellBI, const treeBoundBox &cellBbB) const
Calculates the overlap volume and moment.
Tet storage. Null constructable (unfortunately tetrahedron<point, point> is not)
tetPointRef tet() const
Return the tetrahedron.
Point centre() const
Return centre (centroid)
scalar mag() const
Return volume.
Standard boundBox with extra functionality for use in octree.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
static constexpr const zero Zero
Global zero (0)