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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2013 OpenFOAM Foundation
9  Copyright (C) 2023 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::procFacesGAMGProcAgglomeration
29 
30 Description
31  Processor agglomeration of GAMGAgglomerations. Needs nAgglomeratingCells
32  which is when to start agglomerating processors. Processors get agglomerated
33  by constructing a single cell mesh for each processor with each
34  processor interface a face. This then gets agglomerated using
35  the pairGAMGAgglomeration algorithm with the number of faces
36  on the original processor interface as face weight.
37 
38 SourceFiles
39  procFacesGAMGProcAgglomeration.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef Foam_procFacesGAMGProcAgglomeration_H
44 #define Foam_procFacesGAMGProcAgglomeration_H
45 
46 #include "GAMGProcAgglomeration.H"
47 #include "labelField.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class procFacesGAMGProcAgglomeration Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
61 {
62  // Private Data
63 
64  //- When to processor agglomerate
65  const label nAgglomeratingCells_;
66 
67 
68  // Private Member Functions
69 
70  //- Return (on master) all single-cell meshes collected. single-cell
71  // meshes are just one cell with all proc faces intact.
72  autoPtr<lduPrimitiveMesh> singleCellMesh
73  (
74  const label singleCellMeshComm,
75  const lduMesh& mesh,
76  scalarField& faceWeights
77  ) const;
78 
79  //- Construct processor agglomeration: for every processor the
80  // coarse processor-cluster it agglomerates onto
81  tmp<labelField> processorAgglomeration(const lduMesh&) const;
82 
83  //- Do we need to agglomerate across processors?
84  bool doProcessorAgglomeration(const lduMesh&) const;
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("procFaces");
91 
92  //- No copy construct
94  = delete;
95 
96  //- No copy assignment
97  void operator=(const procFacesGAMGProcAgglomeration&) = delete;
98 
99 
100  // Constructors
101 
102  //- Construct given agglomerator and controls
104  (
105  GAMGAgglomeration& agglom,
106  const dictionary& controlDict
107  );
108 
109 
110  //- Destructor
112 
113 
114  // Member Functions
115 
116  //- Modify agglomeration. Return true if modified
117  virtual bool agglomerate();
118 };
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace Foam
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #endif
128 
129 // ************************************************************************* //
void operator=(const procFacesGAMGProcAgglomeration &)=delete
No copy assignment.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
procFacesGAMGProcAgglomeration(const procFacesGAMGProcAgglomeration &)=delete
No copy construct.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Definition: lduMesh.H:53
Processor agglomeration of GAMGAgglomerations. Needs nAgglomeratingCells which is when to start agglo...
dynamicFvMesh & mesh
runTime controlDict().readEntry("adjustTimeStep"
The central control dictionary, the contents of which are either taken directly from the FOAM_CONTROL...
Definition: debug.C:142
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
Processor agglomeration of GAMGAgglomerations.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
TypeName("procFaces")
Runtime type information.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Geometric agglomerated algebraic multigrid agglomeration class.
Namespace for OpenFOAM.