procFacesGAMGProcAgglomeration.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) 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::procFacesGAMGProcAgglomeration
26 
27 Description
28  Processor agglomeration of GAMGAgglomerations. Needs nAgglomeratingCells
29  which is when to start agglomerating processors. Processors get agglomerated
30  by constructing a single cell mesh for each processor with each
31  processor interface a face. This then gets agglomerated using
32  the pairGAMGAgglomeration algorithm with the number of faces
33  on the original processor interface as face weight.
34 
35 SourceFiles
36  procFacesGAMGProcAgglomeration.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef procFacesGAMGProcAgglomeration_H
41 #define procFacesGAMGProcAgglomeration_H
42 
43 #include "GAMGProcAgglomeration.H"
44 #include "DynamicList.H"
45 #include "labelField.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 class GAMGAgglomeration;
53 class lduMesh;
54 class lduPrimitiveMesh;
55 
56 /*---------------------------------------------------------------------------*\
57  Class procFacesGAMGProcAgglomeration Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
63 {
64  // Private data
65 
66  //- When to processor agglomerate
67  const label nAgglomeratingCells_;
68 
69  //- Allocated communicators
70  DynamicList<label> comms_;
71 
72  // Private Member Functions
73 
74  //- Return (on master) all single-cell meshes collected. single-cell
75  // meshes are just one cell with all proc faces intact.
76  autoPtr<lduPrimitiveMesh> singleCellMesh
77  (
78  const label singleCellMeshComm,
79  const lduMesh& mesh,
80  scalarField& faceWeights
81  ) const;
82 
83  //- Construct processor agglomeration: for every processor the
84  // coarse processor-cluster it agglomerates onto
85  tmp<labelField> processorAgglomeration(const lduMesh&) const;
86 
87  //- Do we need to agglomerate across processors?
88  bool doProcessorAgglomeration(const lduMesh&) const;
89 
90  //- Disallow default bitwise copy construct
92  (
94  );
95 
96  //- Disallow default bitwise assignment
97  void operator=(const procFacesGAMGProcAgglomeration&);
98 
99 
100 public:
101 
102  //- Runtime type information
103  TypeName("procFaces");
104 
105 
106  // Constructors
107 
108  //- Construct given agglomerator and controls
110  (
111  GAMGAgglomeration& agglom,
112  const dictionary& controlDict
113  );
114 
115 
116  //- Destructor
118 
119 
120  // Member Functions
121 
122  //- Modify agglomeration. Return true if modified
123  virtual bool agglomerate();
124 
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
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
runTime controlDict().lookup("adjustTimeStep") >> adjustTimeStep
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Definition: lduMesh.H:59
Processor agglomeration of GAMGAgglomerations. Needs nAgglomeratingCells which is when to start agglo...
dynamicFvMesh & mesh
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
Processor agglomeration of GAMGAgglomerations.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
TypeName("procFaces")
Runtime type information.
A class for managing temporary objects.
Definition: PtrList.H:53
Geometric agglomerated algebraic multigrid agglomeration class.
Namespace for OpenFOAM.