PrimitivePatchTemplate.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | foam-extend: Open Source CFD
4  \\ / O peration | Version: 3.2
5  \\ / A nd | Web: http://www.foam-extend.org
6  \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9  This file is part of foam-extend.
10 
11  foam-extend is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation, either version 3 of the License, or (at your
14  option) any later version.
15 
16  foam-extend is distributed in the hope that it will be useful, but
17  WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::PrimitivePatch
26 
27 Description
28  A list of faces which address into the list of points.
29 
30  The class is templated on the face type (e.g. triangle, polygon etc.)
31  and on the list type of faces and points so that it can refer to
32  existing lists using UList and const pointField& or hold the storage
33  using List and pointField.
34 
35 SourceFiles
36  PrimitivePatchAddressing.C
37  PrimitivePatchBdryPoints.C
38  PrimitivePatch.C
39  PrimitivePatchCheck.C
40  PrimitivePatchClear.C
41  PrimitivePatchEdgeLoops.C
42  PrimitivePatchLocalPointOrder.C
43  PrimitivePatchMeshData.C
44  PrimitivePatchMeshEdges.C
45  PrimitivePatchName.C
46  PrimitivePatchPointAddressing.C
47  PrimitivePatchProjectPoints.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef PrimitivePatch_H
52 #define PrimitivePatch_H
53 
54 #include "boolList.H"
55 #include "labelList.H"
56 #include "edgeList.H"
57 #include "point.H"
58 #include "intersection.H"
59 #include "HashSet.H"
60 #include "optimisationSwitch.H"
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 
67 class face;
68 class objectHit;
69 template<class T> class Map;
70 
71 /*---------------------------------------------------------------------------*\
72  Class PrimitivePatchName Declaration
73 \*---------------------------------------------------------------------------*/
74 
76 
77 
78 /*---------------------------------------------------------------------------*\
79  Class PrimitivePatch Declaration
80 \*---------------------------------------------------------------------------*/
81 
82 template
83 <
84  class Face,
85  template<class> class FaceList,
86  class PointField,
87  class PointType=point
88 >
89 class PrimitivePatch
90 :
91  public PrimitivePatchName,
92  public FaceList<Face>
93 {
94 
95 public:
96 
97  // Public typedefs
98 
99  typedef Face FaceType;
100  typedef FaceList<Face> FaceListType;
101  typedef PointField PointFieldType;
102 
103 
104  // Public data types
105 
106  //- Enumeration defining the surface type. Used in check routines.
107  enum surfaceTopo
108  {
111  ILLEGAL
112  };
113 
114 private:
115 
116  // Private data
117 
118  //- Reference to global list of points
119  PointField points_;
120 
121 
122  // Demand driven private data
123 
124  //- Edges of the patch; address into local point list;
125  // sorted with internal edges first in upper-triangular order
126  // and external edges last.
127  mutable edgeList* edgesPtr_;
128 
129  //- Which part of edgesPtr_ is internal edges.
130  mutable label nInternalEdges_;
131 
132  //- Boundary point labels, addressing into local point list
133  mutable labelList* boundaryPointsPtr_;
134 
135  //- Face-face addressing
136  mutable labelListList* faceFacesPtr_;
137 
138  //- Edge-face addressing
139  mutable labelListList* edgeFacesPtr_;
140 
141  //- Face-edge addressing
142  mutable labelListList* faceEdgesPtr_;
143 
144  //- Point-edge addressing
145  mutable labelListList* pointEdgesPtr_;
146 
147  //- Point-face addressing
148  mutable labelListList* pointFacesPtr_;
149 
150  //- Faces addressing into local point list
151  mutable List<Face>* localFacesPtr_;
152 
153  //- Labels of mesh points
154  mutable labelList* meshPointsPtr_;
155 
156  //- Mesh point map. Given the global point index find its
157  //location in the patch
158  mutable Map<label>* meshPointMapPtr_;
159 
160  //- Outside edge loops
161  mutable labelListList* edgeLoopsPtr_;
162 
163  //- Points local to patch
165 
166  //- Local point order for most efficient search
168 
169  //- Face centres
171 
172  //- Face unit normals
174 
175  //- Point unit normals
177 
178 
179  // Static Private Data
180 
181  //- N-squared projection forced
183 
184 
185  // Private Member Functions
186 
187  //- Calculated boundary points on a patch
188  void calcBdryPoints() const;
189 
190  //- Calculate addressing
191  void calcAddressing() const;
192 
193  //- Calculate point-edge addressing
194  void calcPointEdges() const;
195 
196  //- Calculate point-face addressing
197  void calcPointFaces() const;
198 
199  //- Calculate mesh addressing
200  void calcMeshData() const;
201 
202  //- Calculate mesh point map
203  void calcMeshPointMap() const;
204 
205  //- Calculate outside edge loops
206  void calcEdgeLoops() const;
207 
208  //- Calculate local points
209  void calcLocalPoints() const;
210 
211  //- Calculate local point order
212  void calcLocalPointOrder() const;
213 
214  //- Calculate face centres
215  void calcFaceCentres() const;
216 
217  //- Calculate unit face normals
218  void calcFaceNormals() const;
219 
220  //- Calculate unit point normals
221  void calcPointNormals() const;
222 
223  //- Calculate edge owner
224  void calcEdgeOwner() const;
225 
226 
227  //- Face-edge-face walk while remaining on a patch point.
228  // Used to determine if surface multiply connected through point.
229  void visitPointRegion
230  (
231  const label pointI,
232  const labelList& pFaces,
233  const label startFaceI,
234  const label startEdgeI,
235  boolList& pFacesHad
236  ) const;
237 
238 
239 public:
240 
241  // Constructors
242 
243  //- Construct from components
245  (
246  const FaceList<Face>& faces,
247  const Field<PointType>& points
248  );
249 
250  //- Construct from components, reuse storage
252  (
253  FaceList<Face>& faces,
255  const bool reUse
256  );
257 
258  //- Construct as copy
260  (
262  );
263 
264 
265  // Destructor
266 
267  virtual ~PrimitivePatch();
268 
269  void clearOut();
270 
271  void clearGeom();
272 
273  void clearTopology();
274 
275  void clearPatchMeshAddr();
276 
277 
278  // Member Functions
279 
280  // Access
281 
282  //- Return reference to global points
283  const Field<PointType>& points() const
284  {
285  return points_;
286  }
287 
288 
289  // Access functions for demand driven data
290 
291  // Topological data; no mesh required.
292 
293  //- Return number of points supporting patch faces
294  label nPoints() const
295  {
296  return meshPoints().size();
297  }
298 
299  //- Return number of edges in patch
300  label nEdges() const
301  {
302  return edges().size();
303  }
304 
305  //- Return list of edges, address into LOCAL point list
306  const edgeList& edges() const;
307 
308  //- Number of internal edges
309  label nInternalEdges() const;
310 
311  //- Is internal edge?
312  bool isInternalEdge(const label edgeI) const
313  {
314  return edgeI < nInternalEdges();
315  }
316 
317  //- Return list of boundary points,
318  // address into LOCAL point list
319  const labelList& boundaryPoints() const;
320 
321  //- Return face-face addressing
322  const labelListList& faceFaces() const;
323 
324  //- Return edge-face addressing
325  const labelListList& edgeFaces() const;
326 
327  //- Return face-edge addressing
328  const labelListList& faceEdges() const;
329 
330  //- Return point-edge addressing
331  const labelListList& pointEdges() const;
332 
333  //- Return point-face addressing
334  const labelListList& pointFaces() const;
335 
336  //- Return patch faces addressing into local point list
337  const List<Face>& localFaces() const;
338 
339 
340  // Addressing into mesh
341 
342  //- Return labelList of mesh points in patch
343  const labelList& meshPoints() const;
344 
345  //- Mesh point map. Given the global point index find its
346  // location in the patch
347  const Map<label>& meshPointMap() const;
348 
349  //- Return pointField of points in patch
350  const Field<PointType>& localPoints() const;
351 
352  //- Return orders the local points for most efficient search
353  const labelList& localPointOrder() const;
354 
355  //- Given a global point index, return the local point
356  // index. If the point is not found, return -1
357  label whichPoint(const label gp) const;
358 
359  //- Given an edge in local point labels, return its index
360  // in the edge list. If the edge is not found, return -1
361  label whichEdge(const edge& e) const;
362 
363  //- Return labels of patch edges in the global edge list using
364  // cell addressing
366  (
367  const edgeList& allEdges,
368  const labelListList& cellEdges,
369  const labelList& faceCells
370  ) const;
371 
372  //- Return labels of patch edges in the global edge list using
373  // basic edge addressing.
375  (
376  const edgeList& allEdges,
378  ) const;
379 
380  //- Return face centres for patch
381  const Field<PointType>& faceCentres() const;
382 
383  //- Return face normals for patch
384  const Field<PointType>& faceNormals() const;
385 
386  //- Return point normals for patch
387  const Field<PointType>& pointNormals() const;
388 
389 
390  // Other patch operations
391 
392  //- Project vertices of patch onto another patch
393  template <class ToPatch>
395  (
396  const ToPatch& targetPatch,
397  const Field<PointType>& projectionDirection,
400  ) const;
401 
402  //- Project vertices of patch onto another patch
403  template <class ToPatch>
405  (
406  const ToPatch& targetPatch,
407  const Field<PointType>& projectionDirection,
410  ) const;
411 
412  //- Return list of closed loops of boundary vertices.
413  // Edge loops are given as ordered lists of vertices
414  // in local addressing
415  const labelListList& edgeLoops() const;
416 
417 
418  // Check
419 
420  //- Calculate surface type formed by patch.
421  // - all edges have two neighbours (manifold)
422  // - some edges have more than two neighbours (illegal)
423  // - other (open)
424  surfaceTopo surfaceType() const;
425 
426  //- Check surface formed by patch for manifoldness (see above).
427  // Return true if any incorrect edges are found.
428  // Insert vertices of incorrect edges into set.
429  bool checkTopology
430  (
431  const bool report = false,
432  labelHashSet* setPtr = NULL
433  ) const;
434 
435  //- Checks primitivePatch for faces sharing point but not edge.
436  // This denotes a surface that is pinched at a single point
437  // (test for pinched at single edge is already in PrimitivePatch)
438  // Returns true if this situation found and puts conflicting
439  // (mesh)point in set. Based on all the checking routines in
440  // primitiveMesh.
441  bool checkPointManifold
442  (
443  const bool report = false,
444  labelHashSet* setPtr = NULL
445  ) const;
446 
447  //- Write generic VTK patch, HJ, 14/Jan/2009
448  static void writeVTK
449  (
450  const fileName& name,
451  const FaceListType& faces,
452  const Field<PointType>& points
453  );
454 
455  //- Write generic VTK patch normals, HJ, 14/Jan/2009
456  static void writeVTKNormals
457  (
458  const fileName& name,
459  const FaceListType& faces,
460  const Field<PointType>& points
461  );
462 
463  //- Write VTK patch
464  void writeVTK(const fileName& name) const;
465 
466  //- Write VTK patch normals
467  void writeVTKNormals(const fileName& name) const;
468 
469 
470  // Edit
471 
472  //- Correct patch after moving points
473  virtual void movePoints(const Field<PointType>&);
474 
475 
476  // Member operators
477 
478  //- Assignment
479  void operator=
480  (
482  );
483 };
484 
485 
486 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
487 
488 } // End namespace Foam
489 
490 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
491 
492 #ifdef NoRepository
493 # include "PrimitivePatchTemplate.C"
494 #endif
495 
496 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
497 
498 #endif
499 
500 // ************************************************************************* //
Foam::PrimitivePatch::calcPointNormals
void calcPointNormals() const
Calculate unit point normals.
Definition: PrimitivePatchMeshData.C:263
Foam::intersection::direction
direction
Definition: intersection.H:63
Foam::PrimitivePatch::pointFaces
const labelListList & pointFaces() const
Return point-face addressing.
Definition: PrimitivePatchTemplate.C:352
Foam::PrimitivePatch::whichPoint
label whichPoint(const label gp) const
Given a global point index, return the local point.
Definition: PrimitivePatchTemplate.C:473
Foam::PrimitivePatch::calcFaceNormals
void calcFaceNormals() const
Calculate unit face normals.
Definition: PrimitivePatchMeshData.C:379
Foam::PrimitivePatch::points
const Field< PointType > & points() const
Return reference to global points.
Definition: PrimitivePatchTemplate.H:282
Foam::PrimitivePatch::edgeFaces
const labelListList & edgeFaces() const
Return edge-face addressing.
Definition: PrimitivePatchTemplate.C:292
boolList.H
intersection.H
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::PrimitivePatch::edges
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
Definition: PrimitivePatchTemplate.C:212
Foam::PrimitivePatch::localPointsPtr_
Field< PointType > * localPointsPtr_
Points local to patch.
Definition: PrimitivePatchTemplate.H:163
Foam::PrimitivePatch::localPointOrderPtr_
labelList * localPointOrderPtr_
Local point order for most efficient search.
Definition: PrimitivePatchTemplate.H:166
Foam::PrimitivePatch::PrimitivePatch
PrimitivePatch(const FaceList< Face > &faces, const Field< PointType > &points)
Construct from components.
Definition: PrimitivePatchTemplate.C:58
Foam::PrimitivePatch::localPoints
const Field< PointType > & localPoints() const
Return pointField of points in patch.
Definition: PrimitivePatchTemplate.C:432
point.H
Foam::PrimitivePatch::nEdges
label nEdges() const
Return number of edges in patch.
Definition: PrimitivePatchTemplate.H:299
Foam::PrimitivePatch::OPEN
@ OPEN
Definition: PrimitivePatchTemplate.H:109
Foam::PrimitivePatch::writeVTK
static void writeVTK(const fileName &name, const FaceListType &faces, const Field< PointType > &points)
Write generic VTK patch, HJ, 14/Jan/2009.
Definition: PrimitivePatchCheck.C:345
Foam::PrimitivePatch::edgesPtr_
edgeList * edgesPtr_
Edges of the patch; address into local point list;.
Definition: PrimitivePatchTemplate.H:126
Foam::PrimitivePatch::meshEdges
labelList meshEdges(const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
Return labels of patch edges in the global edge list using.
Definition: PrimitivePatchMeshEdges.C:41
Foam::edge
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:58
Foam::intersection::FULL_RAY
@ FULL_RAY
Definition: intersection.H:71
Foam::PrimitivePatch::calcMeshData
void calcMeshData() const
Calculate mesh addressing.
Definition: PrimitivePatchMeshData.C:40
Foam::PrimitivePatch::~PrimitivePatch
virtual ~PrimitivePatch()
Definition: PrimitivePatchTemplate.C:169
Foam::Map
A HashTable to objects of type <T> with a label key.
Definition: PrimitivePatchTemplate.H:68
Foam::PrimitivePatch::faceEdges
const labelListList & faceEdges() const
Return face-edge addressing.
Definition: PrimitivePatchTemplate.C:312
Foam::HashSet< label, Hash< label > >
Foam::PrimitivePatch::surfaceType
surfaceTopo surfaceType() const
Calculate surface type formed by patch.
Definition: PrimitivePatchCheck.C:123
Foam::PrimitivePatch::edgeLoopsPtr_
labelListList * edgeLoopsPtr_
Outside edge loops.
Definition: PrimitivePatchTemplate.H:160
Foam::PrimitivePatch::calcLocalPointOrder
void calcLocalPointOrder() const
Calculate local point order.
Definition: PrimitivePatchLocalPointOrder.C:43
Foam::PrimitivePatch::MANIFOLD
@ MANIFOLD
Definition: PrimitivePatchTemplate.H:108
pFaces
Info<< "Finished reading KIVA file"<< endl;cellShapeList cellShapes(nPoints);labelList cellZoning(nPoints, -1);const cellModel &hex=*(cellModeller::lookup("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]=cellShape(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
Foam::PrimitivePatch::calcPointFaces
void calcPointFaces() const
Calculate point-face addressing.
Definition: PrimitivePatchPointAddressing.C:115
Foam::debug::optimisationSwitch
int optimisationSwitch(const char *name, const int defaultValue=0)
Lookup optimisation switch or add default value.
Definition: debug.C:182
Foam::PrimitivePatch::meshPointsPtr_
labelList * meshPointsPtr_
Labels of mesh points.
Definition: PrimitivePatchTemplate.H:153
Foam::PrimitivePatch::calcMeshPointMap
void calcMeshPointMap() const
Calculate mesh point map.
Definition: PrimitivePatchMeshData.C:160
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
labelList.H
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::PrimitivePatch::faceCentresPtr_
Field< PointType > * faceCentresPtr_
Face centres.
Definition: PrimitivePatchTemplate.H:169
Foam::PrimitivePatch::boundaryPointsPtr_
labelList * boundaryPointsPtr_
Boundary point labels, addressing into local point list.
Definition: PrimitivePatchTemplate.H:132
Foam::PrimitivePatch::PointFieldType
PointField PointFieldType
Definition: PrimitivePatchTemplate.H:100
Foam::PrimitivePatch::pointEdges
const labelListList & pointEdges() const
Return point-edge addressing.
Definition: PrimitivePatchTemplate.C:332
Foam::intersection::algorithm
algorithm
Definition: intersection.H:69
Foam::TemplateName
TemplateName(blendedSchemeBase)
Foam::PrimitivePatch::movePoints
virtual void movePoints(const Field< PointType > &)
Correct patch after moving points.
Definition: PrimitivePatchTemplate.C:187
Foam::PrimitivePatch::FaceType
Face FaceType
Definition: PrimitivePatchTemplate.H:98
Foam::PrimitivePatch::checkTopology
bool checkTopology(const bool report=false, labelHashSet *setPtr=NULL) const
Check surface formed by patch for manifoldness (see above).
Definition: PrimitivePatchCheck.C:177
Foam::PrimitivePatch::clearGeom
void clearGeom()
Definition: PrimitivePatchClear.C:40
HashSet.H
Foam::PrimitivePatch::nPoints
label nPoints() const
Return number of points supporting patch faces.
Definition: PrimitivePatchTemplate.H:293
Foam::PrimitivePatch::pointFacesPtr_
labelListList * pointFacesPtr_
Point-face addressing.
Definition: PrimitivePatchTemplate.H:147
edgeList.H
Foam::PrimitivePatch::visitPointRegion
void visitPointRegion(const label pointI, const labelList &pFaces, const label startFaceI, const label startEdgeI, boolList &pFacesHad) const
Face-edge-face walk while remaining on a patch point.
Definition: PrimitivePatchCheck.C:46
Foam::PrimitivePatch::calcAddressing
void calcAddressing() const
Calculate addressing.
Definition: PrimitivePatchAddressing.C:52
Foam::PrimitivePatch::projectPoints
List< objectHit > projectPoints(const ToPatch &targetPatch, const Field< PointType > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
Project vertices of patch onto another patch.
Foam::PrimitivePatch::faceNormalsPtr_
Field< PointType > * faceNormalsPtr_
Face unit normals.
Definition: PrimitivePatchTemplate.H:172
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::intersection::VECTOR
@ VECTOR
Definition: intersection.H:65
Foam::e
const double e
Elementary charge.
Definition: doubleFloat.H:94
Foam::PrimitivePatch::clearTopology
void clearTopology()
Definition: PrimitivePatchClear.C:65
Foam::PrimitivePatch< labelledTri, List, pointField, point >::surfaceTopo
surfaceTopo
Enumeration defining the surface type. Used in check routines.
Definition: PrimitivePatchTemplate.H:106
Foam::PrimitivePatch::whichEdge
label whichEdge(const edge &e) const
Given an edge in local point labels, return its index.
Definition: PrimitivePatchMeshEdges.C:175
Foam::PrimitivePatch::meshPointMapPtr_
Map< label > * meshPointMapPtr_
Mesh point map. Given the global point index find its.
Definition: PrimitivePatchTemplate.H:157
Foam::PrimitivePatch::FaceListType
FaceList< Face > FaceListType
Definition: PrimitivePatchTemplate.H:99
Foam::PrimitivePatch::boundaryPoints
const labelList & boundaryPoints() const
Return list of boundary points,.
Definition: PrimitivePatchTemplate.C:252
Foam::PrimitivePatch::nInternalEdges
label nInternalEdges() const
Number of internal edges.
Definition: PrimitivePatchTemplate.C:232
Foam::PrimitivePatch::pointNormals
const Field< PointType > & pointNormals() const
Return point normals for patch.
Definition: PrimitivePatchTemplate.C:540
Foam::PrimitivePatch::localFacesPtr_
List< Face > * localFacesPtr_
Faces addressing into local point list.
Definition: PrimitivePatchTemplate.H:150
Foam::PrimitivePatch::calcLocalPoints
void calcLocalPoints() const
Calculate local points.
Definition: PrimitivePatchMeshData.C:211
PrimitivePatchTemplate.C
Foam::PrimitivePatch::calcBdryPoints
void calcBdryPoints() const
Calculated boundary points on a patch.
Definition: PrimitivePatchBdryPoints.C:40
Foam::PrimitivePatch::projectFaceCentres
List< objectHit > projectFaceCentres(const ToPatch &targetPatch, const Field< PointType > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
Project vertices of patch onto another patch.
Foam::PrimitivePatch::ILLEGAL
@ ILLEGAL
Definition: PrimitivePatchTemplate.H:110
Foam::PrimitivePatch::faceNormals
const Field< PointType > & faceNormals() const
Return face normals for patch.
Definition: PrimitivePatchTemplate.C:520
Foam::Vector< scalar >
Foam::PrimitivePatch::edgeLoops
const labelListList & edgeLoops() const
Return list of closed loops of boundary vertices.
Definition: PrimitivePatchEdgeLoops.C:176
Foam::PrimitivePatch::pointNormalsPtr_
Field< PointType > * pointNormalsPtr_
Point unit normals.
Definition: PrimitivePatchTemplate.H:175
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::PrimitivePatch::writeVTKNormals
static void writeVTKNormals(const fileName &name, const FaceListType &faces, const Field< PointType > &points)
Write generic VTK patch normals, HJ, 14/Jan/2009.
Definition: PrimitivePatchCheck.C:429
Foam::PrimitivePatch::clearOut
void clearOut()
Definition: PrimitivePatchClear.C:132
Foam::PrimitivePatch::faceCentres
const Field< PointType > & faceCentres() const
Return face centres for patch.
Definition: PrimitivePatchTemplate.C:500
Foam::PrimitivePatch::faceFacesPtr_
labelListList * faceFacesPtr_
Face-face addressing.
Definition: PrimitivePatchTemplate.H:135
Foam::PrimitivePatch::localPointOrder
const labelList & localPointOrder() const
Return orders the local points for most efficient search.
Definition: PrimitivePatchTemplate.C:452
Foam::PrimitivePatch::points_
PointField points_
Reference to global list of points.
Definition: PrimitivePatchTemplate.H:118
Foam::PrimitivePatch::localFaces
const List< Face > & localFaces() const
Return patch faces addressing into local point list.
Definition: PrimitivePatchTemplate.C:372
Foam::PrimitivePatch::clearPatchMeshAddr
void clearPatchMeshAddr()
Definition: PrimitivePatchClear.C:107
Foam::PrimitivePatch::calcFaceCentres
void calcFaceCentres() const
Calculate face centres.
Definition: PrimitivePatchMeshData.C:329
Foam::PrimitivePatch::faceEdgesPtr_
labelListList * faceEdgesPtr_
Face-edge addressing.
Definition: PrimitivePatchTemplate.H:141
Foam::PrimitivePatch::nSquaredProjection_
static const debug::optimisationSwitch nSquaredProjection_
N-squared projection forced.
Definition: PrimitivePatchTemplate.H:181
Foam::PrimitivePatch::calcEdgeLoops
void calcEdgeLoops() const
Calculate outside edge loops.
Definition: PrimitivePatchEdgeLoops.C:44
Foam::PrimitivePatch::pointEdgesPtr_
labelListList * pointEdgesPtr_
Point-edge addressing.
Definition: PrimitivePatchTemplate.H:144
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::objectHit
This class describes a combination of target object index and success flag.
Definition: objectHit.H:46
Foam::PrimitivePatch::nInternalEdges_
label nInternalEdges_
Which part of edgesPtr_ is internal edges.
Definition: PrimitivePatchTemplate.H:129
Foam::PrimitivePatch::meshPointMap
const Map< label > & meshPointMap() const
Mesh point map. Given the global point index find its.
Definition: PrimitivePatchTemplate.C:412
Foam::PrimitivePatch::faceFaces
const labelListList & faceFaces() const
Return face-face addressing.
Definition: PrimitivePatchTemplate.C:272
Foam::PrimitivePatch::calcPointEdges
void calcPointEdges() const
Calculate point-edge addressing.
Definition: PrimitivePatchPointAddressing.C:44
Foam::PrimitivePatch::meshPoints
const labelList & meshPoints() const
Return labelList of mesh points in patch.
Definition: PrimitivePatchTemplate.C:392
Foam::PrimitivePatch::checkPointManifold
bool checkPointManifold(const bool report=false, labelHashSet *setPtr=NULL) const
Checks primitivePatch for faces sharing point but not edge.
Definition: PrimitivePatchCheck.C:247
Foam::PrimitivePatch::edgeFacesPtr_
labelListList * edgeFacesPtr_
Edge-face addressing.
Definition: PrimitivePatchTemplate.H:138
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Foam::PrimitivePatch::isInternalEdge
bool isInternalEdge(const label edgeI) const
Is internal edge?
Definition: PrimitivePatchTemplate.H:311
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatchTemplate.H:88
Foam::PrimitivePatch::calcEdgeOwner
void calcEdgeOwner() const
Calculate edge owner.