Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::procFacesGAMGProcAgglomeration
29
30Description
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
38SourceFiles
39 procFacesGAMGProcAgglomeration.C
40
41\*---------------------------------------------------------------------------*/
42
43#ifndef Foam_procFacesGAMGProcAgglomeration_H
44#define Foam_procFacesGAMGProcAgglomeration_H
45
47#include "labelField.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
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
87public:
88
89 //- Runtime type information
90 TypeName("procFaces");
91
92 //- No copy construct
94 = delete;
95
96 //- No copy assignment
98
99
100 // Constructors
101
102 //- Construct given agglomerator and controls
104 (
105 GAMGAgglomeration& agglom,
107 );
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// ************************************************************************* //
Geometric agglomerated algebraic multigrid agglomeration class.
GAMGProcAgglomeration(const GAMGProcAgglomeration &)=delete
No copy construct.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Definition lduMesh.H:54
TypeName("procFaces")
Runtime type information.
procFacesGAMGProcAgglomeration(const procFacesGAMGProcAgglomeration &)=delete
No copy construct.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
void operator=(const procFacesGAMGProcAgglomeration &)=delete
No copy assignment.
A class for managing temporary objects.
Definition tmp.H:75
runTime controlDict().readEntry("adjustTimeStep"
dynamicFvMesh & mesh
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68