GAMGAgglomeration.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) 2019-2020 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::GAMGAgglomeration
29 
30 Description
31  Geometric agglomerated algebraic multigrid agglomeration class.
32 
33 SourceFiles
34  GAMGAgglomeration.C
35  GAMGAgglomerationTemplates.C
36  GAMGAgglomerateLduAddressing.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef GAMGAgglomeration_H
41 #define GAMGAgglomeration_H
42 
43 #include "MeshObject.H"
44 #include "lduPrimitiveMesh.H"
45 #include "lduInterfacePtrsList.H"
46 #include "primitiveFields.H"
47 #include "runTimeSelectionTables.H"
48 
49 #include "boolList.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 class lduMesh;
57 class lduMatrix;
58 class mapDistribute;
59 class GAMGProcAgglomeration;
60 
61 /*---------------------------------------------------------------------------*\
62  Class GAMGAgglomeration Declaration
63 \*---------------------------------------------------------------------------*/
64 
66 :
67  public MeshObject<lduMesh, GeometricMeshObject, GAMGAgglomeration>
68 {
69 protected:
70 
71  // Protected data
72 
73  //- Max number of levels
74  const label maxLevels_;
75 
76  //- Number of cells in coarsest level
78 
79  //- Cached mesh interfaces
81 
83 
84  //- The number of cells in each level
86 
87  //- Cell restriction addressing array.
88  // Maps from the finer to the coarser level.
90 
91  //- The number of (coarse) faces in each level.
92  // max(faceRestrictAddressing)+1.
94 
95  //- Face restriction addressing array.
96  // Maps from the finer to the coarser level.
97  // Positive indices map the finer faces which form part of the boundary
98  // of the coarser cells to the corresponding coarser cell face.
99  // Negative indices map the finer faces which are internal to the
100  // coarser cells to minus the corresponding coarser cell index minus 1.
102 
103  //- Face flip: for faces mapped to internal faces stores whether
104  // the face is reversed or not. This is used to avoid having
105  // to access the coarse mesh at all when mapping
107 
108  //- The number of (coarse) patch faces in each level.
109  // max(patchFaceRestrictAddressing_)+1.
111 
112  //- Patch-local face restriction addressing array.
113  // Maps from the finer to the coarser level. Always positive.
114  // Extracted from GAMGInterfaces after agglomeration.
116 
117  //- Hierarchy of mesh addressing
119 
120 
121  // Processor agglomeration
122 
123  //- Per level, per processor the processor it agglomerates into
125 
126  //- Per level the set of processors to agglomerate. Element 0 is
127  // the 'master' of the cluster.
129 
130  //- Communicator for given level
132 
133  //- Mapping from processor to procMeshLevel cells
135 
136  //- Mapping from processor to procMeshLevel face
138 
139  //- Mapping from processor to procMeshLevel boundary
141 
142  //- Mapping from processor to procMeshLevel boundary face
144 
145 
146  // Protected Member Functions
147 
148  //- Assemble coarse mesh addressing
149  void agglomerateLduAddressing(const label fineLevelIndex);
150 
151  //- Combine a level with the previous one
152  void combineLevels(const label curLevel);
153 
154  //- Shrink the number of levels to that specified
155  void compactLevels(const label nCreatedLevels);
156 
157  //- Check the need for further agglomeration
159  (
160  const label nCells,
161  const label nCoarseCells
162  ) const;
163 
164  //- Gather value from all procIDs onto procIDs[0]
165  template<class Type>
166  static void gatherList
167  (
168  const label comm,
169  const labelList& procIDs,
170 
171  const Type& myVal,
172  List<Type>& allVals,
173  const int tag = Pstream::msgType()
174  );
175 
176  void clearLevel(const label leveli);
177 
178 
179  // Processor agglomeration
180 
181  //- Collect and combine processor meshes into allMesh:
182  //
183  // - allMeshComm : communicator for combined mesh.
184  // - procAgglomMap : per processor the new agglomerated
185  // processor (rank in allMeshComm!). Global information.
186  // - procIDs : local information: same for all in
187  // agglomerated processor.
189  (
190  const label comm,
191  const labelList& procAgglomMap,
192  const labelList& procIDs,
193  const label allMeshComm,
194  const label levelIndex
195  );
196 
197  //- Collect and combine basic restriction addressing:
198  //
199  // - nCells_
200  // - restrictAddressing_
202  (
203  const label comm,
204  const labelList& procIDs,
205  const label levelIndex
206  );
207 
208 
209  //- No copy construct
210  GAMGAgglomeration(const GAMGAgglomeration&) = delete;
211 
212  //- No copy assignment
213  void operator=(const GAMGAgglomeration&) = delete;
214 
215 
216 public:
217 
218  //- Declare friendship with GAMGProcAgglomeration
219  friend class GAMGProcAgglomeration;
220 
221  //- Runtime type information
222  TypeName("GAMGAgglomeration");
223 
224 
225  // Declare run-time constructor selection tables
226 
227  //- Runtime selection table for pure geometric agglomerators
229  (
230  autoPtr,
232  lduMesh,
233  (
234  const lduMesh& mesh,
235  const dictionary& controlDict
236  ),
237  (
238  mesh,
240  )
241  );
242 
243  //- Runtime selection table for matrix or mixed geometric/matrix
244  //- agglomerators
246  (
247  autoPtr,
249  lduMatrix,
250  (
251  const lduMatrix& matrix,
252  const dictionary& controlDict
253  ),
254  (
255  matrix,
257  )
258  );
259 
260  //- Runtime selection table for matrix or mixed geometric/matrix
261  //- agglomerators
263  (
264  autoPtr,
266  geometry,
267  (
268  const lduMesh& mesh,
269  const scalarField& cellVolumes,
270  const vectorField& faceAreas,
271  const dictionary& controlDict
272  ),
273  (
274  mesh,
275  cellVolumes,
276  faceAreas,
278  )
279  );
280 
281 
282  // Constructors
283 
284  //- Construct given mesh and controls
286  (
287  const lduMesh& mesh,
288  const dictionary& controlDict
289  );
290 
291 
292  // Selectors
293 
294  //- Return the selected geometric agglomerator
295  static const GAMGAgglomeration& New
296  (
297  const lduMesh& mesh,
298  const dictionary& controlDict
299  );
300 
301  //- Return the selected matrix agglomerator
302  static const GAMGAgglomeration& New
303  (
304  const lduMatrix& matrix,
305  const dictionary& controlDict
306  );
307 
308  //- Return the selected geometric agglomerator
309  static const GAMGAgglomeration& New
310  (
311  const lduMesh& mesh,
312  const scalarField& cellVolumes,
313  const vectorField& faceAreas,
314  const dictionary& controlDict
315  );
316 
317 
318  //- Destructor
320 
321 
322  // Member Functions
323 
324  // Access
325 
326  label size() const
327  {
328  return meshLevels_.size();
329  }
330 
331  //- Return LDU mesh of given level
332  const lduMesh& meshLevel(const label leveli) const;
333 
334  //- Do we have mesh for given level?
335  bool hasMeshLevel(const label leveli) const;
336 
337  //- Return LDU interface addressing of given level
339  (
340  const label leveli
341  ) const;
342 
343  //- Return cell restrict addressing of given level
344  const labelField& restrictAddressing(const label leveli) const
345  {
346  return restrictAddressing_[leveli];
347  }
348 
349  //- Return face restrict addressing of given level
350  const labelList& faceRestrictAddressing(const label leveli) const
351  {
352  return faceRestrictAddressing_[leveli];
353  }
354 
355  const labelListList& patchFaceRestrictAddressing(const label leveli)
356  const
357  {
358  return patchFaceRestrictAddressing_[leveli];
359  }
360 
361  //- Return face flip map of given level
362  const boolList& faceFlipMap(const label leveli) const
363  {
364  return faceFlipMap_[leveli];
365  }
366 
367  //- Return number of coarse cells (before processor agglomeration)
368  label nCells(const label leveli) const
369  {
370  return nCells_[leveli];
371  }
372 
373  //- Return number of coarse faces (before processor agglomeration)
374  label nFaces(const label leveli) const
375  {
376  return nFaces_[leveli];
377  }
378 
379  //- Return number of coarse patch faces (before processor
380  //- agglomeration)
381  const labelList& nPatchFaces(const label leveli) const
382  {
383  return nPatchFaces_[leveli];
384  }
385 
386 
387  // Restriction and prolongation
388 
389  //- Restrict (integrate by summation) cell field
390  template<class Type>
391  void restrictField
392  (
393  Field<Type>& cf,
394  const Field<Type>& ff,
395  const label fineLevelIndex,
396  const bool procAgglom
397  ) const;
398 
399  //- Restrict (integrate by summation) face field
400  template<class Type>
401  void restrictFaceField
402  (
403  Field<Type>& cf,
404  const Field<Type>& ff,
405  const label fineLevelIndex
406  ) const;
407 
408  //- Restrict (integrate by summation) cell field
409  template<class Type>
410  void restrictField
411  (
412  Field<Type>& cf,
413  const Field<Type>& ff,
414  const labelList& fineToCoarse
415  ) const;
416 
417  //- Prolong (interpolate by injection) cell field
418  template<class Type>
419  void prolongField
420  (
421  Field<Type>& ff,
422  const Field<Type>& cf,
423  const label coarseLevelIndex,
424  const bool procAgglom
425  ) const;
426 
427 
428  // Processor agglomeration. Note that the mesh and agglomeration is
429  // stored per fineLevel (even though it is the coarse level mesh that
430  // has been agglomerated). This is just for convenience and consistency
431  // with GAMGSolver notation.
432 
433  //- Given fine to coarse processor map determine:
434  //
435  // - for each coarse processor a master (minimum of the fine
436  // processors)
437  // - for each coarse processor the set of fine processors
438  // (element 0 is the master processor)
439  static void calculateRegionMaster
440  (
441  const label comm,
442  const labelList& procAgglomMap,
443  labelList& masterProcs,
445  );
446 
447  //- Whether to agglomerate across processors
448  bool processorAgglomerate() const
449  {
450  return bool(procAgglomeratorPtr_);
451  }
452 
453  //- Mapping from processor to agglomerated processor (global, all
454  //- processors have the same information). Note that level is
455  //- the fine, not the coarse, level index. This is to be
456  //- consistent with the way the restriction is stored
457  const labelList& procAgglomMap(const label fineLeveli) const;
458 
459  //- Set of processors to agglomerate. Element 0 is the
460  //- master processor. (local, same only on those processors that
461  //- agglomerate)
462  const labelList& agglomProcIDs(const label fineLeveli) const;
463 
464  //- Check that level has combined mesh
465  bool hasProcMesh(const label fineLeveli) const;
466 
467  //- Communicator for current level or -1
468  label procCommunicator(const label fineLeveli) const;
469 
470  //- Mapping from processor to procMesh cells
471  const labelList& cellOffsets(const label fineLeveli) const;
472 
473  //- Mapping from processor to procMesh face
474  const labelListList& faceMap(const label fineLeveli) const;
475 
476  //- Mapping from processor to procMesh boundary
477  const labelListList& boundaryMap(const label fineLeveli) const;
478 
479  //- Mapping from processor to procMesh boundary face
480  const labelListListList& boundaryFaceMap(const label fineLeveli)
481  const;
482 
483  //- Given restriction determines if coarse cells are connected.
484  // Return ok is so, otherwise creates new restriction that is
485  static bool checkRestriction
486  (
487  labelList& newRestrict,
488  label& nNewCoarse,
489  const lduAddressing& fineAddressing,
490  const labelUList& restriction,
491  const label nCoarse
492  );
493 };
494 
495 
496 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
497 
498 } // End namespace Foam
499 
500 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
501 
502 #ifdef NoRepository
504 #endif
505 
506 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
507 
508 #endif
509 
510 // ************************************************************************* //
Foam::lduAddressing
The class contains the addressing required by the lduMatrix: upper, lower and losort.
Definition: lduAddressing.H:114
Foam::GAMGAgglomeration::procFaceMap_
PtrList< labelListList > procFaceMap_
Mapping from processor to procMeshLevel face.
Definition: GAMGAgglomeration.H:136
Foam::GAMGAgglomeration::faceRestrictAddressing
const labelList & faceRestrictAddressing(const label leveli) const
Return face restrict addressing of given level.
Definition: GAMGAgglomeration.H:349
Foam::GAMGAgglomeration::procAgglomeratorPtr_
autoPtr< GAMGProcAgglomeration > procAgglomeratorPtr_
Definition: GAMGAgglomeration.H:81
boolList.H
Foam::GAMGAgglomeration::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, GAMGAgglomeration, lduMesh,(const lduMesh &mesh, const dictionary &controlDict),(mesh, controlDict))
Runtime selection table for pure geometric agglomerators.
Foam::GAMGAgglomeration
Geometric agglomerated algebraic multigrid agglomeration class.
Definition: GAMGAgglomeration.H:64
Foam::GAMGAgglomeration::nFaces
label nFaces(const label leveli) const
Return number of coarse faces (before processor agglomeration)
Definition: GAMGAgglomeration.H:373
Foam::GAMGAgglomeration::procAgglomerateRestrictAddressing
void procAgglomerateRestrictAddressing(const label comm, const labelList &procIDs, const label levelIndex)
Collect and combine basic restriction addressing:
Definition: GAMGAgglomerateLduAddressing.C:508
Foam::GAMGAgglomeration::nCells_
labelList nCells_
The number of cells in each level.
Definition: GAMGAgglomeration.H:84
Foam::lduMatrix
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Definition: lduMatrix.H:83
Foam::GAMGAgglomeration::meshLevel
const lduMesh & meshLevel(const label leveli) const
Return LDU mesh of given level.
Definition: GAMGAgglomeration.C:455
Foam::GAMGAgglomeration::patchFaceRestrictAddressing
const labelListList & patchFaceRestrictAddressing(const label leveli) const
Definition: GAMGAgglomeration.H:354
Foam::GAMGAgglomeration::faceMap
const labelListList & faceMap(const label fineLeveli) const
Mapping from processor to procMesh face.
Definition: GAMGAgglomeration.C:559
Foam::GAMGAgglomeration::operator=
void operator=(const GAMGAgglomeration &)=delete
No copy assignment.
Foam::GAMGAgglomeration::faceRestrictAddressing_
PtrList< labelList > faceRestrictAddressing_
Face restriction addressing array.
Definition: GAMGAgglomeration.H:100
Foam::GAMGAgglomeration::hasMeshLevel
bool hasMeshLevel(const label leveli) const
Do we have mesh for given level?
Definition: GAMGAgglomeration.C:470
Foam::GAMGAgglomeration::meshLevels_
PtrList< lduPrimitiveMesh > meshLevels_
Hierarchy of mesh addressing.
Definition: GAMGAgglomeration.H:117
primitiveFields.H
Specialisations of Field<T> for scalar, vector and tensor.
Foam::GAMGAgglomeration::restrictAddressing_
PtrList< labelField > restrictAddressing_
Cell restriction addressing array.
Definition: GAMGAgglomeration.H:88
Foam::GAMGAgglomeration::size
label size() const
Definition: GAMGAgglomeration.H:325
Foam::GAMGAgglomeration::cellOffsets
const labelList & cellOffsets(const label fineLeveli) const
Mapping from processor to procMesh cells.
Definition: GAMGAgglomeration.C:550
lduInterfacePtrsList.H
GAMGAgglomerationTemplates.C
Foam::GAMGAgglomeration::agglomerateLduAddressing
void agglomerateLduAddressing(const label fineLevelIndex)
Assemble coarse mesh addressing.
Definition: GAMGAgglomerateLduAddressing.C:37
Foam::GAMGAgglomeration::faceFlipMap
const boolList & faceFlipMap(const label leveli) const
Return face flip map of given level.
Definition: GAMGAgglomeration.H:361
Foam::GAMGAgglomeration::agglomProcIDs
const labelList & agglomProcIDs(const label fineLeveli) const
Definition: GAMGAgglomeration.C:529
Foam::GAMGAgglomeration::calculateRegionMaster
static void calculateRegionMaster(const label comm, const labelList &procAgglomMap, labelList &masterProcs, List< label > &agglomProcIDs)
Given fine to coarse processor map determine:
Definition: GAMGAgglomerateLduAddressing.C:737
Foam::GAMGAgglomeration::restrictAddressing
const labelField & restrictAddressing(const label leveli) const
Return cell restrict addressing of given level.
Definition: GAMGAgglomeration.H:343
Foam::GAMGAgglomeration::meshInterfaces_
const lduInterfacePtrsList meshInterfaces_
Cached mesh interfaces.
Definition: GAMGAgglomeration.H:79
Foam::GAMGAgglomeration::boundaryMap
const labelListList & boundaryMap(const label fineLeveli) const
Mapping from processor to procMesh boundary.
Definition: GAMGAgglomeration.C:568
Foam::GAMGAgglomeration::nCellsInCoarsestLevel_
label nCellsInCoarsestLevel_
Number of cells in coarsest level.
Definition: GAMGAgglomeration.H:76
Foam::GAMGAgglomeration::maxLevels_
const label maxLevels_
Max number of levels.
Definition: GAMGAgglomeration.H:73
Foam::Field< scalar >
Foam::GAMGAgglomeration::GAMGAgglomeration
GAMGAgglomeration(const GAMGAgglomeration &)=delete
No copy construct.
Foam::MeshObject< lduMesh, GeometricMeshObject, GAMGAgglomeration >::mesh
const lduMesh & mesh() const
Definition: MeshObject.H:122
Foam::GAMGAgglomeration::restrictFaceField
void restrictFaceField(Field< Type > &cf, const Field< Type > &ff, const label fineLevelIndex) const
Restrict (integrate by summation) face field.
Definition: GAMGAgglomerationTemplates.C:141
controlDict
runTime controlDict().readEntry("adjustTimeStep"
Definition: debug.C:143
Foam::GAMGAgglomeration::clearLevel
void clearLevel(const label leveli)
Definition: GAMGAgglomeration.C:499
Foam::UPtrList< const lduInterface >
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::GAMGAgglomeration::checkRestriction
static bool checkRestriction(labelList &newRestrict, label &nNewCoarse, const lduAddressing &fineAddressing, const labelUList &restriction, const label nCoarse)
Given restriction determines if coarse cells are connected.
Definition: GAMGAgglomeration.C:586
Foam::GAMGAgglomeration::gatherList
static void gatherList(const label comm, const labelList &procIDs, const Type &myVal, List< Type > &allVals, const int tag=Pstream::msgType())
Gather value from all procIDs onto procIDs[0].
Definition: GAMGAgglomerationTemplates.C:36
Foam::GAMGAgglomeration::nPatchFaces_
PtrList< labelList > nPatchFaces_
The number of (coarse) patch faces in each level.
Definition: GAMGAgglomeration.H:109
Foam::GAMGAgglomeration::nPatchFaces
const labelList & nPatchFaces(const label leveli) const
Definition: GAMGAgglomeration.H:380
Foam::GAMGAgglomeration::combineLevels
void combineLevels(const label curLevel)
Combine a level with the previous one.
Definition: GAMGAgglomerateLduAddressing.C:592
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::GAMGAgglomeration::procAgglomMap_
PtrList< labelList > procAgglomMap_
Per level, per processor the processor it agglomerates into.
Definition: GAMGAgglomeration.H:123
Foam::GAMGAgglomeration::TypeName
TypeName("GAMGAgglomeration")
Runtime type information.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::GAMGAgglomeration::New
static const GAMGAgglomeration & New(const lduMesh &mesh, const dictionary &controlDict)
Return the selected geometric agglomerator.
Definition: GAMGAgglomeration.C:293
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::fv::ff
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
Definition: CrankNicolsonDdtScheme.C:275
Foam::UPstream::msgType
static int & msgType() noexcept
Message tag of standard messages.
Definition: UPstream.H:540
Foam::GAMGAgglomeration::procAgglomMap
const labelList & procAgglomMap(const label fineLeveli) const
Definition: GAMGAgglomeration.C:520
Foam::GAMGAgglomeration::nFaces_
labelList nFaces_
The number of (coarse) faces in each level.
Definition: GAMGAgglomeration.H:92
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::GAMGAgglomeration::restrictField
void restrictField(Field< Type > &cf, const Field< Type > &ff, const label fineLevelIndex, const bool procAgglom) const
Restrict (integrate by summation) cell field.
Definition: GAMGAgglomerationTemplates.C:97
Foam::GAMGAgglomeration::interfaceLevel
const lduInterfacePtrsList & interfaceLevel(const label leveli) const
Return LDU interface addressing of given level.
Definition: GAMGAgglomeration.C:484
Foam::GAMGAgglomeration::procBoundaryMap_
PtrList< labelListList > procBoundaryMap_
Mapping from processor to procMeshLevel boundary.
Definition: GAMGAgglomeration.H:139
Foam::List< label >
Foam::GAMGAgglomeration::compactLevels
void compactLevels(const label nCreatedLevels)
Shrink the number of levels to that specified.
Definition: GAMGAgglomeration.C:51
Foam::UList< label >
bool
bool
Definition: EEqn.H:20
Foam::GAMGAgglomeration::boundaryFaceMap
const labelListListList & boundaryFaceMap(const label fineLeveli) const
Mapping from processor to procMesh boundary face.
Definition: GAMGAgglomeration.C:577
Foam::GAMGAgglomeration::prolongField
void prolongField(Field< Type > &ff, const Field< Type > &cf, const label coarseLevelIndex, const bool procAgglom) const
Prolong (interpolate by injection) cell field.
Definition: GAMGAgglomerationTemplates.C:174
MeshObject.H
Foam::MeshObject
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Definition: MeshObject.H:88
Foam::GAMGAgglomeration::hasProcMesh
bool hasProcMesh(const label fineLeveli) const
Check that level has combined mesh.
Definition: GAMGAgglomeration.C:537
Foam::GAMGAgglomeration::procAgglomerateLduAddressing
void procAgglomerateLduAddressing(const label comm, const labelList &procAgglomMap, const labelList &procIDs, const label allMeshComm, const label levelIndex)
Collect and combine processor meshes into allMesh:
Definition: GAMGAgglomerateLduAddressing.C:435
Foam::GAMGProcAgglomeration
Processor agglomeration of GAMGAgglomerations.
Definition: GAMGProcAgglomeration.H:54
Foam::GAMGAgglomeration::procCommunicator
label procCommunicator(const label fineLeveli) const
Communicator for current level or -1.
Definition: GAMGAgglomeration.C:543
lduPrimitiveMesh.H
Foam::GAMGAgglomeration::nCells
label nCells(const label leveli) const
Return number of coarse cells (before processor agglomeration)
Definition: GAMGAgglomeration.H:367
Foam::GAMGAgglomeration::faceFlipMap_
PtrList< boolList > faceFlipMap_
Face flip: for faces mapped to internal faces stores whether.
Definition: GAMGAgglomeration.H:105
Foam::GAMGAgglomeration::procBoundaryFaceMap_
PtrList< labelListListList > procBoundaryFaceMap_
Mapping from processor to procMeshLevel boundary face.
Definition: GAMGAgglomeration.H:142
Foam::GAMGAgglomeration::patchFaceRestrictAddressing_
PtrList< labelListList > patchFaceRestrictAddressing_
Patch-local face restriction addressing array.
Definition: GAMGAgglomeration.H:114
Foam::GAMGAgglomeration::procCellOffsets_
PtrList< labelList > procCellOffsets_
Mapping from processor to procMeshLevel cells.
Definition: GAMGAgglomeration.H:133
Foam::GAMGAgglomeration::processorAgglomerate
bool processorAgglomerate() const
Whether to agglomerate across processors.
Definition: GAMGAgglomeration.H:447
Foam::GAMGAgglomeration::agglomProcIDs_
PtrList< labelList > agglomProcIDs_
Per level the set of processors to agglomerate. Element 0 is.
Definition: GAMGAgglomeration.H:127
Foam::lduMesh
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Definition: lduMesh.H:62
Foam::GAMGAgglomeration::~GAMGAgglomeration
~GAMGAgglomeration()
Destructor.
Definition: GAMGAgglomeration.C:448
Foam::GAMGAgglomeration::continueAgglomerating
bool continueAgglomerating(const label nCells, const label nCoarseCells) const
Check the need for further agglomeration.
Definition: GAMGAgglomeration.C:211
Foam::GAMGAgglomeration::procCommunicator_
labelList procCommunicator_
Communicator for given level.
Definition: GAMGAgglomeration.H:130