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 | Copyright (C) 2011-2013 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::globalMeshData
26 
27 Description
28  Various mesh related information for a parallel run. Upon construction,
29  constructs all info using parallel communication.
30 
31  Requires:
32  - all processor patches to have correct ordering.
33  - all processorPatches to have their transforms set.
34 
35  The shared point and edge addressing calculates addressing for points
36  and edges on coupled patches. In the 'old' way a distinction was made
37  between points/edges that are only on two processors and those that are
38  on multiple processors. The problem is that those on multiple processors
39  do not allow any transformations and require a global reduction on the
40  master processor.
41 
42  The alternative is to have an exchange schedule (through a 'mapDistribute')
43  which sends all point/edge data (no distinction is made between
44  those on two and those on more than two coupled patches) to the local
45  'master'. This master then does any calculation and sends
46  the result back to the 'slave' points/edges. This only needs to be done
47  on points on coupled faces. Any transformation is done using a
48  predetermined set of transformations - since transformations have to be
49  space filling only a certain number of transformation is supported.
50 
51  The exchange needs
52  - a field of data
53  - a mapDistribute which does all parallel exchange and transformations
54  This appends remote data to the end of the field.
55  - a set of indices which indicate where to get untransformed data in the
56  field
57  - a set of indices which indicate where to get transformed data in the
58  field
59 
60 Note
61  - compared to 17x nTotalFaces, nTotalPoints do not compensate for
62  shared points since this would trigger full connectivity analysis
63  - most calculation is demand driven and uses parallel communication
64  so make sure to invoke on all processors at the same time
65  - old sharedEdge calculation: currently an edge is considered shared
66  if it uses two shared points and is used more than once. This is not
67  correct on processor patches but it only slightly overestimates the number
68  of shared edges. Doing full analysis of how many patches use the edge
69  would be too complicated
70 
71 SeeAlso
72  mapDistribute
73  globalIndexAndTransform
74 
75 
76 SourceFiles
77  globalMeshData.C
78  globalMeshDataTemplates.C
79 
80 \*---------------------------------------------------------------------------*/
81 
82 #ifndef globalMeshData_H
83 #define globalMeshData_H
84 
85 #include "processorTopology.H"
86 #include "labelPair.H"
87 #include "indirectPrimitivePatch.H"
88 
89 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
90 
91 namespace Foam
92 {
93 
94 // Forward declaration of friend functions and operators
95 
96 class polyMesh;
97 class mapDistribute;
98 template<class T> class EdgeMap;
99 class globalIndex;
100 class globalIndexAndTransform;
101 class PackedBoolList;
102 
103 /*---------------------------------------------------------------------------*\
104  Class globalMeshData Declaration
105 \*---------------------------------------------------------------------------*/
106 
107 class globalMeshData
108 :
109  public processorTopology
110 {
111 
112  // Private data
113 
114  //- Reference to mesh
115  const polyMesh& mesh_;
116 
117 
118  // Data related to the complete mesh
119 
120  //- Total number of points in the complete mesh
122 
123  //- Total number of faces in the complete mesh
125 
126  //- Total number of cells in the complete mesh
128 
129 
130  // Processor patch addressing (be careful if not running in parallel!)
131 
132  //- List of processor patch labels
133  // (size of list = number of processor patches)
135 
136  //- List of indices into processorPatches_ for each patch.
137  // Index = -1 for non-processor patches.
138  // (size of list = number of patches)
140 
141  //- processorPatchIndices_ of the neighbours processor patches
143 
144 
145  // Coupled point addressing
146  // This is addressing from coupled point to coupled points/faces/cells.
147  // This is a full schedule so includes points used by only two
148  // coupled patches.
149 
150  //- Patch of coupled faces. Additional patch edge to mesh edges
151  // correspondence:
152  // points: meshPoints(), meshPointMap()
153  // edges : meshEdges(), meshEdgeMap()
157 
158  //- Global numbering for coupledPatch points
160 
161  //- Global numbering for transforms
163 
164  // Coupled point to coupled points
165 
169 
170  // Coupled edge to coupled edges
171 
177 
178 
179  // Coupled point to boundary faces
180 
186 
187  // Coupled point to boundary cells
188 
195 
196 
197  // Other: coupled point to coupled COLLOCATED points
200 
201 
202 
203  // Globally shared point addressing
204 
205  //- Total number of global points
206  mutable label nGlobalPoints_;
207 
208  //- Indices of local points that are globally shared
210 
211  //- Indices of globally shared points in the master list
212  // This list contains all the shared points in the mesh
214 
215  //- Shared point global labels.
216  // Global point index for every local shared point.
217  // Only valid if constructed with this information or if
218  // pointProcAddressing read.
220 
221 
222  // Globally shared edge addressing. Derived from shared points.
223  // All demand driven since don't want to construct edges always.
224 
225  //- Total number of global edges
226  mutable label nGlobalEdges_;
227 
228  //- Indices of local edges that are globally shared
230 
231  //- Indices of globally shared edge in the master list
232  // This list contains all the shared edges in the mesh
234 
235 
236  // Private Member Functions
237 
238  //- Set up processor patch addressing
239  void initProcAddr();
240 
241  //- Helper function for shared edge addressing
242  static void countSharedEdges
243  (
244  const EdgeMap<labelList>&,
246  label&
247  );
248 
249  //- Calculate shared point addressing
250  void calcSharedPoints() const;
251 
252  //- Calculate shared edge addressing
253  void calcSharedEdges() const;
254 
255  //- Calculate global point addressing.
256  void calcGlobalPointSlaves() const;
257 
258  // Global edge addressing
259 
260  //- Calculate connected points
262 
263  //- Calculate pointEdges and pointPoints addressing
265  (
266  labelListList& globalPointEdges,
267  List<labelPairList>& globalPointPoints
268  ) const;
269 
270  //- Look up remote and local point and find using info the
271  // transforms to go from remotePoint to localPoint
273  (
274  const labelPairList& info,
275  const labelPair& remotePoint,
276  const label localPoint
277  ) const;
278 
279  //- Calculate global edge addressing.
280  void calcGlobalEdgeSlaves() const;
281 
282  //- Calculate orientation w.r.t. edge master.
283  void calcGlobalEdgeOrientation() const;
284 
285 
286  // Global boundary face/cell addressing
287 
288  //- Calculate coupled point to uncoupled boundary faces. Local only.
290 
291  //- Calculate global point to global boundary face addressing.
292  void calcGlobalPointBoundaryFaces() const;
293 
294  //- Calculate global point to global boundary cell addressing.
295  void calcGlobalPointBoundaryCells() const;
296 
297  // Other
298 
299  // Point to collocated points. Note that not all points on
300  // coupled patches now have a master! (since points on either
301  // side of a cyclic are not connected). So check whether the map
302  // reaches all points and decide who is master, slave and who is
303  // its own master. Maybe store as well?
304 
305  void calcGlobalCoPointSlaves() const;
306 
307 
308  //- Disallow default bitwise copy construct
310 
311  //- Disallow default bitwise assignment
312  void operator=(const globalMeshData&);
313 
314 
315 public:
316 
317  // Public class
318 
319  // To combineReduce a List. Just appends all lists.
320  template<class T>
321  class ListPlusEqOp
322  {
323 
324  public:
325 
326  void operator()(T& x, const T& y) const
327  {
328  label n = x.size();
329 
330  x.setSize(x.size() + y.size());
331 
332  forAll(y, i)
333  {
334  x[n++] = y[i];
335  }
336  }
337  };
338 
339 
340  //- Runtime type information
341  ClassName("globalMeshData");
342 
343 
344  // Static data members
345 
346  //- Geometric tolerance (fraction of bounding box)
347  static const Foam::scalar matchTol_;
348 
349 
350  // Constructors
351 
352  //- Construct from mesh, derive rest (does parallel communication!)
353  globalMeshData(const polyMesh& mesh);
354 
355 
356  //- Destructor
357  ~globalMeshData();
358 
359  //- Remove all demand driven data
360  void clearOut();
361 
362 
363  // Member Functions
364 
365  // Access
366 
367  //- Return the mesh reference
368  const polyMesh& mesh() const
369  {
370  return mesh_;
371  }
372 
373  //- Does the mesh contain processor patches? (also valid when
374  // not running parallel)
375  bool parallel() const
376  {
377  return processorPatches_.size() > 0;
378  }
379 
380  //- Return total number of points in decomposed mesh. Not
381  // compensated for duplicate points!
382  label nTotalPoints() const
383  {
384  return nTotalPoints_;
385  }
386 
387  //- Return total number of faces in decomposed mesh. Not
388  // compensated for duplicate faces!
389  label nTotalFaces() const
390  {
391  return nTotalFaces_;
392  }
393 
394  //- Return total number of cells in decomposed mesh.
395  label nTotalCells() const
396  {
397  return nTotalCells_;
398  }
399 
400 
401  // Processor patch addressing (be careful when not running in parallel)
402 
403  //- Return list of processor patch labels
404  // (size of list = number of processor patches)
405  const labelList& processorPatches() const
406  {
407  return processorPatches_;
408  }
409 
410  //- Return list of indices into processorPatches_ for each patch.
411  // Index = -1 for non-processor parches.
412  // (size of list = number of patches)
413  const labelList& processorPatchIndices() const
414  {
415  return processorPatchIndices_;
416  }
417 
418  //- Return processorPatchIndices of the neighbours
419  // processor patches. -1 if not running parallel.
420  const labelList& processorPatchNeighbours() const
421  {
423  }
424 
425 
426  // Globally shared point addressing
427 
428  //- Return number of globally shared points
429  label nGlobalPoints() const;
430 
431  //- Return indices of local points that are globally shared
432  const labelList& sharedPointLabels() const;
433 
434  //- Return addressing into the complete globally shared points
435  // list
436  // Note: It is assumed that a (never constructed) complete
437  // list of globally shared points exists. The set of shared
438  // points on the current processor is a subset of all shared
439  // points. Shared point addressing gives the index in the
440  // list of all globally shared points for each of the locally
441  // shared points.
442  const labelList& sharedPointAddr() const;
443 
444  //- Return shared point global labels. Tries to read
445  // 'pointProcAddressing' and returns list or -1 if none
446  // available.
447  const labelList& sharedPointGlobalLabels() const;
448 
449  //- Collect coordinates of shared points on all processors.
450  // (does parallel communication!)
451  // Note: not valid for cyclicParallel since shared cyclic points
452  // are merged into single global point. (use geometricSharedPoints
453  // instead)
454  pointField sharedPoints() const;
455 
456  //- Like sharedPoints but keeps cyclic points separate.
457  // (does geometric merging; uses matchTol_*bb as merging tolerance)
458  // Use sharedPoints() instead.
460 
461 
462 
463  // Globally shared edge addressing
464 
465  //- Return number of globally shared edges. Demand-driven
466  // calculation so call needs to be synchronous among processors!
467  label nGlobalEdges() const;
468 
469  //- Return indices of local edges that are globally shared.
470  // Demand-driven
471  // calculation so call needs to be synchronous among processors!
472  const labelList& sharedEdgeLabels() const;
473 
474  //- Return addressing into the complete globally shared edge
475  // list. The set of shared
476  // edges on the current processor is a subset of all shared
477  // edges. Shared edge addressing gives the index in the
478  // list of all globally shared edges for each of the locally
479  // shared edges.
480  // Demand-driven
481  // calculation so call needs to be synchronous among processors!
482  const labelList& sharedEdgeAddr() const;
483 
484 
485 
486  // Global master - slave point communication
487 
488  //- Return patch of all coupled faces
489  const indirectPrimitivePatch& coupledPatch() const;
490 
491  //- Return map from coupledPatch edges to mesh edges
492  const labelList& coupledPatchMeshEdges() const;
493 
494  //- Return map from mesh edges to coupledPatch edges
495  const Map<label>& coupledPatchMeshEdgeMap() const;
496 
497  //- Global transforms numbering
499 
500  //- Helper: synchronise data with transforms
501  template<class Type, class CombineOp, class TransformOp>
502  static void syncData
503  (
505  const labelListList& slaves,
506  const labelListList& transformedSlaves,
507  const mapDistribute& slavesMap,
509  const CombineOp& cop,
510  const TransformOp& top
511  );
512 
513  //- Helper: synchronise data without transforms
514  template<class Type, class CombineOp>
515  static void syncData
516  (
518  const labelListList& slaves,
519  const labelListList& transformedSlaves,
520  const mapDistribute& slavesMap,
521  const CombineOp& cop
522  );
523 
524 
525  // Coupled point to coupled points. Coupled points are
526  // points on any coupled patch.
527 
528  //- Numbering of coupled points is according to coupledPatch.
529  const globalIndex& globalPointNumbering() const;
530  const labelListList& globalPointSlaves() const;
532  const mapDistribute& globalPointSlavesMap() const;
533  //- Helper to synchronise coupled patch point data
534  template<class Type, class CombineOp, class TransformOp>
535  void syncPointData
536  (
538  const CombineOp& cop,
539  const TransformOp& top
540  ) const;
541 
542  // Coupled edge to coupled edges.
543 
544  const globalIndex& globalEdgeNumbering() const;
545  const labelListList& globalEdgeSlaves() const;
547  const mapDistribute& globalEdgeSlavesMap() const;
548  //- Is my edge same orientation as master edge
549  const PackedBoolList& globalEdgeOrientation() const;
550 
551  // Collocated point to collocated point
552 
553  const labelListList& globalCoPointSlaves() const;
554  const mapDistribute& globalCoPointSlavesMap() const;
555 
556  // Coupled point to boundary faces. These are uncoupled boundary
557  // faces only but include empty patches.
558 
559  //- Numbering of boundary faces is face-mesh.nInternalFaces()
563  const;
565 
566  // Coupled point to boundary cell
567 
568  //- From boundary cell to mesh cell
569  const labelList& boundaryCells() const;
570 
571  //- Numbering of boundary cells is according to boundaryCells()
575  const;
577 
578 
579  // Other
580 
581  //- Helper for merging (collocated!) mesh point data.
582  // Determines:
583  // - my unique indices
584  // - global numbering over all unique indices
585  // - the global number for all local points (so this will
586  // be local for my unique points)
588  (
589  labelList& pointToGlobal,
590  labelList& uniquePoints
591  ) const;
592 
593  //- Helper for merging (collocated!) patch point data.
594  // Takes maps from:
595  // local points to/from mesh. Determines
596  // - my unique points. These are mesh point indices, not patch
597  // point indices.
598  // - global numbering over all unique indices.
599  // - the global number for all local points.
601  (
602  const labelList& meshPoints,
603  const Map<label>& meshPointMap,
604  labelList& pointToGlobal,
605  labelList& uniqueMeshPoints
606  ) const;
607 
608 
609  // Edit
610 
611  //- Update for moving points.
612  void movePoints(const pointField& newPoints);
613 
614  //- Change global mesh data given a topological change. Does a
615  // full parallel analysis to determine shared points and
616  // boundaries.
617  void updateMesh();
618 };
619 
620 
621 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
622 
623 } // End namespace Foam
624 
625 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
626 
627 #ifdef NoRepository
628 # include "globalMeshDataTemplates.C"
629 #endif
630 
631 
632 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
633 
634 #endif
635 
636 // ************************************************************************* //
Foam::globalMeshData::processorPatches_
labelList processorPatches_
List of processor patch labels.
Definition: globalMeshData.H:133
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:42
Foam::globalMeshData::boundaryCellsPtr_
autoPtr< labelList > boundaryCellsPtr_
Definition: globalMeshData.H:188
Foam::globalMeshData::globalPointTransformedSlaves
const labelListList & globalPointTransformedSlaves() const
Definition: globalMeshData.C:2180
Foam::globalMeshData::globalCoPointSlavesMap
const mapDistribute & globalCoPointSlavesMap() const
Definition: globalMeshData.C:2363
Foam::globalMeshData::globalEdgeNumberingPtr_
autoPtr< globalIndex > globalEdgeNumberingPtr_
Definition: globalMeshData.H:171
Foam::PackedBoolList
A bit-packed bool list.
Definition: PackedBoolList.H:63
Foam::globalMeshData::globalPointBoundaryCellsPtr_
autoPtr< labelListList > globalPointBoundaryCellsPtr_
Definition: globalMeshData.H:190
Foam::globalMeshData::globalPointSlaves
const labelListList & globalPointSlaves() const
Definition: globalMeshData.C:2170
Foam::globalMeshData::globalBoundaryFaceNumbering
const globalIndex & globalBoundaryFaceNumbering() const
Numbering of boundary faces is face-mesh.nInternalFaces()
Definition: globalMeshData.C:2255
Foam::globalMeshData::nGlobalPoints_
label nGlobalPoints_
Total number of global points.
Definition: globalMeshData.H:205
Foam::globalMeshData::countSharedEdges
static void countSharedEdges(const EdgeMap< labelList > &, EdgeMap< label > &, label &)
Helper function for shared edge addressing.
Definition: globalMeshData.C:256
Foam::labelList
List< label > labelList
A List of labels.
Definition: labelList.H:56
Foam::globalMeshData::globalPointBoundaryCellsMap
const mapDistribute & globalPointBoundaryCellsMap() const
Definition: globalMeshData.C:2342
Foam::globalMeshData::coupledPatchMeshEdgeMap
const Map< label > & coupledPatchMeshEdgeMap() const
Return map from mesh edges to coupledPatch edges.
Definition: globalMeshData.C:2127
Foam::globalMeshData::globalPointSlavesPtr_
autoPtr< labelListList > globalPointSlavesPtr_
Definition: globalMeshData.H:165
Foam::globalMeshData::calcGlobalEdgeSlaves
void calcGlobalEdgeSlaves() const
Calculate global edge addressing.
Definition: globalMeshData.C:867
Foam::globalMeshData::mesh
const polyMesh & mesh() const
Return the mesh reference.
Definition: globalMeshData.H:367
Foam::globalMeshData::matchTol_
static const Foam::scalar matchTol_
Geometric tolerance (fraction of bounding box)
Definition: globalMeshData.H:346
Foam::globalMeshData::globalEdgeSlavesMap
const mapDistribute & globalEdgeSlavesMap() const
Definition: globalMeshData.C:2245
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::globalMeshData::coupledPatchMeshEdgesPtr_
autoPtr< labelList > coupledPatchMeshEdgesPtr_
Definition: globalMeshData.H:154
Foam::globalMeshData::processorPatches
const labelList & processorPatches() const
Return list of processor patch labels.
Definition: globalMeshData.H:404
Foam::globalMeshData::parallel
bool parallel() const
Does the mesh contain processor patches? (also valid when.
Definition: globalMeshData.H:374
Foam::globalMeshData::coupledPatchMeshEdgeMapPtr_
autoPtr< Map< label > > coupledPatchMeshEdgeMapPtr_
Definition: globalMeshData.H:155
Foam::globalMeshData::sharedPointGlobalLabels
const labelList & sharedPointGlobalLabels() const
Return shared point global labels. Tries to read.
Definition: globalMeshData.C:1824
Foam::globalMeshData::globalBoundaryCellNumbering
const globalIndex & globalBoundaryCellNumbering() const
Numbering of boundary cells is according to boundaryCells()
Definition: globalMeshData.C:2309
Foam::globalMeshData::sharedEdgeAddr
const labelList & sharedEdgeAddr() const
Return addressing into the complete globally shared edge.
Definition: globalMeshData.C:2036
Foam::globalMeshData::sharedPointAddrPtr_
autoPtr< labelList > sharedPointAddrPtr_
Indices of globally shared points in the master list.
Definition: globalMeshData.H:212
Foam::globalMeshData::nGlobalEdges_
label nGlobalEdges_
Total number of global edges.
Definition: globalMeshData.H:225
Foam::globalMeshData::nTotalPoints
label nTotalPoints() const
Return total number of points in decomposed mesh. Not.
Definition: globalMeshData.H:381
Foam::indirectPrimitivePatch
PrimitivePatch< face, IndirectList, const pointField & > indirectPrimitivePatch
Foam::indirectPrimitivePatch.
Definition: indirectPrimitivePatch.H:45
Foam::globalMeshData::globalPointBoundaryCells
const labelListList & globalPointBoundaryCells() const
Definition: globalMeshData.C:2320
Foam::globalMeshData::globalPointTransformedBoundaryFacesPtr_
autoPtr< labelListList > globalPointTransformedBoundaryFacesPtr_
Definition: globalMeshData.H:183
Foam::globalMeshData::nTotalCells
label nTotalCells() const
Return total number of cells in decomposed mesh.
Definition: globalMeshData.H:394
Foam::globalMeshData::sharedEdgeLabels
const labelList & sharedEdgeLabels() const
Return indices of local edges that are globally shared.
Definition: globalMeshData.C:2026
Foam::globalMeshData::globalCoPointSlavesPtr_
autoPtr< labelListList > globalCoPointSlavesPtr_
Definition: globalMeshData.H:197
Foam::Map< label >
Foam::globalMeshData::calcGlobalPointBoundaryCells
void calcGlobalPointBoundaryCells() const
Calculate global point to global boundary cell addressing.
Definition: globalMeshData.C:1475
Foam::pointData
Variant of pointEdgePoint with some transported additional data. WIP - should be templated on data li...
Definition: pointData.H:53
Foam::globalMeshData::nTotalFaces
label nTotalFaces() const
Return total number of faces in decomposed mesh. Not.
Definition: globalMeshData.H:388
Foam::globalMeshData::processorPatchIndices
const labelList & processorPatchIndices() const
Return list of indices into processorPatches_ for each patch.
Definition: globalMeshData.H:412
Foam::globalMeshData::clearOut
void clearOut()
Remove all demand driven data.
Definition: globalMeshData.C:1771
Foam::globalMeshData::globalPointTransformedSlavesPtr_
autoPtr< labelListList > globalPointTransformedSlavesPtr_
Definition: globalMeshData.H:166
Foam::globalMeshData::globalPointSlavesMap
const mapDistribute & globalPointSlavesMap() const
Definition: globalMeshData.C:2191
Foam::globalMeshData::sharedPointLabelsPtr_
autoPtr< labelList > sharedPointLabelsPtr_
Indices of local points that are globally shared.
Definition: globalMeshData.H:208
Foam::globalMeshData::globalPointBoundaryFacesPtr_
autoPtr< labelListList > globalPointBoundaryFacesPtr_
Definition: globalMeshData.H:181
Foam::globalMeshData::calcSharedEdges
void calcSharedEdges() const
Calculate shared edge addressing.
Definition: globalMeshData.C:301
Foam::globalMeshData::ListPlusEqOp
Definition: globalMeshData.H:320
Foam::globalMeshData::nGlobalEdges
label nGlobalEdges() const
Return number of globally shared edges. Demand-driven.
Definition: globalMeshData.C:2016
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::globalMeshData::globalMeshData
globalMeshData(const globalMeshData &)
Disallow default bitwise copy construct.
Foam::globalMeshData::boundaryCells
const labelList & boundaryCells() const
From boundary cell to mesh cell.
Definition: globalMeshData.C:2299
Foam::globalMeshData::operator=
void operator=(const globalMeshData &)
Disallow default bitwise assignment.
Foam::globalMeshData::globalBoundaryFaceNumberingPtr_
autoPtr< globalIndex > globalBoundaryFaceNumberingPtr_
Definition: globalMeshData.H:180
Foam::globalMeshData::mergePoints
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
Definition: globalMeshData.C:2374
processorTopology.H
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::globalMeshData::initProcAddr
void initProcAddr()
Set up processor patch addressing.
Definition: globalMeshData.C:67
Foam::globalMeshData::globalPointTransformedBoundaryFaces
const labelListList & globalPointTransformedBoundaryFaces() const
Definition: globalMeshData.C:2278
Foam::globalMeshData::nGlobalPoints
label nGlobalPoints() const
Return number of globally shared points.
Definition: globalMeshData.C:1986
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
Foam::globalMeshData::nTotalCells_
label nTotalCells_
Total number of cells in the complete mesh.
Definition: globalMeshData.H:126
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::globalMeshData::sharedEdgeAddrPtr_
autoPtr< labelList > sharedEdgeAddrPtr_
Indices of globally shared edge in the master list.
Definition: globalMeshData.H:232
Foam::globalMeshData::globalEdgeOrientation
const PackedBoolList & globalEdgeOrientation() const
Is my edge same orientation as master edge.
Definition: globalMeshData.C:2235
Foam::globalMeshData::globalTransforms
const globalIndexAndTransform & globalTransforms() const
Global transforms numbering.
Definition: globalMeshData.C:2160
Foam::globalMeshData::calcGlobalEdgeOrientation
void calcGlobalEdgeOrientation() const
Calculate orientation w.r.t. edge master.
Definition: globalMeshData.C:1082
Foam::globalMeshData::coupledPatchMeshEdges
const labelList & coupledPatchMeshEdges() const
Return map from coupledPatch edges to mesh edges.
Definition: globalMeshData.C:2107
Foam::mapDistribute
Class containing processor-to-processor mapping information.
Definition: mapDistribute.H:152
Foam::globalMeshData::globalPointBoundaryCellsMapPtr_
autoPtr< mapDistribute > globalPointBoundaryCellsMapPtr_
Definition: globalMeshData.H:193
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
Foam::globalMeshData::globalCoPointSlavesMapPtr_
autoPtr< mapDistribute > globalCoPointSlavesMapPtr_
Definition: globalMeshData.H:198
Foam::globalMeshData::sharedPointGlobalLabelsPtr_
autoPtr< labelList > sharedPointGlobalLabelsPtr_
Shared point global labels.
Definition: globalMeshData.H:218
Foam::ProcessorTopology
Determines processor-processor connection. After instantiation contains on all processors the process...
Definition: ProcessorTopology.H:56
Foam::globalMeshData::globalEdgeSlaves
const labelListList & globalEdgeSlaves() const
Definition: globalMeshData.C:2214
Foam::globalMeshData::globalPointNumbering
const globalIndex & globalPointNumbering() const
Numbering of coupled points is according to coupledPatch.
Definition: globalMeshData.C:2146
Foam::globalMeshData::globalPointBoundaryFaces
const labelListList & globalPointBoundaryFaces() const
Definition: globalMeshData.C:2266
Foam::globalMeshData::globalEdgeOrientationPtr_
autoPtr< PackedBoolList > globalEdgeOrientationPtr_
Definition: globalMeshData.H:174
Foam::globalMeshData::syncData
static void syncData(List< Type > &pointData, const labelListList &slaves, const labelListList &transformedSlaves, const mapDistribute &slavesMap, const globalIndexAndTransform &, const CombineOp &cop, const TransformOp &top)
Helper: synchronise data with transforms.
Definition: globalMeshDataTemplates.C:34
Foam::globalMeshData::calcGlobalPointBoundaryFaces
void calcGlobalPointBoundaryFaces() const
Calculate global point to global boundary face addressing.
Definition: globalMeshData.C:1283
Foam::globalMeshData
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
Definition: globalMeshData.H:106
Foam::globalMeshData::globalPointBoundaryFacesMapPtr_
autoPtr< mapDistribute > globalPointBoundaryFacesMapPtr_
Definition: globalMeshData.H:184
Foam::globalMeshData::calcSharedPoints
void calcSharedPoints() const
Calculate shared point addressing.
Definition: globalMeshData.C:134
Foam::globalMeshData::movePoints
void movePoints(const pointField &newPoints)
Update for moving points.
Definition: globalMeshData.C:2722
Foam::globalMeshData::calcGlobalPointSlaves
void calcGlobalPointSlaves() const
Calculate global point addressing.
Definition: globalMeshData.C:531
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::globalMeshData::calcPointConnectivity
void calcPointConnectivity(List< labelPairList > &) const
Calculate connected points.
Definition: globalMeshData.C:569
Foam::globalIndex
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:63
Foam::globalMeshData::processorPatchNeighbours
const labelList & processorPatchNeighbours() const
Return processorPatchIndices of the neighbours.
Definition: globalMeshData.H:419
Foam::globalMeshData::globalPointTransformedBoundaryCellsPtr_
autoPtr< labelListList > globalPointTransformedBoundaryCellsPtr_
Definition: globalMeshData.H:192
Foam::globalMeshData::globalBoundaryCellNumberingPtr_
autoPtr< globalIndex > globalBoundaryCellNumberingPtr_
Definition: globalMeshData.H:189
Foam::globalMeshData::globalTransformsPtr_
autoPtr< globalIndexAndTransform > globalTransformsPtr_
Global numbering for transforms.
Definition: globalMeshData.H:161
Foam::globalMeshData::calcPointBoundaryFaces
void calcPointBoundaryFaces(labelListList &) const
Calculate coupled point to uncoupled boundary faces. Local only.
Definition: globalMeshData.C:1205
Foam::globalMeshData::ClassName
ClassName("globalMeshData")
Runtime type information.
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::globalMeshData::globalEdgeNumbering
const globalIndex & globalEdgeNumbering() const
Definition: globalMeshData.C:2201
Foam::labelListList
List< labelList > labelListList
A List of labelList.
Definition: labelList.H:57
Foam::EdgeMap
Map from edge (expressed as its endpoints) to value.
Definition: EdgeMap.H:47
Foam::globalMeshData::~globalMeshData
~globalMeshData()
Destructor.
Definition: globalMeshData.C:1765
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
Foam::globalMeshData::globalEdgeTransformedSlaves
const labelListList & globalEdgeTransformedSlaves() const
Definition: globalMeshData.C:2224
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::globalMeshData::coupledPatch
const indirectPrimitivePatch & coupledPatch() const
Return patch of all coupled faces.
Definition: globalMeshData.C:2046
Foam::globalMeshData::globalPointTransformedBoundaryCells
const labelListList & globalPointTransformedBoundaryCells() const
Definition: globalMeshData.C:2332
Foam::globalMeshData::calcGlobalCoPointSlaves
void calcGlobalCoPointSlaves() const
Definition: globalMeshData.C:1702
Foam::globalMeshData::coupledPatchPtr_
autoPtr< indirectPrimitivePatch > coupledPatchPtr_
Patch of coupled faces. Additional patch edge to mesh edges.
Definition: globalMeshData.H:153
Foam::globalMeshData::processorPatchIndices_
labelList processorPatchIndices_
List of indices into processorPatches_ for each patch.
Definition: globalMeshData.H:138
Foam::globalMeshData::nTotalPoints_
label nTotalPoints_
Total number of points in the complete mesh.
Definition: globalMeshData.H:120
Foam::globalMeshData::mesh_
const polyMesh & mesh_
Reference to mesh.
Definition: globalMeshData.H:114
Foam::globalMeshData::globalPointSlavesMapPtr_
autoPtr< mapDistribute > globalPointSlavesMapPtr_
Definition: globalMeshData.H:167
x
x
Definition: LISASMDCalcMethod2.H:52
globalMeshDataTemplates.C
Foam::globalMeshData::globalPointNumberingPtr_
autoPtr< globalIndex > globalPointNumberingPtr_
Global numbering for coupledPatch points.
Definition: globalMeshData.H:158
Foam::globalMeshData::sharedPointLabels
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
Definition: globalMeshData.C:1996
Foam::globalMeshData::sharedPointAddr
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points.
Definition: globalMeshData.C:2006
Foam::globalMeshData::globalEdgeSlavesMapPtr_
autoPtr< mapDistribute > globalEdgeSlavesMapPtr_
Definition: globalMeshData.H:175
List
Definition: Test.C:19
Foam::globalMeshData::sharedEdgeLabelsPtr_
autoPtr< labelList > sharedEdgeLabelsPtr_
Indices of local edges that are globally shared.
Definition: globalMeshData.H:228
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::globalMeshData::nTotalFaces_
label nTotalFaces_
Total number of faces in the complete mesh.
Definition: globalMeshData.H:123
Foam::globalMeshData::sharedPoints
pointField sharedPoints() const
Collect coordinates of shared points on all processors.
Definition: globalMeshData.C:1875
Foam::globalIndexAndTransform
Determination and storage of the possible independent transforms introduced by coupledPolyPatches,...
Definition: globalIndexAndTransform.H:60
Foam::globalMeshData::calcGlobalPointEdges
void calcGlobalPointEdges(labelListList &globalPointEdges, List< labelPairList > &globalPointPoints) const
Calculate pointEdges and pointPoints addressing.
Definition: globalMeshData.C:650
Foam::globalMeshData::geometricSharedPoints
pointField geometricSharedPoints() const
Like sharedPoints but keeps cyclic points separate.
Definition: globalMeshData.C:1958
Foam::globalMeshData::findTransform
label findTransform(const labelPairList &info, const labelPair &remotePoint, const label localPoint) const
Look up remote and local point and find using info the.
Definition: globalMeshData.C:812
Foam::globalMeshData::globalEdgeTransformedSlavesPtr_
autoPtr< labelListList > globalEdgeTransformedSlavesPtr_
Definition: globalMeshData.H:173
Foam::globalMeshData::globalPointBoundaryFacesMap
const mapDistribute & globalPointBoundaryFacesMap() const
Definition: globalMeshData.C:2288
Foam::globalMeshData::ListPlusEqOp::operator()
void operator()(T &x, const T &y) const
Definition: globalMeshData.H:325
Foam::globalMeshData::globalEdgeSlavesPtr_
autoPtr< labelListList > globalEdgeSlavesPtr_
Definition: globalMeshData.H:172
Foam::globalMeshData::globalCoPointSlaves
const labelListList & globalCoPointSlaves() const
Definition: globalMeshData.C:2353
Foam::globalMeshData::syncPointData
void syncPointData(List< Type > &pointData, const CombineOp &cop, const TransformOp &top) const
Helper to synchronise coupled patch point data.
Definition: globalMeshDataTemplates.C:172
y
scalar y
Definition: LISASMDCalcMethod1.H:14
labelPair.H
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatchTemplate.H:88
Foam::globalMeshData::processorPatchNeighbours_
labelList processorPatchNeighbours_
processorPatchIndices_ of the neighbours processor patches
Definition: globalMeshData.H:141
Foam::globalMeshData::updateMesh
void updateMesh()
Change global mesh data given a topological change. Does a.
Definition: globalMeshData.C:2732