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-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::procFacesGAMGProcAgglomeration
28
29Description
30 Processor agglomeration of GAMGAgglomerations. Needs nAgglomeratingCells
31 which is when to start agglomerating processors. Processors get agglomerated
32 by constructing a single cell mesh for each processor with each
33 processor interface a face. This then gets agglomerated using
34 the pairGAMGAgglomeration algorithm with the number of faces
35 on the original processor interface as face weight.
36
37SourceFiles
38 procFacesGAMGProcAgglomeration.C
39
40\*---------------------------------------------------------------------------*/
41
42#ifndef procFacesGAMGProcAgglomeration_H
43#define procFacesGAMGProcAgglomeration_H
44
46#include "DynamicList.H"
47#include "labelField.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54class GAMGAgglomeration;
55class lduMesh;
56class lduPrimitiveMesh;
57
58/*---------------------------------------------------------------------------*\
59 Class procFacesGAMGProcAgglomeration Declaration
60\*---------------------------------------------------------------------------*/
63:
65{
66 // Private data
67
68 //- When to processor agglomerate
69 const label nAgglomeratingCells_;
70
71 //- Allocated communicators
72 DynamicList<label> comms_;
73
74 // Private Member Functions
75
76 //- Return (on master) all single-cell meshes collected. single-cell
77 // meshes are just one cell with all proc faces intact.
78 autoPtr<lduPrimitiveMesh> singleCellMesh
79 (
80 const label singleCellMeshComm,
81 const lduMesh& mesh,
82 scalarField& faceWeights
83 ) const;
84
85 //- Construct processor agglomeration: for every processor the
86 // coarse processor-cluster it agglomerates onto
87 tmp<labelField> processorAgglomeration(const lduMesh&) const;
88
89 //- Do we need to agglomerate across processors?
90 bool doProcessorAgglomeration(const lduMesh&) const;
91
92 //- No copy construct
94 (
96 ) = delete;
97
98 //- No copy assignment
99 void operator=(const procFacesGAMGProcAgglomeration&) = delete;
100
101
102public:
103
104 //- Runtime type information
105 TypeName("procFaces");
106
107
108 // Constructors
109
110 //- Construct given agglomerator and controls
112 (
113 GAMGAgglomeration& agglom,
115 );
116
117
118 //- Destructor
120
121
122 // Member Functions
123
124 //- Modify agglomeration. Return true if modified
125 virtual bool agglomerate();
126
127};
128
129
130// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131
132} // End namespace Foam
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136#endif
137
138// ************************************************************************* //
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:72
Geometric agglomerated algebraic multigrid agglomeration class.
Processor agglomeration of GAMGAgglomerations.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Definition: lduMesh.H:63
Processor agglomeration of GAMGAgglomerations. Needs nAgglomeratingCells which is when to start agglo...
TypeName("procFaces")
Runtime type information.
virtual bool agglomerate()
Modify agglomeration. Return true if modified.
A class for managing temporary objects.
Definition: tmp.H:65
runTime controlDict().readEntry("adjustTimeStep"
dynamicFvMesh & mesh
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73