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