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;
87 const scalar threshold_;
88 tetPointRef::sumVolOp iop_;
91 inline hasOverlapOp(
const scalar threshold)
93 threshold_(threshold),
101 tetTetOverlap<tetPointRef::sumVolOp>(
A,
B, iop_);
102 ok_ = (iop_.vol_ > threshold_);
112 tetPointRef::sumVolOp iop_;
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
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
Access the first element.
const T2 & second() const noexcept
Access the second element.
A face is a list of labels corresponding to mesh vertices.
Mesh consisting of general polyhedral cells.
Cell-face mesh analysis engine.
scalar cellCellOverlapVolumeMinDecomp(const primitiveMesh &meshA, const label cellAI, const primitiveMesh &meshB, const label cellBI, const treeBoundBox &cellBbB) const
Calculates the overlap volume.
tetOverlapVolume()=default
Default construct.
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 meshB.
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 point storage. Default constructable (tetrahedron is not).
tetPointRef tet() const
Return as tetrahedron reference.
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.
List< label > labelList
A List of labels.
tetrahedron< point, const point & > tetPointRef
A tetrahedron using referred points.
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
vectorField pointField
pointField is a vectorField.