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-2021 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 globalMeshData_H
85 #define 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 EdgeMap;
100 class globalIndex;
101 class globalIndexAndTransform;
102 class bitSet;
103 
104 /*---------------------------------------------------------------------------*\
105  Class globalMeshData Declaration
106 \*---------------------------------------------------------------------------*/
107 
108 class globalMeshData
109 :
110  public processorTopology
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
121  label nTotalPoints_;
122 
123  //- Total number of faces in the complete mesh
124  label nTotalFaces_;
125 
126  //- Total number of cells in the complete mesh
127  label nTotalCells_;
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)
134  labelList processorPatches_;
135 
136  //- List of indices into processorPatches_ for each patch.
137  // Index = -1 for non-processor patches.
138  // (size of list = number of patches)
139  labelList processorPatchIndices_;
140 
141  //- processorPatchIndices_ of the neighbours processor patches
142  labelList processorPatchNeighbours_;
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()
154  mutable autoPtr<indirectPrimitivePatch> coupledPatchPtr_;
155  mutable autoPtr<labelList> coupledPatchMeshEdgesPtr_;
156  mutable autoPtr<Map<label>> coupledPatchMeshEdgeMapPtr_;
157 
158  //- Global numbering for coupledPatch points
159  mutable autoPtr<globalIndex> globalPointNumberingPtr_;
160 
161  //- Global numbering for transforms
162  mutable autoPtr<globalIndexAndTransform> globalTransformsPtr_;
163 
164  // Coupled point to coupled points
165 
166  mutable autoPtr<labelListList> globalPointSlavesPtr_;
167  mutable autoPtr<labelListList> globalPointTransformedSlavesPtr_;
168  mutable autoPtr<mapDistribute> globalPointSlavesMapPtr_;
169 
170  // Coupled edge to coupled edges
171 
172  mutable autoPtr<globalIndex> globalEdgeNumberingPtr_;
173  mutable autoPtr<labelListList> globalEdgeSlavesPtr_;
174  mutable autoPtr<labelListList> globalEdgeTransformedSlavesPtr_;
175  mutable autoPtr<bitSet> globalEdgeOrientationPtr_;
176  mutable autoPtr<mapDistribute> globalEdgeSlavesMapPtr_;
177 
178 
179  // Coupled point to boundary faces
180 
181  mutable autoPtr<globalIndex> globalBoundaryFaceNumberingPtr_;
182  mutable autoPtr<labelListList> globalPointBoundaryFacesPtr_;
183  mutable autoPtr<labelListList>
184  globalPointTransformedBoundaryFacesPtr_;
185  mutable autoPtr<mapDistribute> globalPointBoundaryFacesMapPtr_;
186 
187  // Coupled point to boundary cells
188 
189  mutable autoPtr<labelList> boundaryCellsPtr_;
190  mutable autoPtr<globalIndex> globalBoundaryCellNumberingPtr_;
191  mutable autoPtr<labelListList> globalPointBoundaryCellsPtr_;
192  mutable autoPtr<labelListList>
193  globalPointTransformedBoundaryCellsPtr_;
194  mutable autoPtr<mapDistribute> globalPointBoundaryCellsMapPtr_;
195 
196 
197  // Other: coupled point to coupled COLLOCATED points
198  mutable autoPtr<labelListList> globalCoPointSlavesPtr_;
199  mutable autoPtr<mapDistribute> globalCoPointSlavesMapPtr_;
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
209  mutable autoPtr<labelList> sharedPointLabelsPtr_;
210 
211  //- Indices of globally shared points in the master list
212  // This list contains all the shared points in the mesh
213  mutable autoPtr<labelList> sharedPointAddrPtr_;
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.
219  mutable autoPtr<labelList> sharedPointGlobalLabelsPtr_;
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
229  mutable autoPtr<labelList> sharedEdgeLabelsPtr_;
230 
231  //- Indices of globally shared edge in the master list
232  // This list contains all the shared edges in the mesh
233  mutable autoPtr<labelList> sharedEdgeAddrPtr_;
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
261  void calcPointConnectivity(List<labelPairList>&) const;
262 
263  //- Calculate pointEdges and pointPoints addressing
264  void calcGlobalPointEdges
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
272  label findTransform
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.
289  void calcPointBoundaryFaces(labelListList&) const;
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  //- No copy construct
309  globalMeshData(const globalMeshData&) = delete;
310 
311  //- No copy assignment
312  void operator=(const globalMeshData&) = delete;
313 
314 
315 public:
316 
317  //- Runtime type information
318  ClassName("globalMeshData");
319 
320 
321  // Static data members
322 
323  //- Geometric tolerance (fraction of bounding box)
324  static const Foam::scalar matchTol_;
325 
326 
327  // Constructors
328 
329  //- Construct from mesh, derive rest (does parallel communication!)
330  globalMeshData(const polyMesh& mesh);
331 
332 
333  //- Destructor
334  ~globalMeshData();
335 
336  //- Remove all demand driven data
337  void clearOut();
338 
339 
340  // Member Functions
341 
342  // Access
343 
344  //- Return the mesh reference
345  const polyMesh& mesh() const noexcept
346  {
347  return mesh_;
348  }
349 
350  //- Does the mesh contain processor patches? (also valid when
351  // not running parallel)
352  bool parallel() const
353  {
354  return !processorPatches_.empty();
355  }
356 
357  //- Return total number of points in decomposed mesh. Not
358  // compensated for duplicate points!
359  label nTotalPoints() const noexcept
360  {
361  return nTotalPoints_;
362  }
363 
364  //- Return total number of faces in decomposed mesh. Not
365  // compensated for duplicate faces!
366  label nTotalFaces() const noexcept
367  {
368  return nTotalFaces_;
369  }
370 
371  //- Return total number of cells in decomposed mesh.
372  label nTotalCells() const noexcept
373  {
374  return nTotalCells_;
375  }
376 
377 
378  // Processor patch addressing (be careful when not running in parallel)
379 
380  //- Return list of processor patch labels
381  // (size of list = number of processor patches)
382  const labelList& processorPatches() const noexcept
383  {
384  return processorPatches_;
385  }
386 
387  //- Return list of indices into processorPatches_ for each patch.
388  // Index = -1 for non-processor parches.
389  // (size of list = number of patches)
390  const labelList& processorPatchIndices() const noexcept
391  {
392  return processorPatchIndices_;
393  }
394 
395  //- Return processorPatchIndices of the neighbours
396  // processor patches. -1 if not running parallel.
397  const labelList& processorPatchNeighbours() const noexcept
398  {
399  return processorPatchNeighbours_;
400  }
401 
402 
403  // Globally shared point addressing
404 
405  //- Return number of globally shared points
406  label nGlobalPoints() const;
407 
408  //- Return indices of local points that are globally shared
409  const labelList& sharedPointLabels() const;
410 
411  //- Return addressing into the complete globally shared points
412  // list
413  // Note: It is assumed that a (never constructed) complete
414  // list of globally shared points exists. The set of shared
415  // points on the current processor is a subset of all shared
416  // points. Shared point addressing gives the index in the
417  // list of all globally shared points for each of the locally
418  // shared points.
419  const labelList& sharedPointAddr() const;
420 
421  //- Return shared point global labels. Tries to read
422  // 'pointProcAddressing' and returns list or -1 if none
423  // available.
424  const labelList& sharedPointGlobalLabels() const;
425 
426  //- Collect coordinates of shared points on all processors.
427  // (does parallel communication!)
428  // Note: not valid for cyclicParallel since shared cyclic points
429  // are merged into single global point. (use geometricSharedPoints
430  // instead)
431  pointField sharedPoints() const;
432 
433  //- Like sharedPoints but keeps cyclic points separate.
434  // (does geometric merging; uses matchTol_*bb as merging tolerance)
435  // Use sharedPoints() instead.
437 
438 
439 
440  // Globally shared edge addressing
441 
442  //- Return number of globally shared edges. Demand-driven
443  // calculation so call needs to be synchronous among processors!
444  label nGlobalEdges() const;
445 
446  //- Return indices of local edges that are globally shared.
447  // Demand-driven
448  // calculation so call needs to be synchronous among processors!
449  const labelList& sharedEdgeLabels() const;
450 
451  //- Return addressing into the complete globally shared edge
452  // list. The set of shared
453  // edges on the current processor is a subset of all shared
454  // edges. Shared edge addressing gives the index in the
455  // list of all globally shared edges for each of the locally
456  // shared edges.
457  // Demand-driven
458  // calculation so call needs to be synchronous among processors!
459  const labelList& sharedEdgeAddr() const;
460 
461 
462 
463  // Global master - slave point communication
464 
465  //- Return patch of all coupled faces
466  const indirectPrimitivePatch& coupledPatch() const;
467 
468  //- Return map from coupledPatch edges to mesh edges
469  const labelList& coupledPatchMeshEdges() const;
470 
471  //- Return map from mesh edges to coupledPatch edges
472  const Map<label>& coupledPatchMeshEdgeMap() const;
473 
474  //- Global transforms numbering
476 
477  //- Helper: synchronise data with transforms
478  template<class Type, class CombineOp, class TransformOp>
479  static void syncData
480  (
481  List<Type>& elems,
482  const labelListList& slaves,
483  const labelListList& transformedSlaves,
484  const mapDistribute& slavesMap,
486  const CombineOp& cop,
487  const TransformOp& top
488  );
489 
490  //- Helper: synchronise data without transforms
491  template<class Type, class CombineOp>
492  static void syncData
493  (
494  List<Type>& elems,
495  const labelListList& slaves,
496  const labelListList& transformedSlaves,
497  const mapDistribute& slavesMap,
498  const CombineOp& cop
499  );
500 
501 
502  // Coupled point to coupled points. Coupled points are
503  // points on any coupled patch.
504 
505  //- Numbering of coupled points is according to coupledPatch.
506  const globalIndex& globalPointNumbering() const;
507  const labelListList& globalPointSlaves() const;
509  const mapDistribute& globalPointSlavesMap() const;
510  //- Helper to synchronise coupled patch point data
511  template<class Type, class CombineOp, class TransformOp>
512  void syncPointData
513  (
514  List<Type>& pointData,
515  const CombineOp& cop,
516  const TransformOp& top
517  ) const;
518 
519  // Coupled edge to coupled edges.
520 
521  const globalIndex& globalEdgeNumbering() const;
522  const labelListList& globalEdgeSlaves() const;
524  const mapDistribute& globalEdgeSlavesMap() const;
525  //- Is my edge same orientation as master edge
526  const bitSet& globalEdgeOrientation() const;
527 
528  // Collocated point to collocated point
529 
530  const labelListList& globalCoPointSlaves() const;
531  const mapDistribute& globalCoPointSlavesMap() const;
532 
533  // Coupled point to boundary faces. These are uncoupled boundary
534  // faces only but include empty patches.
535 
536  //- Numbering of boundary faces is face-mesh.nInternalFaces()
540  const;
542 
543  // Coupled point to boundary cell
544 
545  //- From boundary cell to mesh cell
546  const labelList& boundaryCells() const;
547 
548  //- Numbering of boundary cells is according to boundaryCells()
552  const;
554 
555 
556  // Other
557 
558  //- Helper for merging (collocated!) mesh point data.
559  // Determines:
560  // - my unique indices
561  // - global numbering over all unique indices
562  // - the global number for all local points (so this will
563  // be local for my unique points)
565  (
566  labelList& pointToGlobal,
567  labelList& uniquePoints
568  ) const;
569 
570  //- Helper for merging (collocated!) patch point data.
571  // Takes maps from:
572  // local points to/from mesh. Determines
573  // - my unique points. These are mesh point indices, not patch
574  // point indices.
575  // - global numbering over all unique indices.
576  // - the global number for all local points.
578  (
579  const labelList& meshPoints,
580  const Map<label>& meshPointMap,
581  labelList& pointToGlobal,
582  labelList& uniqueMeshPoints
583  ) const;
584 
585 
586  // Edit
587 
588  //- Update for moving points.
589  void movePoints(const pointField& newPoints);
590 
591  //- Change global mesh data given a topological change. Does a
592  // full parallel analysis to determine shared points and
593  // boundaries.
594  void updateMesh();
595 
596 
597  // Housekeeping
598 
599  //- Deprecated(2020-09) use ListOps::appendEqOp
600  // Uses a different template parameter
601  // \code
602  // globalMeshData::ListPlusEqOp<labelList>()
603  // ListOps::appendEqOp<label>()
604  // \endcode
605  //
606  // \deprecated(2020-09) - use ListOps::appendEqOp
607  template<class T>
608  struct ListPlusEqOp
609  {
610  FOAM_DEPRECATED_FOR(2020-09, "ListOps::appendEqOp")
611  void operator()(T& x, const T& y) const
612  {
613  label n = x.size();
614 
615  x.setSize(x.size() + y.size());
616 
617  forAll(y, i)
618  {
619  x[n++] = y[i];
620  }
621  }
622  };
623 };
624 
625 
626 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
627 
628 } // End namespace Foam
629 
630 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
631 
632 #ifdef NoRepository
633  #include "globalMeshDataTemplates.C"
634 #endif
635 
636 
637 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
638 
639 #endif
640 
641 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:44
Foam::globalMeshData::globalPointTransformedSlaves
const labelListList & globalPointTransformedSlaves() const
Definition: globalMeshData.C:2180
Foam::globalMeshData::globalCoPointSlavesMap
const mapDistribute & globalCoPointSlavesMap() const
Definition: globalMeshData.C:2363
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::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::bitSet
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition: bitSet.H:63
Foam::globalMeshData::matchTol_
static const Foam::scalar matchTol_
Geometric tolerance (fraction of bounding box)
Definition: globalMeshData.H:323
Foam::globalMeshData::globalEdgeSlavesMap
const mapDistribute & globalEdgeSlavesMap() const
Definition: globalMeshData.C:2245
Foam::globalMeshData::parallel
bool parallel() const
Does the mesh contain processor patches? (also valid when.
Definition: globalMeshData.H:351
Foam::globalMeshData::sharedPointGlobalLabels
const labelList & sharedPointGlobalLabels() const
Return shared point global labels. Tries to read.
Definition: globalMeshData.C:1828
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::globalPointBoundaryCells
const labelListList & globalPointBoundaryCells() const
Definition: globalMeshData.C:2320
Foam::globalMeshData::sharedEdgeLabels
const labelList & sharedEdgeLabels() const
Return indices of local edges that are globally shared.
Definition: globalMeshData.C:2026
Foam::Map< label >
Foam::globalMeshData::clearOut
void clearOut()
Remove all demand driven data.
Definition: globalMeshData.C:1776
Foam::globalMeshData::globalPointSlavesMap
const mapDistribute & globalPointSlavesMap() const
Definition: globalMeshData.C:2191
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:77
Foam::globalMeshData::boundaryCells
const labelList & boundaryCells() const
From boundary cell to mesh cell.
Definition: globalMeshData.C:2299
Foam::globalMeshData::processorPatches
const labelList & processorPatches() const noexcept
Return list of processor patch labels.
Definition: globalMeshData.H:381
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:296
Foam::globalMeshData::mergePoints
autoPtr< globalIndex > mergePoints(labelList &pointToGlobal, labelList &uniquePoints) const
Helper for merging (collocated!) mesh point data.
Definition: globalMeshData.C:2374
Foam::globalMeshData::globalEdgeOrientation
const bitSet & globalEdgeOrientation() const
Is my edge same orientation as master edge.
Definition: globalMeshData.C:2235
processorTopology.H
n
label n
Definition: TABSMDCalcMethod2.H:31
Foam::globalMeshData::globalPointTransformedBoundaryFaces
const labelListList & globalPointTransformedBoundaryFaces() const
Definition: globalMeshData.C:2278
Foam::globalMeshData::ListPlusEqOp
Deprecated(2020-09) use ListOps::appendEqOp.
Definition: globalMeshData.H:607
Foam::globalMeshData::nGlobalPoints
label nGlobalPoints() const
Return number of globally shared points.
Definition: globalMeshData.C:1986
Foam::Field< vector >
Foam::globalMeshData::processorPatchIndices
const labelList & processorPatchIndices() const noexcept
Return list of indices into processorPatches_ for each patch.
Definition: globalMeshData.H:389
Foam::globalMeshData::globalTransforms
const globalIndexAndTransform & globalTransforms() const
Global transforms numbering.
Definition: globalMeshData.C:2160
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:163
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::ProcessorTopology
Determines processor-processor connection. After instantiation contains on all processors the process...
Definition: ProcessorTopology.H:58
Foam::globalMeshData::globalEdgeSlaves
const labelListList & globalEdgeSlaves() const
Definition: globalMeshData.C:2214
Foam::globalMeshData::syncData
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.
Definition: globalMeshDataTemplates.C:37
Foam::globalMeshData::globalPointNumbering
const globalIndex & globalPointNumbering() const
Numbering of coupled points is according to coupledPatch.
Definition: globalMeshData.C:2146
indirectPrimitivePatch.H
Foam::globalMeshData::globalPointBoundaryFaces
const labelListList & globalPointBoundaryFaces() const
Definition: globalMeshData.C:2266
Foam::globalMeshData
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
Definition: globalMeshData.H:107
Foam::globalMeshData::movePoints
void movePoints(const pointField &newPoints)
Update for moving points.
Definition: globalMeshData.C:2722
Foam::globalMeshData::nTotalPoints
label nTotalPoints() const noexcept
Return total number of points in decomposed mesh. Not.
Definition: globalMeshData.H:358
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::globalIndex
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
Definition: globalIndex.H:68
Foam::indirectPrimitivePatch
PrimitivePatch< IndirectList< face >, const pointField & > indirectPrimitivePatch
A PrimitivePatch with an IndirectList for the faces, const reference for the point field.
Definition: indirectPrimitivePatch.H:49
Foam::globalMeshData::ClassName
ClassName("globalMeshData")
Runtime type information.
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::globalMeshData::globalEdgeNumbering
const globalIndex & globalEdgeNumbering() const
Definition: globalMeshData.C:2201
Foam::labelListList
List< labelList > labelListList
A List of labelList.
Definition: labelList.H:56
Foam::EdgeMap
Map from edge (expressed as its endpoints) to value. For easier forward declaration it is currently i...
Definition: EdgeMap.H:51
Foam::globalMeshData::~globalMeshData
~globalMeshData()
Destructor.
Definition: globalMeshData.C:1770
Foam::Pair< label >
Foam::globalMeshData::globalEdgeTransformedSlaves
const labelListList & globalEdgeTransformedSlaves() const
Definition: globalMeshData.C:2224
Foam::List< label >
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
x
x
Definition: LISASMDCalcMethod2.H:52
globalMeshDataTemplates.C
Foam::FOAM_DEPRECATED_FOR
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
Definition: NamedEnum.H:69
Foam::globalMeshData::sharedPointLabels
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
Definition: globalMeshData.C:1996
Foam::globalMeshData::nTotalCells
label nTotalCells() const noexcept
Return total number of cells in decomposed mesh.
Definition: globalMeshData.H:371
Foam::globalMeshData::sharedPointAddr
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points.
Definition: globalMeshData.C:2006
Foam::globalMeshData::sharedPoints
pointField sharedPoints() const
Collect coordinates of shared points on all processors.
Definition: globalMeshData.C:1879
Foam::globalIndexAndTransform
Determination and storage of the possible independent transforms introduced by coupledPolyPatches,...
Definition: globalIndexAndTransform.H:64
Foam::globalMeshData::geometricSharedPoints
pointField geometricSharedPoints() const
Like sharedPoints but keeps cyclic points separate.
Definition: globalMeshData.C:1958
Foam::globalMeshData::globalPointBoundaryFacesMap
const mapDistribute & globalPointBoundaryFacesMap() const
Definition: globalMeshData.C:2288
Foam::globalMeshData::processorPatchNeighbours
const labelList & processorPatchNeighbours() const noexcept
Return processorPatchIndices of the neighbours.
Definition: globalMeshData.H:396
Foam::globalMeshData::mesh
const polyMesh & mesh() const noexcept
Return the mesh reference.
Definition: globalMeshData.H:344
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:159
Foam::globalMeshData::nTotalFaces
label nTotalFaces() const noexcept
Return total number of faces in decomposed mesh. Not.
Definition: globalMeshData.H:365
y
scalar y
Definition: LISASMDCalcMethod1.H:14
labelPair.H
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatch.H:79
Foam::globalMeshData::updateMesh
void updateMesh()
Change global mesh data given a topological change. Does a.
Definition: globalMeshData.C:2731