38 #ifndef Foam_tetOverlapVolume_H 39 #define Foam_tetOverlapVolume_H 73 inline void operator()(
const tetPoints& tet)
76 scalar tetVol = t.
mag();
77 vol_.
first() += tetVol;
78 vol_.
second() += (tetVol*t.centre());
87 const scalar threshold_;
91 inline hasOverlapOp(
const scalar threshold)
93 threshold_(threshold),
101 tetTetOverlap<tetPointRef::sumVolOp>(
A,
B, iop_);
102 ok_ = (iop_.
vol_ > threshold_);
114 inline sumOverlapOp()
122 tetTetOverlap<tetPointRef::sumVolOp>(
A,
B, iop_);
128 class sumOverlapMomentOp
134 inline sumOverlapMomentOp()
142 tetTetOverlap<sumMomentOp>(
A,
B, iop_);
151 template<
class tetPo
intsOp>
152 static void tetTetOverlap
156 tetPointsOp& insideOp
160 template<
class tetsOp>
161 static void cellCellOverlapMinDecomp
168 tetsOp& combineTetsOp
204 bool cellCellOverlapMinDecomp
211 const scalar threshold = 0.0
A face is a list of labels corresponding to mesh vertices.
tetPointRef tet() const
Return as tetrahedron reference.
Cell-face mesh analysis engine.
Calculates the overlap volume of two cells using tetrahedral decomposition.
scalar mag() const
Return volume.
ClassName("tetOverlapVolume")
Runtime type information.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
tetOverlapVolume()=default
Default construct.
Tet point storage. Default constructable (tetrahedron is not)
const T2 & second() const noexcept
Access the second element.
Standard boundBox with extra functionality for use in octree.
Mesh consisting of general polyhedral cells.
const T1 & first() const noexcept
Access the first element.
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
labelList overlappingCells(const polyMesh &meshA, const polyMesh &meshB, const label cellBI) const
Return a list of cells in meshA which overlaps with cellBI in meshB.
static const Foam::dimensionedScalar B("", Foam::dimless, 18.678)
scalar cellCellOverlapVolumeMinDecomp(const primitiveMesh &meshA, const label cellAI, const primitiveMesh &meshB, const label cellBI, const treeBoundBox &cellBbB) const
Calculates the overlap volume.
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.
static constexpr const zero Zero
Global zero (0)