PrimitivePatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2016-2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::PrimitivePatch
29 
30 Description
31  A list of faces which address into the list of points.
32 
33  The class is templated on the face type (e.g. triangle, polygon etc.)
34  and on the list type of faces and points so that it can refer to
35  existing lists using UList and const pointField& or hold the storage
36  using List and pointField.
37 
38 SourceFiles
39  PrimitivePatch.C
40  PrimitivePatchAddressing.C
41  PrimitivePatchBdryFaces.C
42  PrimitivePatchBdryPoints.C
43  PrimitivePatchCheck.C
44  PrimitivePatchClear.C
45  PrimitivePatchEdgeLoops.C
46  PrimitivePatchLocalPointOrder.C
47  PrimitivePatchMeshData.C
48  PrimitivePatchMeshEdges.C
49  PrimitivePatchPointAddressing.C
50  PrimitivePatchProjectPoints.C
51 
52 \*---------------------------------------------------------------------------*/
53 
54 #ifndef Foam_PrimitivePatch_H
55 #define Foam_PrimitivePatch_H
56 
57 #include "boolList.H"
58 #include "labelList.H"
59 #include "edgeList.H"
60 #include "point.H"
61 #include "intersection.H"
62 #include "HashSet.H"
63 #include "objectHit.H"
64 #include "PrimitivePatchBase.H"
65 
66 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 
68 namespace Foam
69 {
70 
71 // Forward Declarations
72 class face;
73 template<class T> class Map;
74 
75 /*---------------------------------------------------------------------------*\
76  Class PrimitivePatch Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 template<class FaceList, class PointField>
80 class PrimitivePatch
81 :
82  public PrimitivePatchBase,
83  public FaceList
84 {
85 public:
86 
87  // Public Typedefs
88 
89  //- The face type
90  typedef typename
91  std::remove_reference<FaceList>::type::value_type face_type;
92 
93  //- The point type
94  typedef typename
95  std::remove_reference<PointField>::type::value_type point_type;
96 
97  //- The face list type
98  typedef FaceList FaceListType;
99 
100  //- The point field type
101  typedef PointField PointFieldType;
102 
103  //- Deprecated(2020-03) prefer face_type typedef
104  // \deprecated(2020-03) prefer face_type typedef
105  typedef face_type FaceType;
106 
107 
108  // Public Data Types
109 
110  //- Enumeration defining the surface type. Used in check routines.
112  {
113  MANIFOLD,
114  OPEN,
115  ILLEGAL
116  };
117 
118 private:
120  // Private Data
122  //- Reference to global list of points
123  PointField points_;
124 
125 
126  // Demand-driven Private Data
127 
128  //- Edges of the patch; address into local point list;
129  // sorted with internal edges first in upper-triangular order
130  // and external edges last.
131  mutable std::unique_ptr<edgeList> edgesPtr_;
132 
133  //- Which part of edgesPtr_ is internal edges.
134  mutable label nInternalEdges_;
135 
136  //- Boundary point labels, addressing into local point list
137  mutable std::unique_ptr<labelList> boundaryPointsPtr_;
138 
139  //- Face-face addressing
140  mutable std::unique_ptr<labelListList> faceFacesPtr_;
141 
142  //- Edge-face addressing
143  mutable std::unique_ptr<labelListList> edgeFacesPtr_;
144 
145  //- Face-edge addressing
146  mutable std::unique_ptr<labelListList> faceEdgesPtr_;
147 
148  //- Point-edge addressing
149  mutable std::unique_ptr<labelListList> pointEdgesPtr_;
150 
151  //- Point-face addressing
152  mutable std::unique_ptr<labelListList> pointFacesPtr_;
153 
154  //- Faces addressing into local point list
155  mutable std::unique_ptr<List<face_type>> localFacesPtr_;
156 
157  //- Labels of mesh points
158  mutable std::unique_ptr<labelList> meshPointsPtr_;
159 
160  //- Mesh point map. Given the global point index find its
161  //- location in the patch
162  mutable std::unique_ptr<Map<label>> meshPointMapPtr_;
163 
164  //- Outside edge loops
165  mutable std::unique_ptr<labelListList> edgeLoopsPtr_;
166 
167  //- Points local to patch
168  mutable std::unique_ptr<Field<point_type>> localPointsPtr_;
169 
170  //- Local point order for most efficient search
171  mutable std::unique_ptr<labelList> localPointOrderPtr_;
172 
173  //- Face centres
174  mutable std::unique_ptr<Field<point_type>> faceCentresPtr_;
175 
176  //- Face area vectors
177  mutable std::unique_ptr<Field<point_type>> faceAreasPtr_;
178 
179  //- Mag face area
180  mutable std::unique_ptr<Field<scalar>> magFaceAreasPtr_;
181 
182  //- Face unit normals
183  mutable std::unique_ptr<Field<point_type>> faceNormalsPtr_;
184 
185  //- Point unit normals
186  mutable std::unique_ptr<Field<point_type>> pointNormalsPtr_;
187 
188 
189  // Private Member Functions
190 
191  //- Calculate internal points on a patch
192  void calcInternPoints() const;
193 
194  //- Calculate boundary points on a patch
195  void calcBdryPoints() const;
196 
197  //- Calculate addressing
198  void calcAddressing() const;
199 
200  //- Calculate point-edge addressing
201  void calcPointEdges() const;
202 
203  //- Calculate point-face addressing
204  void calcPointFaces() const;
205 
206  //- Calculate mesh addressing
207  void calcMeshData() const;
208 
209  //- Calculate mesh point map
210  void calcMeshPointMap() const;
211 
212  //- Calculate outside edge loops
213  void calcEdgeLoops() const;
214 
215  //- Calculate local points
216  void calcLocalPoints() const;
217 
218  //- Calculate local point order
219  void calcLocalPointOrder() const;
220 
221  //- Calculate face centres
222  void calcFaceCentres() const;
223 
224  //- Calculate face area vectors
225  void calcFaceAreas() const;
226 
227  //- Calculate face area magnitudes
228  void calcMagFaceAreas() const;
229 
230  //- Calculate unit face normals
231  void calcFaceNormals() const;
232 
233  //- Calculate unit point normals
234  void calcPointNormals() const;
235 
236 
237  //- Face-edge-face walk while remaining on a patch point.
238  // Used to determine if surface multiply connected through point.
239  void visitPointRegion
240  (
241  const label pointi,
242  const labelList& pFaces,
243  const label startFacei,
244  const label startEdgeI,
245  boolList& pFacesHad
246  ) const;
247 
248 
249 public:
250 
251  // Constructors
252 
253  //- Construct from components
255  (
256  const FaceList& faces,
257  const PointField& points
258  );
259 
260  //- Construct from components, transferring faces
262  (
263  FaceList&& faces,
264  const PointField& points
265  );
266 
267  //- Construct from components, reuse storage
269  (
270  FaceList& faces,
272  const bool reuse
273  );
274 
275  //- Copy construct
277 
278 
279  //- Destructor
280  virtual ~PrimitivePatch();
281 
282  void clearOut();
283 
284  void clearGeom();
285 
286  void clearTopology();
287 
288  void clearPatchMeshAddr();
289 
290 
291  // Member Functions
292 
293  //- Suppress direct swapping, since storage containers may be const
294  void swap(PrimitivePatch&) = delete;
295 
296 
297  // Access
298 
299  //- Return reference to global points
300  const Field<point_type>& points() const noexcept
301  {
302  return points_;
303  }
304 
305  //- Number of faces in the patch
306  label nFaces() const noexcept
307  {
308  return FaceList::size();
309  }
310 
311 
312  // Access functions for demand-driven data
313 
314  // Topological data; no mesh required.
315 
316  //- Number of points supporting patch faces
317  label nPoints() const
318  {
319  return meshPoints().size();
320  }
321 
322  //- Number of edges in patch
323  label nEdges() const
324  {
325  return edges().size();
326  }
327 
328  //- Return list of edges, address into LOCAL point list
329  const edgeList& edges() const;
330 
331  //- Return sub-list of internal edges, address into LOCAL point list
332  const edgeList::subList internalEdges() const;
333 
334  //- Return sub-list of boundary edges, address into LOCAL point list
335  const edgeList::subList boundaryEdges() const;
336 
337  //- Number of internal edges
338  label nInternalEdges() const;
339 
340  //- Number of boundary edges == (nEdges() - nInternalEdges())
341  label nBoundaryEdges() const;
342 
343  //- Is internal edge?
344  bool isInternalEdge(const label edgei) const
345  {
346  return edgei < nInternalEdges();
347  }
348 
349  //- Return list of boundary points, address into LOCAL point list
350  // Uses edge addressing (if it exists) or calculates directly
351  // from localFaces()
352  const labelList& boundaryPoints() const;
353 
354  //- Return face-face addressing
355  const labelListList& faceFaces() const;
356 
357  //- Return edge-face addressing
358  const labelListList& edgeFaces() const;
359 
360  //- Return face-edge addressing
361  const labelListList& faceEdges() const;
362 
363  //- Return point-edge addressing
364  const labelListList& pointEdges() const;
365 
366  //- Return point-face addressing
367  const labelListList& pointFaces() const;
368 
369  //- Return patch faces addressing into local point list
370  const List<face_type>& localFaces() const;
371 
372  //- Extract list of local faces corresponding to
373  //- the boundary edges.
374  labelList boundaryFaces() const;
375 
376  //- Extract sorted list of unique local faces associated with
377  //- the boundary edges.
379 
380 
381  // Addressing into mesh
382 
383  //- Return labelList of mesh points in patch.
384  // They are constructed by walking through the faces in
385  // incremental order and not sorted anymore.
386  const labelList& meshPoints() const;
387 
388  //- Mesh point map.
389  // Given the global point index find its location in the patch
390  const Map<label>& meshPointMap() const;
391 
392  //- Return pointField of points in patch
393  const Field<point_type>& localPoints() const;
394 
395  //- Return orders the local points for most efficient search
396  const labelList& localPointOrder() const;
397 
398  //- Given a global point index, return the local point index.
399  // If the point is not found, return -1
400  label whichPoint(const label gp) const;
401 
402  //- From patch edge to global edge using meshPoints.
403  edge meshEdge(const label edgei) const;
405  //- From patch edge to global edge using meshPoints.
406  edge meshEdge(const edge& e) const;
407 
408  //- Search for edge (local point labels) and return its
409  //- index in the edge list or -1 if not found.
410  // Ignores invalid or out-of-range edges
411  label findEdge(const edge& e) const;
412 
413  //- Return labels of patch edges in the global edge list using
414  //- cell addressing
416  (
417  const edgeList& allEdges,
418  const labelListList& cellEdges,
419  const labelList& faceCells
420  ) const;
421 
422  //- Return labels of patch edges into the global edge list using
423  //- basic edge addressing.
425  (
426  const edgeList& allEdges,
428  ) const;
429 
430  //- Return label of the local patch edge
431  //- into the global edge list using basic edge addressing.
432  label meshEdge
433  (
434  const label edgei,
435  const edgeList& allEdges,
437  ) const;
438 
439  //- Return labels of specified patch edges
440  //- into the global edge list using basic edge addressing.
442  (
443  const labelUList& edgeLabels,
444  const edgeList& allEdges,
446  ) const;
447 
448 
449  //- Return face centres for patch
450  const Field<point_type>& faceCentres() const;
451 
452  //- Return face area vectors for patch
453  const Field<point_type>& faceAreas() const;
454 
455  //- Return face area magnitudes for patch
456  const Field<scalar>& magFaceAreas() const;
457 
458  //- Return face unit normals for patch
459  const Field<point_type>& faceNormals() const;
460 
461  //- Return point normals for patch
462  const Field<point_type>& pointNormals() const;
463 
464  //- The enclosing (bounding) box for the patch points
465  Pair<point_type> box() const;
466 
467  //- The enclosing (bounding) sphere radius^2 for specified face
468  scalar sphere(const label facei) const;
469 
470 
471  // Storage Management
472 
473  bool hasFaceAreas() const { return bool(faceAreasPtr_); }
474  bool hasFaceCentres() const { return bool(faceCentresPtr_); }
475  bool hasFaceNormals() const { return bool(faceNormalsPtr_); }
476  bool hasPointNormals() const { return bool(pointNormalsPtr_); }
477 
478  bool hasBoundaryPoints() const { return bool(boundaryPointsPtr_); }
479 
480  // These ones are currently all calculated together:
481  // - edges(), faceFaces(), edgeFaces(), faceEdges()
482 
483  bool hasEdges() const { return bool(edgesPtr_); }
484  bool hasFaceFaces() const { return bool(faceFacesPtr_); }
485  bool hasEdgeFaces() const { return bool(edgeFacesPtr_); }
486  bool hasFaceEdges() const { return bool(faceEdgesPtr_); }
487 
488  bool hasPointEdges() const { return bool(pointEdgesPtr_); }
489  bool hasPointFaces() const { return bool(pointFacesPtr_); }
490 
491  bool hasMeshPoints() const { return bool(meshPointsPtr_); }
492  bool hasMeshPointMap() const { return bool(meshPointMapPtr_); }
493 
494 
495  // Other patch operations
496 
497  //- Project vertices of patch onto another patch
498  template<class ToPatch>
499  List<objectHit> projectPoints
500  (
501  const ToPatch& targetPatch,
502  const Field<point_type>& projectionDirection,
505  ) const;
506 
507  //- Project vertices of patch onto another patch
508  template<class ToPatch>
509  List<objectHit> projectFaceCentres
510  (
511  const ToPatch& targetPatch,
512  const Field<point_type>& projectionDirection,
515  ) const;
516 
517  //- Return list of closed loops of boundary vertices.
518  // Edge loops are given as ordered lists of vertices
519  // in local addressing
520  const labelListList& edgeLoops() const;
521 
522 
523  // Check
524 
525  //- Calculate surface type formed by patch.
526  // Types:
527  // - all edges have two neighbours (manifold)
528  // - some edges have more than two neighbours (illegal)
529  // - other (open)
530  surfaceTopo surfaceType() const;
531 
532  //- Check surface formed by patch for manifoldness (see above).
533  // Return true if any incorrect edges are found.
534  // Insert vertices of incorrect edges into set.
535  bool checkTopology
536  (
537  const bool report = false,
538  labelHashSet* setPtr = nullptr
539  ) const;
540 
541  //- Checks primitivePatch for faces sharing point but not edge.
542  // This denotes a surface that is pinched at a single point
543  // (test for pinched at single edge is already in PrimitivePatch)
544  // Returns true if this situation found and puts conflicting
545  // (mesh)point in set. Based on all the checking routines in
546  // primitiveMesh.
547  bool checkPointManifold
548  (
549  const bool report = false,
550  labelHashSet* setPtr = nullptr
551  ) const;
552 
553 
554  // Edit
555 
556  //- Correct patch after moving points
557  virtual void movePoints(const Field<point_type>&);
558 
559 
560  // Member Operators
561 
562  //- Copy assign faces. Leave points alone (could be a reference).
563  void operator=(const PrimitivePatch<FaceList, PointField>& rhs);
564 
565  //- Move assign faces. Leave points alone (could be a reference).
566  void operator=(PrimitivePatch<FaceList, PointField>&& rhs);
567 
568 
569  // Housekeeping
570 
571  //- Identical to findEdge
572  label whichEdge(const edge& e) const { return this->findEdge(e); }
573 };
574 
575 
576 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
577 
578 } // End namespace Foam
579 
580 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
581 
582 #ifdef NoRepository
583  #include "PrimitivePatch.C"
584 #endif
585 
586 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
587 
588 #endif
589 
590 // ************************************************************************* //
const labelListList & pointEdges() const
Return point-edge addressing.
const Field< point_type > & faceAreas() const
Return face area vectors for patch.
std::remove_reference< PointField >::type::value_type point_type
The point type.
List< labelList > labelListList
A List of labelList.
Definition: labelList.H:51
label nPoints() const
Number of points supporting patch faces.
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:118
List< objectHit > projectFaceCentres(const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
Project vertices of patch onto another patch.
surfaceTopo
Enumeration defining the surface type. Used in check routines.
bool hasMeshPointMap() const
const Field< point_type > & localPoints() const
Return pointField of points in patch.
bool hasPointFaces() const
List< objectHit > projectPoints(const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
Project vertices of patch onto another patch.
bool hasFaceAreas() const
const labelList & boundaryPoints() const
Return list of boundary points, address into LOCAL point list.
label nInternalEdges() const
Number of internal edges.
SubList< edge > subList
Declare type of subList.
Definition: List.H:122
bool checkPointManifold(const bool report=false, labelHashSet *setPtr=nullptr) const
Checks primitivePatch for faces sharing point but not edge.
Smooth ATC in cells next to a set of patches supplied by type.
Definition: faceCells.H:52
const Field< scalar > & magFaceAreas() const
Return face area magnitudes for patch.
bool isInternalEdge(const label edgei) const
Is internal edge?
std::remove_reference< FaceList >::type::value_type face_type
The face type.
face_type FaceType
Deprecated(2020-03) prefer face_type typedef.
label whichEdge(const edge &e) const
Identical to findEdge.
const labelListList & edgeLoops() const
Return list of closed loops of boundary vertices.
const edgeList::subList boundaryEdges() const
Return sub-list of boundary edges, address into LOCAL point list.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
const labelList & localPointOrder() const
Return orders the local points for most efficient search.
void operator=(const PrimitivePatch< FaceList, PointField > &rhs)
Copy assign faces. Leave points alone (could be a reference).
bool checkTopology(const bool report=false, labelHashSet *setPtr=nullptr) const
Check surface formed by patch for manifoldness (see above).
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Definition: HashSet.H:85
virtual void movePoints(const Field< point_type > &)
Correct patch after moving points.
const Field< point_type > & faceNormals() const
Return face unit normals for patch.
bool hasFaceFaces() const
Pair< point_type > box() const
The enclosing (bounding) box for the patch points.
Non-templated base elements for PrimitivePatch.
A list of faces which address into the list of points.
bool hasFaceNormals() const
const labelListList & faceFaces() const
Return face-face addressing.
const Map< label > & meshPointMap() const
Mesh point map.
label findEdge(const edge &e) const
Search for edge (local point labels) and return its index in the edge list or -1 if not found...
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: instant.H:46
List< edge > edgeList
A List of edges.
Definition: edgeList.H:60
PrimitivePatch(const FaceList &faces, const PointField &points)
Construct from components.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:59
Generic templated field type.
Definition: Field.H:61
void swap(PrimitivePatch &)=delete
Suppress direct swapping, since storage containers may be const.
const edgeList::subList internalEdges() const
Return sub-list of internal edges, address into LOCAL point list.
surfaceTopo surfaceType() const
Calculate surface type formed by patch.
const Field< point_type > & faceCentres() const
Return face centres for patch.
const labelListList & edgeFaces() const
Return edge-face addressing.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
const Field< point_type > & points() const noexcept
Return reference to global points.
label nBoundaryEdges() const
Number of boundary edges == (nEdges() - nInternalEdges())
bool hasBoundaryPoints() const
label whichPoint(const label gp) const
Given a global point index, return the local point index.
const labelListList & pointFaces() const
Return point-face addressing.
const direction noexcept
Definition: Scalar.H:258
label nEdges() const
Number of edges in patch.
bool hasFaceCentres() const
labelList uniqBoundaryFaces() const
Extract sorted list of unique local faces associated with the boundary edges.
const Field< point_type > & pointNormals() const
Return point normals for patch.
bool hasPointEdges() const
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=cellModel::ref(cellModel::HEX);labelList hexLabels(8);label activeCells=0;labelList pointMap(nPoints);forAll(pointMap, i){ pointMap[i]=i;}for(label i=0;i< nPoints;i++){ if(f[i] > 0.0) { hexLabels[0]=i;hexLabels[1]=i1tab[i];hexLabels[2]=i3tab[i1tab[i]];hexLabels[3]=i3tab[i];hexLabels[4]=i8tab[i];hexLabels[5]=i1tab[i8tab[i]];hexLabels[6]=i3tab[i1tab[i8tab[i]]];hexLabels[7]=i3tab[i8tab[i]];cellShapes[activeCells].reset(hex, hexLabels);edgeList edges=cellShapes[activeCells].edges();forAll(edges, ei) { if(edges[ei].mag(points)< SMALL) { label start=pointMap[edges[ei].start()];while(start !=pointMap[start]) { start=pointMap[start];} label end=pointMap[edges[ei].end()];while(end !=pointMap[end]) { end=pointMap[end];} label minLabel=min(start, end);pointMap[start]=pointMap[end]=minLabel;} } cellZoning[activeCells]=idreg[i];activeCells++;}}cellShapes.setSize(activeCells);cellZoning.setSize(activeCells);forAll(cellShapes, celli){ cellShape &cs=cellShapes[celli];forAll(cs, i) { cs[i]=pointMap[cs[i]];} cs.collapse();}label bcIDs[11]={-1, 0, 2, 4, -1, 5, -1, 6, 7, 8, 9};const label nBCs=12;const word *kivaPatchTypes[nBCs]={ &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &wallPolyPatch::typeName, &symmetryPolyPatch::typeName, &wedgePolyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &polyPatch::typeName, &symmetryPolyPatch::typeName, &oldCyclicPolyPatch::typeName};enum patchTypeNames{ PISTON, VALVE, LINER, CYLINDERHEAD, AXIS, WEDGE, INFLOW, OUTFLOW, PRESIN, PRESOUT, SYMMETRYPLANE, CYCLIC};const char *kivaPatchNames[nBCs]={ "piston", "valve", "liner", "cylinderHead", "axis", "wedge", "inflow", "outflow", "presin", "presout", "symmetryPlane", "cyclic"};List< SLList< face > > pFaces[nBCs]
Definition: readKivaGrid.H:235
FaceList FaceListType
The face list type.
labelList boundaryFaces() const
Extract list of local faces corresponding to the boundary edges.
virtual ~PrimitivePatch()
Destructor.
bool hasPointNormals() const
labelList meshEdges(const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
Return labels of patch edges in the global edge list using cell addressing.
edge meshEdge(const label edgei) const
From patch edge to global edge using meshPoints.
scalar sphere(const label facei) const
The enclosing (bounding) sphere radius^2 for specified face.
bool hasEdgeFaces() const
const labelListList & faceEdges() const
Return face-edge addressing.
List< label > labelList
A List of labels.
Definition: List.H:62
bool hasMeshPoints() const
label nFaces() const noexcept
Number of faces in the patch.
PointField PointFieldType
The point field type.
Namespace for OpenFOAM.
bool hasFaceEdges() const