globalMeshData.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) 2018-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::globalMeshData
29 
30 Description
31  Various mesh related information for a parallel run. Upon construction,
32  constructs all info using parallel communication.
33 
34  Requires:
35  - all processor patches to have correct ordering.
36  - all processorPatches to have their transforms set.
37 
38  The shared point and edge addressing calculates addressing for points
39  and edges on coupled patches. In the 'old' way a distinction was made
40  between points/edges that are only on two processors and those that are
41  on multiple processors. The problem is that those on multiple processors
42  do not allow any transformations and require a global reduction on the
43  master processor.
44 
45  The alternative is to have an exchange schedule (through a 'mapDistribute')
46  which sends all point/edge data (no distinction is made between
47  those on two and those on more than two coupled patches) to the local
48  'master'. This master then does any calculation and sends
49  the result back to the 'slave' points/edges. This only needs to be done
50  on points on coupled faces. Any transformation is done using a
51  predetermined set of transformations - since transformations have to be
52  space filling only a certain number of transformation is supported.
53 
54  The exchange needs
55  - a field of data
56  - a mapDistribute which does all parallel exchange and transformations
57  This appends remote data to the end of the field.
58  - a set of indices which indicate where to get untransformed data in the
59  field
60  - a set of indices which indicate where to get transformed data in the
61  field
62 
63 Note
64  - compared to 17x nTotalFaces, nTotalPoints do not compensate for
65  shared points since this would trigger full connectivity analysis
66  - most calculation is demand driven and uses parallel communication
67  so make sure to invoke on all processors at the same time
68  - old sharedEdge calculation: currently an edge is considered shared
69  if it uses two shared points and is used more than once. This is not
70  correct on processor patches but it only slightly overestimates the number
71  of shared edges. Doing full analysis of how many patches use the edge
72  would be too complicated
73 
74 See also
75  mapDistribute
76  globalIndexAndTransform
77 
78 SourceFiles
79  globalMeshData.C
80  globalMeshDataTemplates.C
81 
82 \*---------------------------------------------------------------------------*/
83 
84 #ifndef Foam_globalMeshData_H
85 #define Foam_globalMeshData_H
86 
87 #include "processorTopology.H"
88 #include "labelPair.H"
89 #include "indirectPrimitivePatch.H"
90 
91 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
92 
93 namespace Foam
94 {
95 
96 // Forward Declarations
97 class polyMesh;
98 class mapDistribute;
99 template<class T> class CompactListList;
100 template<class T> class EdgeMap;
101 class globalIndex;
102 class globalIndexAndTransform;
103 class bitSet;
105 /*---------------------------------------------------------------------------*\
106  Class globalMeshData Declaration
107 \*---------------------------------------------------------------------------*/
108 
109 class globalMeshData
110 {
111  // Private Data
112 
113  //- Reference to mesh
114  const polyMesh& mesh_;
115 
116 
117  // Data related to the complete mesh
118 
119  //- Total number of points in the complete mesh
120  label nTotalPoints_;
121 
122  //- Total number of faces in the complete mesh
123  label nTotalFaces_;
124 
125  //- Total number of cells in the complete mesh
126  label nTotalCells_;
127 
128 
129  // Processor patch addressing (be careful if not running in parallel!)
130 
131  //- The processor/processor topology
132  processorTopology processorTopology_;
133 
134  //- List of processor patch labels
135  // (size of list = number of processor patches)
136  labelList processorPatches_;
137 
138  //- List of indices into processorPatches_ for each patch.
139  // Index = -1 for non-processor patches.
140  // (size of list = number of patches)
141  labelList processorPatchIndices_;
142 
143  //- processorPatchIndices_ of the neighbours processor patches
144  labelList processorPatchNeighbours_;
145 
146 
147  // Coupled point addressing
148  // This is addressing from coupled point to coupled points/faces/cells.
149  // This is a full schedule so includes points used by only two
150  // coupled patches.
151 
152  //- Patch of coupled faces. Additional patch edge to mesh edges
153  // correspondence:
154  // points: meshPoints(), meshPointMap()
155  // edges : meshEdges(), meshEdgeMap()
156  mutable autoPtr<indirectPrimitivePatch> coupledPatchPtr_;
157  mutable autoPtr<labelList> coupledPatchMeshEdgesPtr_;
158  mutable autoPtr<Map<label>> coupledPatchMeshEdgeMapPtr_;
159 
160  //- Global numbering for coupledPatch points
161  mutable autoPtr<globalIndex> globalPointNumberingPtr_;
162 
163  //- Global numbering for transforms
164  mutable autoPtr<globalIndexAndTransform> globalTransformsPtr_;
165 
166  // Coupled point to coupled points
167 
168  mutable autoPtr<labelListList> globalPointSlavesPtr_;
169  mutable autoPtr<labelListList> globalPointTransformedSlavesPtr_;
170  mutable autoPtr<mapDistribute> globalPointSlavesMapPtr_;
171 
172  // Coupled edge to coupled edges
173 
174  mutable autoPtr<globalIndex> globalEdgeNumberingPtr_;
175  mutable autoPtr<labelListList> globalEdgeSlavesPtr_;
176  mutable autoPtr<labelListList> globalEdgeTransformedSlavesPtr_;
177  mutable autoPtr<bitSet> globalEdgeOrientationPtr_;
178  mutable autoPtr<mapDistribute> globalEdgeSlavesMapPtr_;
179 
180 
181  // Coupled point to boundary faces
182 
183  mutable autoPtr<globalIndex> globalBoundaryFaceNumberingPtr_;
184  mutable autoPtr<labelListList> globalPointBoundaryFacesPtr_;
185  mutable autoPtr<labelListList>
186  globalPointTransformedBoundaryFacesPtr_;
187  mutable autoPtr<mapDistribute> globalPointBoundaryFacesMapPtr_;
188 
189  // Coupled point to boundary cells
190 
191  mutable autoPtr<labelList> boundaryCellsPtr_;
192  mutable autoPtr<globalIndex> globalBoundaryCellNumberingPtr_;
193  mutable autoPtr<labelListList> globalPointBoundaryCellsPtr_;
194  mutable autoPtr<labelListList>
195  globalPointTransformedBoundaryCellsPtr_;
196  mutable autoPtr<mapDistribute> globalPointBoundaryCellsMapPtr_;
197 
198 
199  // Other: coupled point to coupled COLLOCATED points
200  mutable autoPtr<labelListList> globalCoPointSlavesPtr_;
201  mutable autoPtr<mapDistribute> globalCoPointSlavesMapPtr_;
202 
203 
204 
205  // Globally shared point addressing
206 
207  //- Total number of global points
208  mutable label nGlobalPoints_;
209 
210  //- Indices of local points that are globally shared
211  mutable autoPtr<labelList> sharedPointLabelsPtr_;
212 
213  //- Indices of globally shared points in the master list
214  // This list contains all the shared points in the mesh
215  mutable autoPtr<labelList> sharedPointAddrPtr_;
216 
217  //- Shared point global labels.
218  // Global point index for every local shared point.
219  // Only valid if constructed with this information or if
220  // pointProcAddressing read.
221  mutable autoPtr<labelList> sharedPointGlobalLabelsPtr_;
222 
223 
224  // Globally shared edge addressing. Derived from shared points.
225  // All demand driven since don't want to construct edges always.
226 
227  //- Total number of global edges
228  mutable label nGlobalEdges_;
229 
230  //- Indices of local edges that are globally shared
231  mutable autoPtr<labelList> sharedEdgeLabelsPtr_;
232 
233  //- Indices of globally shared edge in the master list
234  // This list contains all the shared edges in the mesh
235  mutable autoPtr<labelList> sharedEdgeAddrPtr_;
236 
237 
238  // Private Member Functions
239 
240  //- Set up processor patch addressing
241  void initProcAddr();
242 
243  //- Helper function for shared edge addressing
244  static void countSharedEdges
245  (
246  const EdgeMap<labelList>&,
248  label&
249  );
250 
251  //- Calculate shared point addressing
252  void calcSharedPoints() const;
253 
254  //- Calculate shared edge addressing
255  void calcSharedEdges() const;
256 
257  //- Calculate global point addressing.
258  void calcGlobalPointSlaves() const;
259 
260  // Global edge addressing
261 
262  //- Calculate connected points
263  void calcPointConnectivity(List<labelPairList>&) const;
264 
265  //- Calculate pointEdges and pointPoints addressing
266  void calcGlobalPointEdges
267  (
268  labelListList& globalPointEdges,
269  List<labelPairList>& globalPointPoints
270  ) const;
271 
272  //- Look up remote and local point and find using info the
273  // transforms to go from remotePoint to localPoint
274  label findTransform
275  (
276  const labelPairList& info,
277  const labelPair& remotePoint,
278  const label localPoint
279  ) const;
280 
281  //- Calculate global edge addressing.
282  void calcGlobalEdgeSlaves() const;
283 
284  //- Calculate orientation w.r.t. edge master.
285  void calcGlobalEdgeOrientation() const;
286 
287 
288  // Global boundary face/cell addressing
289 
290  //- Calculate coupled point to uncoupled boundary faces. Local only.
291  void calcPointBoundaryFaces(labelListList&) const;
292 
293  //- Calculate global point to global boundary face addressing.
294  void calcGlobalPointBoundaryFaces() const;
295 
296  //- Calculate global point to global boundary cell addressing.
297  void calcGlobalPointBoundaryCells() const;
298 
299  // Other
300 
301  // Point to collocated points. Note that not all points on
302  // coupled patches now have a master! (since points on either
303  // side of a cyclic are not connected). So check whether the map
304  // reaches all points and decide who is master, slave and who is
305  // its own master. Maybe store as well?
306 
307  void calcGlobalCoPointSlaves() const;
308 
309 public:
310 
311  // Generated Methods
312 
313  //- No copy construct
314  globalMeshData(const globalMeshData&) = delete;
315 
316  //- No copy assignment
317  void operator=(const globalMeshData&) = delete;
318 
319 
320  //- Runtime type information
321  ClassName("globalMeshData");
322 
323 
324  // Static data members
325 
326  //- Geometric tolerance (fraction of bounding box)
327  static const Foam::scalar matchTol_;
328 
329 
330  // Constructors
331 
332  //- Construct from mesh, derive rest (does parallel communication!)
333  globalMeshData(const polyMesh& mesh);
334 
335 
336  //- Destructor
337  ~globalMeshData();
338 
339  //- Remove all demand driven data
340  void clearOut();
341 
342 
343  // Member Functions
344 
345  // Access
346 
347  //- Return the mesh reference
348  const polyMesh& mesh() const noexcept
349  {
350  return mesh_;
351  }
352 
353  //- Does the mesh contain processor patches?
354  //- (also valid when not running parallel)
355  bool parallel() const noexcept
356  {
357  return !processorPatches_.empty();
358  }
359 
360  //- Return total number of points in decomposed mesh.
361  //- Not compensated for duplicate points!
362  label nTotalPoints() const noexcept
363  {
364  return nTotalPoints_;
365  }
366 
367  //- Return total number of faces in decomposed mesh.
368  //- Not compensated for duplicate faces!
369  label nTotalFaces() const noexcept
370  {
371  return nTotalFaces_;
372  }
373 
374  //- Return total number of cells in decomposed mesh.
375  label nTotalCells() const noexcept
376  {
377  return nTotalCells_;
378  }
379 
380 
381  // Processor patch addressing (be careful when not running in parallel)
382 
383  //- The processor to processor topology.
384  const processorTopology& topology() const noexcept
385  {
386  return processorTopology_;
387  }
388 
389  //- Order in which the patches should be initialised/evaluated
390  //- corresponding to the schedule
391  const lduSchedule& patchSchedule() const noexcept
392  {
393  return processorTopology_.patchSchedule();
394  }
395 
396  //- Return list of processor patch labels
397  // (size of list = number of processor patches)
398  const labelList& processorPatches() const noexcept
399  {
400  return processorPatches_;
401  }
402 
403  //- Return list of indices into processorPatches_ for each patch.
404  // Index = -1 for non-processor parches.
405  // (size of list = number of patches)
407  {
408  return processorPatchIndices_;
409  }
410 
411  //- Return processorPatchIndices of the neighbours
412  //- processor patches. -1 if not running parallel.
414  {
415  return processorPatchNeighbours_;
416  }
417 
418 
419  // Globally shared point addressing
420 
421  //- Return number of globally shared points
422  label nGlobalPoints() const;
423 
424  //- Return indices of local points that are globally shared
425  const labelList& sharedPointLabels() const;
426 
427  //- Return addressing into the complete globally shared points
428  // list
429  // Note: It is assumed that a (never constructed) complete
430  // list of globally shared points exists. The set of shared
431  // points on the current processor is a subset of all shared
432  // points. Shared point addressing gives the index in the
433  // list of all globally shared points for each of the locally
434  // shared points.
435  const labelList& sharedPointAddr() const;
436 
437  //- Return shared point global labels. Tries to read
438  // 'pointProcAddressing' and returns list or -1 if none
439  // available.
440  const labelList& sharedPointGlobalLabels() const;
441 
442  //- Collect coordinates of shared points on all processors.
443  // (does parallel communication!)
444  // Note: not valid for cyclicParallel since shared cyclic points
445  // are merged into single global point. (use geometricSharedPoints
446  // instead)
447  pointField sharedPoints() const;
448 
449  //- Like sharedPoints but keeps cyclic points separate.
450  // (does geometric merging; uses matchTol_*bb as merging tolerance)
451  // Use sharedPoints() instead.
453 
454 
456  // Globally shared edge addressing
457 
458  //- Return number of globally shared edges. Demand-driven
459  // calculation so call needs to be synchronous among processors!
460  label nGlobalEdges() const;
461 
462  //- Return indices of local edges that are globally shared.
463  // Demand-driven
464  // calculation so call needs to be synchronous among processors!
465  const labelList& sharedEdgeLabels() const;
466 
467  //- Return addressing into the complete globally shared edge
468  // list. The set of shared
469  // edges on the current processor is a subset of all shared
470  // edges. Shared edge addressing gives the index in the
471  // list of all globally shared edges for each of the locally
472  // shared edges.
473  // Demand-driven
474  // calculation so call needs to be synchronous among processors!
475  const labelList& sharedEdgeAddr() const;
476 
477 
478 
479  // Global master - slave point communication
480 
481  //- Return patch of all coupled faces
482  const indirectPrimitivePatch& coupledPatch() const;
484  //- Return map from coupledPatch edges to mesh edges
485  const labelList& coupledPatchMeshEdges() const;
486 
487  //- Return map from mesh edges to coupledPatch edges
488  const Map<label>& coupledPatchMeshEdgeMap() const;
489 
490  //- Global transforms numbering
492 
493  //- Helper: synchronise data with transforms
494  template<class Type, class CombineOp, class TransformOp>
495  static void syncData
496  (
497  List<Type>& elems,
498  const labelListList& slaves,
499  const labelListList& transformedSlaves,
500  const mapDistribute& slavesMap,
502  const CombineOp& cop,
503  const TransformOp& top
504  );
505 
506  //- Helper: synchronise data without transforms
507  template<class Type, class CombineOp>
508  static void syncData
509  (
510  List<Type>& elems,
511  const labelListList& slaves,
512  const labelListList& transformedSlaves,
513  const mapDistribute& slavesMap,
514  const CombineOp& cop
515  );
516 
517 
518  // Coupled point to coupled points. Coupled points are
519  // points on any coupled patch.
520 
521  //- Numbering of coupled points is according to coupledPatch.
522  const globalIndex& globalPointNumbering() const;
523  const labelListList& globalPointSlaves() const;
525  const mapDistribute& globalPointSlavesMap() const;
526  //- Helper to synchronise coupled patch point data
527  template<class Type, class CombineOp, class TransformOp>
528  void syncPointData
529  (
530  List<Type>& pointData,
531  const CombineOp& cop,
532  const TransformOp& top
533  ) const;
534 
535  // Coupled edge to coupled edges.
536 
537  const globalIndex& globalEdgeNumbering() const;
538  const labelListList& globalEdgeSlaves() const;
540  const mapDistribute& globalEdgeSlavesMap() const;
541  //- Is my edge same orientation as master edge
542  const bitSet& globalEdgeOrientation() const;
543 
544  // Collocated point to collocated point
545 
546  const labelListList& globalCoPointSlaves() const;
547  const mapDistribute& globalCoPointSlavesMap() const;
548 
549  // Coupled point to boundary faces. These are uncoupled boundary
550  // faces only but include empty patches.
551 
552  //- Numbering of boundary faces is face-mesh.nInternalFaces()
556  const;
558 
559  // Coupled point to boundary cell
560 
561  //- From boundary cell to mesh cell
562  const labelList& boundaryCells() const;
563 
564  //- Numbering of boundary cells is according to boundaryCells()
568  const;
570 
571 
572  // Other
573 
574  //- Helper for merging (collocated!) mesh point data.
575  // Determines:
576  // - my unique indices
577  // - global numbering over all unique indices
578  // - the global number for all local points (so this will
579  // be local for my unique points)
581  (
582  labelList& pointToGlobal,
583  labelList& uniquePoints
584  ) const;
585 
586  //- Helper for merging (collocated!) patch point data.
587  // Takes maps from:
588  // local points to/from mesh. Determines
589  // - my unique points. These are mesh point indices, not patch
590  // point indices.
591  // - global numbering over all unique indices.
592  // - the global number for all local points.
594  (
595  const labelUList& meshPoints,
596  const Map<label>& meshPointMap,
597  labelList& pointToGlobal,
598  labelList& uniqueMeshPoints
599  ) const;
600 
601 
602  // Edit
603 
604  //- Update for moving points.
605  void movePoints(const pointField& newPoints);
606 
607  //- Change global mesh data given a topological change. Does a
608  // full parallel analysis to determine shared points and
609  // boundaries.
610  void updateMesh();
611 
612 
613  // Mesh Topology Calculation
614 
615  //- Determine (local or global) cellCells from mesh agglomeration.
616  // Agglomeration is local to the processor.
617  // - parallel = false
618  // Resulting connections are in local cell indices.
619  // Coupled across cyclics but not processor patches.
620  // - parallel = true
621  // Resulting connections are in global cell indices.
622  // Coupled across cyclics and processor patches.
623  static void calcCellCells
624  (
625  const polyMesh& mesh,
626  const labelList& agglom,
627  const label nLocalCoarse,
628  const bool parallel,
629  CompactListList<label>& cellCells
630  );
631 
632  //- Determine (local or global) cellCells and face weights
633  //- from mesh agglomeration.
634  // Uses mag of faceArea as weights
635  static void calcCellCells
636  (
637  const polyMesh& mesh,
638  const labelList& agglom,
639  const label nLocalCoarse,
640  const bool parallel,
641  CompactListList<label>& cellCells,
642  CompactListList<scalar>& cellCellWeights
643  );
644 };
645 
646 
647 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
648 
649 } // End namespace Foam
650 
651 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
652 
653 #ifdef NoRepository
654  #include "globalMeshDataTemplates.C"
655 #endif
656 
657 
658 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
659 
660 #endif
661 
662 // ************************************************************************* //
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
const Map< label > & coupledPatchMeshEdgeMap() const
Return map from mesh edges to coupledPatch edges.
const labelListList & globalPointSlaves() const
const mapDistribute & globalCoPointSlavesMap() const
const labelListList & globalPointTransformedSlaves() const
pointField geometricSharedPoints() const
Like sharedPoints but keeps cyclic points separate.
const globalIndex & globalBoundaryCellNumbering() const
Numbering of boundary cells is according to boundaryCells()
const labelList & sharedPointGlobalLabels() const
Return shared point global labels. Tries to read.
const labelListList & globalPointTransformedBoundaryFaces() const
const mapDistribute & globalEdgeSlavesMap() const
static const Foam::scalar matchTol_
Geometric tolerance (fraction of bounding box)
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
const labelList & processorPatches() const noexcept
Return list of processor patch labels.
bool empty() const noexcept
True if List is empty (ie, size() is zero)
Definition: UList.H:666
void clearOut()
Remove all demand driven data.
static void calcCellCells(const polyMesh &mesh, const labelList &agglom, const label nLocalCoarse, const bool parallel, CompactListList< label > &cellCells)
Determine (local or global) cellCells from mesh agglomeration.
bool parallel() const noexcept
Does the mesh contain processor patches? (also valid when not running parallel)
const mapDistribute & globalPointSlavesMap() const
const bitSet & globalEdgeOrientation() const
Is my edge same orientation as master edge.
const labelListList & globalPointBoundaryCells() const
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
const labelListList & globalEdgeSlaves() const
const labelList & coupledPatchMeshEdges() const
Return map from coupledPatch edges to mesh edges.
const labelListList & globalPointBoundaryFaces() const
const lduSchedule & patchSchedule() const noexcept
Order in which the patches should be initialised/evaluated corresponding to the schedule.
label nTotalPoints() const noexcept
Return total number of points in decomposed mesh. Not compensated for duplicate points! ...
static void syncData(List< Type > &elems, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const globalIndexAndTransform &, const CombineOp &cop, const TransformOp &top)
Helper: synchronise data with transforms.
const labelList & boundaryCells() const
From boundary cell to mesh cell.
label nGlobalEdges() const
Return number of globally shared edges. Demand-driven.
A list of faces which address into the list of points.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:61
const globalIndex & globalEdgeNumbering() const
label nGlobalPoints() const
Return number of globally shared points.
const labelList & sharedEdgeAddr() const
Return addressing into the complete globally shared edge.
const globalIndexAndTransform & globalTransforms() const
Global transforms numbering.
const labelList & processorPatchIndices() const noexcept
Return list of indices into processorPatches_ for each patch.
const globalIndex & globalPointNumbering() const
Numbering of coupled points is according to coupledPatch.
void operator=(const globalMeshData &)=delete
No copy assignment.
A packed storage of objects of type <T> using an offset table for access.
const direction noexcept
Definition: Scalar.H:258
ClassName("globalMeshData")
Runtime type information.
Map from edge (expressed as its endpoints) to value. Hashing (and ==) on an edge is symmetric...
Definition: edgeHashes.H:56
Determines/represents processor-processor connection. After instantiation contains the processor-proc...
~globalMeshData()
Destructor.
label nTotalCells() const noexcept
Return total number of cells in decomposed mesh.
void movePoints(const pointField &newPoints)
Update for moving points.
const labelList & processorPatchNeighbours() const noexcept
Return processorPatchIndices of the neighbours processor patches. -1 if not running parallel...
const indirectPrimitivePatch & coupledPatch() const
Return patch of all coupled faces.
const labelListList & globalPointTransformedBoundaryCells() const
Class containing processor-to-processor mapping information.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition: bitSet.H:59
const processorTopology & topology() const noexcept
The processor to processor topology.
const lduSchedule & patchSchedule() const noexcept
Order in which the patches should be initialised/evaluated corresponding to the schedule.
void updateMesh()
Change global mesh data given a topological change. Does a.
label nTotalFaces() const noexcept
Return total number of faces in decomposed mesh. Not compensated for duplicate faces! ...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
List< label > labelList
A List of labels.
Definition: List.H:62
const mapDistribute & globalPointBoundaryFacesMap() const
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points.
pointField sharedPoints() const
Collect coordinates of shared points on all processors.
const mapDistribute & globalPointBoundaryCellsMap() const
const labelList & sharedEdgeLabels() const
Return indices of local edges that are globally shared.
Namespace for OpenFOAM.
Determination and storage of the possible independent transforms introduced by coupledPolyPatches, as well as all of the possible permutations of these transforms generated by the presence of multiple coupledPolyPatches, i.e. more than one cyclic boundary. Note that any given point can be on maximum 3 transforms only (and these transforms have to be perpendicular)
const labelListList & globalCoPointSlaves() const
const polyMesh & mesh() const noexcept
Return the mesh reference.
const labelListList & globalEdgeTransformedSlaves() const
globalMeshData(const globalMeshData &)=delete
No copy construct.
void syncPointData(List< Type > &pointData, const CombineOp &cop, const TransformOp &top) const
Helper to synchronise coupled patch point data.
const globalIndex & globalBoundaryFaceNumbering() const
Numbering of boundary faces is face-mesh.nInternalFaces()