45 for (
const label facei : cFaces)
47 nVerts += meshFaces[facei].
size();
53 const labelList& firstFace = meshFaces[cFaces[0]];
58 nVerts = firstFace.
size();
64 for (label facei = 1; facei < cFaces.
size(); ++facei)
66 for (
const label curPoint : meshFaces[cFaces[facei]])
68 bool pointFound =
false;
70 for (label checki = 0; checki < nVerts; ++checki)
117 for (
const label facei : cFaces)
119 nEdges += meshFaces[facei].nEdges();
128 for (
const edge& curEdge : meshFaces[cFaces[facei]].edges())
130 bool edgeFound =
false;
132 for (label checki = 0; checki < nEdges; ++checki)
134 if (curEdge == allEdges[checki])
143 allEdges[nEdges] = curEdge;
149 allEdges.resize(nEdges);
183 for (
const label facei : cFaces)
185 const scalar magArea = meshFaces[facei].mag(meshPoints);
186 ctr += meshFaces[facei].centre(meshPoints)*magArea;
190 ctr /= sumArea + VSMALL;
198 for (
const label facei : cFaces)
200 const face&
f = meshFaces[facei];
215 return sumVc/(sumV + VSMALL);
221 const UList<point>& meshPoints,
238 for (
const label facei : cFaces)
240 ctr += meshFaces[facei].centre(meshPoints);
242 ctr /= cFaces.size();
247 for (
const label facei : cFaces)
249 const face&
f = meshFaces[facei];
261 const UList<point>& meshPoints,
267 for (
const label facei : *
this)
269 for (
const label pointi : meshFaces[facei])
271 const point&
p = meshPoints[pointi];
273 bb.first() =
min(bb.first(),
p);
274 bb.second() =
max(bb.second(),
p);
293 if (a.size() !=
b.size())
300 for (
const label curLabel :
b)
306 if (a[ai] == curLabel)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void resize(const label len)
Adjust allocated size of list.
An ordered pair of two objects of type <T> with first() and second() elements.
const T & first() const noexcept
Access the first element.
const T & second() const noexcept
Access the second element.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const_iterator cend() const noexcept
Return const_iterator to end traversing the constant UList.
const_iterator cbegin() const noexcept
Return const_iterator to begin traversing the constant UList.
void size(const label n)
Older name for setAddressableSize.
static const Form rootMin
static const Form rootMax
A cell is defined as a list of faces with extra functionality.
labelList labels(const faceUList &meshFaces) const
Return unordered list of cell vertices given the list of faces.
edgeList edges(const faceUList &meshFaces) const
Return cell edges.
scalar mag(const UList< point > &meshPoints, const faceUList &meshFaces) const
Returns cell volume.
point centre(const UList< point > &meshPoints, const faceUList &meshFaces) const
Returns cell centre.
pointField points(const faceUList &meshFaces, const UList< point > &meshPoints) const
Return the cell vertices given the list of faces and mesh points.
Pair< point > box(const UList< point > &meshPoints, const faceUList &meshFaces) const
The bounding box for the cell.
static const char *const typeName
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
A face is a list of labels corresponding to mesh vertices.
Cell-face mesh analysis engine.
scalar mag(const UList< point > &points) const
Return scalar magnitude - returns volume of pyramid.
Point centre(const UList< point > &points) const
Return centre (centroid).
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
List< edge > edgeList
List of edge.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
List< label > labelList
A List of labels.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
pyramid< point, const point &, const face & > pyramidPointFaceRef
A pyramid using referred point and face.
vector point
Point is a vector.
static constexpr const zero Zero
Global zero (0).
vectorField pointField
pointField is a vectorField.
UList< face > faceUList
UList of faces.
labelList pointLabels(nPoints, -1)
#define forAll(list, i)
Loop across all elements in list.