Loading...
Searching...
No Matches
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-2024 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::globalMeshData
29
30Description
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
63Note
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
74See also
75 mapDistribute
76 globalIndexAndTransform
77
78SourceFiles
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 "globalIndex.H"
89#include "labelPair.H"
91
92// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
93
94namespace Foam
95{
96
97// Forward Declarations
98class polyMesh;
99class mapDistribute;
100template<class T> class CompactListList;
101template<class T> class EdgeMap;
103class bitSet;
105/*---------------------------------------------------------------------------*\
106 Class globalMeshData Declaration
107\*---------------------------------------------------------------------------*/
108
109class 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 //- Global numbering for mesh points.
120 //- Not compensated for duplicate points!
121 globalIndex globalMeshPointAddr_;
122
123 //- Global numbering for mesh faces.
124 //- Not compensated for duplicate faces!
125 globalIndex globalMeshFaceAddr_;
126
127 //- Global numbering for mesh cells.
128 globalIndex globalMeshCellAddr_;
129
130
131 // Processor patch addressing (be careful if not running in parallel!)
132
133 //- The processor/processor topology
134 processorTopology processorTopology_;
135
136 //- List of processor patch labels
137 // (size of list = number of processor patches)
138 labelList processorPatches_;
139
140 //- List of indices into processorPatches_ for each patch.
141 // Index = -1 for non-processor patches.
142 // (size of list = number of patches)
143 labelList processorPatchIndices_;
144
145 //- processorPatchIndices_ of the neighbours processor patches
146 labelList processorPatchNeighbours_;
147
148
149 // Coupled point addressing
150 // This is addressing from coupled point to coupled points/faces/cells.
151 // This is a full schedule so includes points used by only two
152 // coupled patches.
153
154 //- Patch of coupled faces. Additional patch edge to mesh edges
155 // correspondence:
156 // points: meshPoints(), meshPointMap()
157 // edges : meshEdges(), meshEdgeMap()
158 mutable autoPtr<indirectPrimitivePatch> coupledPatchPtr_;
159 mutable autoPtr<labelList> coupledPatchMeshEdgesPtr_;
160 mutable autoPtr<Map<label>> coupledPatchMeshEdgeMapPtr_;
161
162 //- Global numbering for coupledPatch points
163 mutable autoPtr<globalIndex> globalPointNumberingPtr_;
164
165 //- Global numbering for transforms
166 mutable autoPtr<globalIndexAndTransform> globalTransformsPtr_;
167
168 // Coupled point to coupled points
169
170 mutable autoPtr<labelListList> globalPointSlavesPtr_;
171 mutable autoPtr<labelListList> globalPointTransformedSlavesPtr_;
172 mutable autoPtr<mapDistribute> globalPointSlavesMapPtr_;
173
174 // Coupled edge to coupled edges
175
176 mutable autoPtr<globalIndex> globalEdgeNumberingPtr_;
177 mutable autoPtr<labelListList> globalEdgeSlavesPtr_;
178 mutable autoPtr<labelListList> globalEdgeTransformedSlavesPtr_;
179 mutable autoPtr<bitSet> globalEdgeOrientationPtr_;
180 mutable autoPtr<mapDistribute> globalEdgeSlavesMapPtr_;
181
182
183 // Coupled point to boundary faces
184
185 mutable autoPtr<globalIndex> globalBoundaryFaceNumberingPtr_;
186 mutable autoPtr<labelListList> globalPointBoundaryFacesPtr_;
188 globalPointTransformedBoundaryFacesPtr_;
189 mutable autoPtr<mapDistribute> globalPointBoundaryFacesMapPtr_;
190
191 // Coupled point to boundary cells
192
193 mutable autoPtr<labelList> boundaryCellsPtr_;
194 mutable autoPtr<globalIndex> globalBoundaryCellNumberingPtr_;
195 mutable autoPtr<labelListList> globalPointBoundaryCellsPtr_;
197 globalPointTransformedBoundaryCellsPtr_;
198 mutable autoPtr<mapDistribute> globalPointBoundaryCellsMapPtr_;
199
200
201 // Other: coupled point to coupled COLLOCATED points
202 mutable autoPtr<labelListList> globalCoPointSlavesPtr_;
203 mutable autoPtr<mapDistribute> globalCoPointSlavesMapPtr_;
204
205
206
207 // Globally shared point addressing
208
209 //- Total number of global points
210 mutable label nGlobalPoints_;
211
212 //- Indices of local points that are globally shared
213 mutable autoPtr<labelList> sharedPointLabelsPtr_;
214
215 //- Indices of globally shared points in the master list
216 // This list contains all the shared points in the mesh
217 mutable autoPtr<labelList> sharedPointAddrPtr_;
218
219 //- Shared point global labels.
220 // Global point index for every local shared point.
221 // Only valid if constructed with this information or if
222 // pointProcAddressing read.
223 mutable autoPtr<labelList> sharedPointGlobalLabelsPtr_;
224
225
226 // Globally shared edge addressing. Derived from shared points.
227 // All demand driven since don't want to construct edges always.
228
229 //- Total number of global edges
230 mutable label nGlobalEdges_;
231
232 //- Indices of local edges that are globally shared
233 mutable autoPtr<labelList> sharedEdgeLabelsPtr_;
234
235 //- Indices of globally shared edge in the master list
236 // This list contains all the shared edges in the mesh
237 mutable autoPtr<labelList> sharedEdgeAddrPtr_;
238
239
240 // Private Member Functions
241
242 //- Set up processor patch addressing
243 void initProcAddr();
244
245 //- Helper function for shared edge addressing
246 static void countSharedEdges
247 (
248 const EdgeMap<labelList>&,
250 label&
251 );
252
253 //- Calculate shared point addressing
254 void calcSharedPoints() const;
255
256 //- Calculate shared edge addressing
257 void calcSharedEdges() const;
258
259 //- Calculate global point addressing.
260 void calcGlobalPointSlaves() const;
261
262 // Global edge addressing
263
264 //- Calculate connected points
265 void calcPointConnectivity(List<labelPairList>&) const;
266
267 //- Calculate pointEdges and pointPoints addressing
268 void calcGlobalPointEdges
269 (
270 labelListList& globalPointEdges,
271 List<labelPairList>& globalPointPoints
272 ) const;
273
274 //- Look up remote and local point and find using info the
275 // transforms to go from remotePoint to localPoint
276 label findTransform
277 (
278 const labelPairList& info,
279 const labelPair& remotePoint,
280 const label localPoint
281 ) const;
282
283 //- Calculate global edge addressing.
284 void calcGlobalEdgeSlaves() const;
285
286 //- Calculate orientation w.r.t. edge master.
287 void calcGlobalEdgeOrientation() const;
288
289
290 // Global boundary face/cell addressing
291
292 //- Calculate coupled point to uncoupled boundary faces. Local only.
293 void calcPointBoundaryFaces(labelListList&) const;
294
295 //- Calculate global point to global boundary face addressing.
296 void calcGlobalPointBoundaryFaces() const;
297
298 //- Calculate global point to global boundary cell addressing.
299 void calcGlobalPointBoundaryCells() const;
300
301 // Other
302
303 // Point to collocated points. Note that not all points on
304 // coupled patches now have a master! (since points on either
305 // side of a cyclic are not connected). So check whether the map
306 // reaches all points and decide who is master, slave and who is
307 // its own master. Maybe store as well?
308
309 void calcGlobalCoPointSlaves() const;
310
311public:
312
313 // Generated Methods
314
315 //- No copy construct
316 globalMeshData(const globalMeshData&) = delete;
317
318 //- No copy assignment
319 void operator=(const globalMeshData&) = delete;
320
321
322 //- Runtime type information
323 ClassName("globalMeshData");
324
325
326 // Static data members
327
328 //- Geometric tolerance (fraction of bounding box)
329 static const Foam::scalar matchTol_;
330
331
332 // Constructors
333
334 //- Construct from mesh, derive rest (does parallel communication!)
336
337
338 //- Destructor
340
341 //- Remove all demand driven data
342 void clearOut();
343
344
345 // Member Functions
346
347 // Access
348
349 //- Return the mesh reference
350 const polyMesh& mesh() const noexcept
351 {
352 return mesh_;
353 }
354
355 //- Does the mesh contain processor patches?
356 //- (also valid when not running parallel)
357 bool parallel() const noexcept
358 {
359 return !processorPatches_.empty();
360 }
361
362 //- Global numbering for \b mesh points.
363 //- Not compensated for duplicate points!
364 const globalIndex& globalMeshPointAddr() const noexcept
365 {
366 return globalMeshPointAddr_;
367 }
368
369 //- Global numbering for \b mesh faces.
370 //- Not compensated for duplicate faces!
371 const globalIndex& globalMeshFaceAddr() const noexcept
372 {
373 return globalMeshFaceAddr_;
374 }
375
376 //- Global numbering for \b mesh cells.
377 const globalIndex& globalMeshCellAddr() const noexcept
378 {
379 return globalMeshCellAddr_;
380 }
381
382 //- Total global number of \b mesh points.
383 //- Not compensated for duplicate points!
384 label nTotalPoints() const noexcept
385 {
386 return globalMeshPointAddr_.totalSize();
388
389 //- Total global number of \b mesh faces.
390 //- Not compensated for duplicate faces!
391 label nTotalFaces() const noexcept
392 {
393 return globalMeshFaceAddr_.totalSize();
394 }
395
396 //- Total global number of \b mesh cells.
397 label nTotalCells() const noexcept
398 {
399 return globalMeshCellAddr_.totalSize();
400 }
402
403 // Processor patch addressing (be careful when not running in parallel)
404
405 //- The processor to processor topology.
406 const processorTopology& topology() const noexcept
407 {
408 return processorTopology_;
409 }
410
411 //- Order in which the patches should be initialised/evaluated
412 //- corresponding to the schedule
413 const lduSchedule& patchSchedule() const noexcept
414 {
415 return processorTopology_.patchSchedule();
416 }
417
418 //- Return list of processor patch labels
419 // (size of list = number of processor patches)
420 const labelList& processorPatches() const noexcept
421 {
422 return processorPatches_;
423 }
424
425 //- Return list of indices into processorPatches_ for each patch.
426 // Index = -1 for non-processor parches.
427 // (size of list = number of patches)
429 {
430 return processorPatchIndices_;
431 }
432
433 //- Return processorPatchIndices of the neighbours
434 //- processor patches. -1 if not running parallel.
436 {
437 return processorPatchNeighbours_;
438 }
440
441 // Globally shared point addressing
442
443 //- Return number of globally shared points
444 label nGlobalPoints() const;
445
446 //- Return indices of local points that are globally shared
447 const labelList& sharedPointLabels() const;
449 //- Return addressing into the complete globally shared points
450 //- list
451 // Note: It is assumed that a (never constructed) complete
452 // list of globally shared points exists. The set of shared
453 // points on the current processor is a subset of all shared
454 // points. Shared point addressing gives the index in the
455 // list of all globally shared points for each of the locally
456 // shared points.
458
459 //- Return shared point global labels. Tries to read
460 //- 'pointProcAddressing' and returns list or -1 if none
461 //- available.
462 const labelList& sharedPointGlobalLabels() const;
463
464 //- Collect coordinates of shared points on all processors.
465 //- (does parallel communication!)
466 // Note: not valid for cyclicParallel since shared cyclic points
467 // are merged into single global point. (use geometricSharedPoints
468 // instead)
469 pointField sharedPoints() const;
470
471 //- Like sharedPoints but keeps cyclic points separate.
472 //- (does geometric merging; uses matchTol_*bb as merging tolerance)
473 //- Use sharedPoints() instead.
475
476
477
478 // Globally shared edge addressing
479
480 //- Return number of globally shared edges.
481 // Demand-driven
482 // calculation so call needs to be synchronous among processors!
483 label nGlobalEdges() const;
484
485 //- Return indices of local edges that are globally shared.
486 // Demand-driven
487 // calculation so call needs to be synchronous among processors!
488 const labelList& sharedEdgeLabels() const;
489
490 //- Return addressing into the complete globally shared edge list.
491 // The set of shared
492 // edges on the current processor is a subset of all shared
493 // edges. Shared edge addressing gives the index in the
494 // list of all globally shared edges for each of the locally
495 // shared edges.
496 // Demand-driven
497 // calculation so call needs to be synchronous among processors!
498 const labelList& sharedEdgeAddr() const;
499
500
501
502 // Global master - slave point communication
503
504 //- Return patch of all coupled faces
506
507 //- Return map from coupledPatch edges to mesh edges
508 const labelList& coupledPatchMeshEdges() const;
509
510 //- Return map from mesh edges to coupledPatch edges
512
513 //- Global transforms numbering
515
516 //- Helper: synchronise data with transforms
517 template<class Type, class CombineOp, class TransformOp>
518 static void syncData
519 (
520 List<Type>& elems,
521 const labelListList& slaves,
522 const labelListList& transformedSlaves,
523 const mapDistribute& slavesMap,
525 const CombineOp& cop,
526 const TransformOp& top
527 );
528
529 //- Helper: synchronise data without transforms
530 template<class Type, class CombineOp>
531 static void syncData
533 List<Type>& elems,
534 const labelListList& slaves,
535 const labelListList& transformedSlaves,
536 const mapDistribute& slavesMap,
537 const CombineOp& cop
538 );
539
540
541 // Coupled point to coupled points. Coupled points are
542 // points on any coupled patch.
543
544 //- Numbering of coupled points is according to coupledPatch.
545 const globalIndex& globalPointNumbering() const;
546 const labelListList& globalPointSlaves() const;
548 const mapDistribute& globalPointSlavesMap() const;
549 //- Helper to synchronise coupled patch point data
550 template<class Type, class CombineOp, class TransformOp>
551 void syncPointData
552 (
553 List<Type>& pointData,
554 const CombineOp& cop,
555 const TransformOp& top
556 ) const;
557
558 // Coupled edge to coupled edges.
559
560 const globalIndex& globalEdgeNumbering() const;
561 const labelListList& globalEdgeSlaves() const;
563 const mapDistribute& globalEdgeSlavesMap() const;
564 //- Is my edge same orientation as master edge
565 const bitSet& globalEdgeOrientation() const;
566
567 // Collocated point to collocated point
568
569 const labelListList& globalCoPointSlaves() const;
571
572 // Coupled point to boundary faces. These are uncoupled boundary
573 // faces only but include empty patches.
574
575 //- Numbering of boundary faces is face-mesh.nInternalFaces()
579 const;
581
582 // Coupled point to boundary cell
583
584 //- From boundary cell to mesh cell
585 const labelList& boundaryCells() const;
586
587 //- Numbering of boundary cells is according to boundaryCells()
591 const;
593
594
595 // Other
596
597 //- Helper for merging (collocated!) mesh point data.
598 // Determines:
599 // - my unique indices
600 // - global numbering over all unique indices
601 // - the global number for all local points (so this will
602 // be local for my unique points)
604 (
605 labelList& pointToGlobal,
606 labelList& uniquePoints
607 ) const;
608
609 //- Helper for merging (collocated!) patch point data.
610 // Takes maps from:
611 // local points to/from mesh. Determines
612 // - my unique points. These are mesh point indices, not patch
613 // point indices.
614 // - global numbering over all unique indices.
615 // - the global number for all local points.
617 (
618 const labelUList& meshPoints,
619 const Map<label>& meshPointMap,
620 labelList& pointToGlobal,
621 labelList& uniqueMeshPoints
622 ) const;
623
624
625 // Edit
626
627 //- Update for moving points.
628 void movePoints(const pointField& newPoints);
629
630 //- Change global mesh data given a topological change. Does a
631 // full parallel analysis to determine shared points and
632 // boundaries.
633 void updateMesh();
634
635
636 // Mesh Topology Calculation
637
638 //- Determine (local or global) cellCells from mesh agglomeration.
639 // Agglomeration is local to the processor.
640 //
641 // - parallel = false
642 // Resulting connections are in local cell indices.
643 // Coupled across cyclics but not processor patches.
644 // - parallel = true
645 // Resulting connections are in global cell indices.
646 // Coupled across cyclics and processor patches.
647 static void calcCellCells
648 (
649 const polyMesh& mesh,
652 const labelUList& agglom,
654 const label nLocalCoarse,
656 const bool parallel,
658 CompactListList<label>& cellCells
659 );
660
661 //- Determine (local or global) cellCells and face weights
662 //- from mesh agglomeration.
663 // Uses mag of faceArea as weights
664 static void calcCellCells
665 (
666 const polyMesh& mesh,
669 const labelUList& agglom,
671 const label nLocalCoarse,
673 const bool parallel,
675 CompactListList<label>& cellCells,
677 CompactListList<scalar>& cellCellWeights
678 );
679
680 //- Determine (local or global) mesh connectivity
681 //
682 // - parallel = false
683 // Resulting connections are in local cell indices.
684 // Coupled across cyclics but not processor patches.
685 // - parallel = true
686 // Resulting connections are in global cell indices.
687 // Coupled across cyclics and processor patches.
688 static void calcCellCells
689 (
690 const polyMesh& mesh,
692 CompactListList<label>& cellCells,
694 const bool parallel = false
695 );
696
697 //- Determine (local or global) sub-mesh connectivity
698 //
699 // - parallel = false
700 // Resulting connections are in local cell indices.
701 // Coupled across cyclics but not processor patches.
702 // - parallel = true
703 // Resulting connections are in global cell indices.
704 // Coupled across cyclics and processor patches.
705 //
706 // \return the cellMap
708 (
709 const polyMesh& mesh,
711 const bitSet& selectedCells,
713 CompactListList<label>& cellCells,
715 const bool parallel = false
716 );
717
718 //- Determine (local or global) sub-mesh connectivity
719 //
720 // - parallel = false
721 // Resulting connections are in local cell indices.
722 // Coupled across cyclics but not processor patches.
723 // - parallel = true
724 // Resulting connections are in global cell indices.
725 // Coupled across cyclics and processor patches.
726 //
727 // \return the cellMap
729 (
730 const polyMesh& mesh,
732 const labelUList& selectedCells,
734 CompactListList<label>& cellCells,
736 const bool parallel = false
737 );
738};
739
740
741// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
742
743} // End namespace Foam
744
745// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
746
747#ifdef NoRepository
749#endif
750
751
752// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
753
754#endif
755
756// ************************************************************************* //
A packed storage of objects of type <T> using an offset table for access.
Map from edge (expressed as its endpoints) to value. Hashing (and ==) on an edge is symmetric.
Definition edgeHashes.H:59
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
A HashTable to objects of type <T> with a label key.
Definition Map.H:54
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition bitSet.H:61
Determination and storage of the possible independent transforms introduced by coupledPolyPatches,...
Calculates a non-overlapping list of offsets based on an input size (eg, number of cells) from differ...
Definition globalIndex.H:77
label totalSize() const noexcept
The total addressed size, which corresponds to the end offset and also the sum of all localSizes.
const mapDistribute & globalCoPointSlavesMap() const
void movePoints(const pointField &newPoints)
Update for moving points.
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points list.
const globalIndex & globalMeshCellAddr() const noexcept
Global numbering for mesh cells.
const bitSet & globalEdgeOrientation() const
Is my edge same orientation as master edge.
const labelListList & globalPointTransformedBoundaryCells() const
globalMeshData(const globalMeshData &)=delete
No copy construct.
const labelListList & globalEdgeTransformedSlaves() const
const Map< label > & coupledPatchMeshEdgeMap() const
Return map from mesh edges to coupledPatch edges.
const labelList & sharedEdgeAddr() const
Return addressing into the complete globally shared edge list.
pointField geometricSharedPoints() const
Like sharedPoints but keeps cyclic points separate. (does geometric merging; uses matchTol_*bb as mer...
const labelList & processorPatches() const noexcept
Return list of processor patch labels.
static const Foam::scalar matchTol_
Geometric tolerance (fraction of bounding box).
const labelList & processorPatchIndices() const noexcept
Return list of indices into processorPatches_ for each patch.
label nGlobalPoints() const
Return number of globally shared points.
const mapDistribute & globalPointBoundaryCellsMap() const
const lduSchedule & patchSchedule() const noexcept
Order in which the patches should be initialised/evaluated corresponding to the schedule.
const mapDistribute & globalPointBoundaryFacesMap() const
bool parallel() const noexcept
Does the mesh contain processor patches? (also valid when not running parallel).
const mapDistribute & globalPointSlavesMap() const
const labelList & processorPatchNeighbours() const noexcept
Return processorPatchIndices of the neighbours processor patches. -1 if not running parallel.
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
const labelListList & globalPointTransformedBoundaryFaces() const
const labelList & boundaryCells() const
From boundary cell to mesh cell.
const labelListList & globalPointBoundaryFaces() const
const mapDistribute & globalEdgeSlavesMap() const
const globalIndex & globalBoundaryFaceNumbering() const
Numbering of boundary faces is face-mesh.nInternalFaces().
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.
void operator=(const globalMeshData &)=delete
No copy assignment.
ClassName("globalMeshData")
Runtime type information.
label nGlobalEdges() const
Return number of globally shared edges.
const labelList & coupledPatchMeshEdges() const
Return map from coupledPatch edges to mesh edges.
~globalMeshData()
Destructor.
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
const labelList & sharedPointGlobalLabels() const
Return shared point global labels. Tries to read 'pointProcAddressing' and returns list or -1 if none...
const labelListList & globalCoPointSlaves() const
const globalIndex & globalMeshPointAddr() const noexcept
Global numbering for mesh points. Not compensated for duplicate points!
void syncPointData(List< Type > &pointData, const CombineOp &cop, const TransformOp &top) const
Helper to synchronise coupled patch point data.
pointField sharedPoints() const
Collect coordinates of shared points on all processors. (does parallel communication!...
label nTotalFaces() const noexcept
Total global number of mesh faces. Not compensated for duplicate faces!
const globalIndex & globalBoundaryCellNumbering() const
Numbering of boundary cells is according to boundaryCells().
const labelListList & globalPointSlaves() const
const globalIndex & globalEdgeNumbering() const
static void calcCellCells(const polyMesh &mesh, const labelUList &agglom, const label nLocalCoarse, const bool parallel, CompactListList< label > &cellCells)
Determine (local or global) cellCells from mesh agglomeration.
const polyMesh & mesh() const noexcept
Return the mesh reference.
const globalIndexAndTransform & globalTransforms() const
Global transforms numbering.
const labelList & sharedEdgeLabels() const
Return indices of local edges that are globally shared.
label nTotalPoints() const noexcept
Total global number of mesh points. Not compensated for duplicate points!
const labelListList & globalPointTransformedSlaves() const
const indirectPrimitivePatch & coupledPatch() const
Return patch of all coupled faces.
label nTotalCells() const noexcept
Total global number of mesh cells.
void updateMesh()
Change global mesh data given a topological change. Does a.
const labelListList & globalPointBoundaryCells() const
void clearOut()
Remove all demand driven data.
const globalIndex & globalMeshFaceAddr() const noexcept
Global numbering for mesh faces. Not compensated for duplicate faces!
const labelListList & globalEdgeSlaves() const
const processorTopology & topology() const noexcept
The processor to processor topology.
const globalIndex & globalPointNumbering() const
Numbering of coupled points is according to coupledPatch.
Class containing processor-to-processor mapping information.
Mesh consisting of general polyhedral cells.
Definition polyMesh.H:79
Determines/represents processor-processor connection. After instantiation contains the processor-proc...
const lduSchedule & patchSchedule() const noexcept
Order in which the patches should be initialised/evaluated corresponding to the schedule.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
Definition className.H:74
dynamicFvMesh & mesh
Namespace for OpenFOAM.
Pair< label > labelPair
A pair of labels.
Definition Pair.H:54
List< labelPair > labelPairList
List of labelPair.
Definition labelPair.H:33
List< labelList > labelListList
List of labelList.
Definition labelList.H:38
List< label > labelList
A List of labels.
Definition List.H:62
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
Definition lduSchedule.H:46
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
const direction noexcept
Definition scalarImpl.H:265
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
Definition UList.H:75