Loading...
Searching...
No Matches
pairGAMGAgglomeration.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) 2011-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::pairGAMGAgglomeration
29
30Description
31 Agglomerate using the pair algorithm.
32
33SourceFiles
34 pairGAMGAgglomeration.C
35 pairGAMGAgglomerate.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef pairGAMGAgglomeration_H
40#define pairGAMGAgglomeration_H
41
42#include "GAMGAgglomeration.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
49/*---------------------------------------------------------------------------*\
50 Class pairGAMGAgglomeration Declaration
51\*---------------------------------------------------------------------------*/
52
54:
56{
57 // Private data
58
59 //- Number of levels to merge, 1 = don't merge, 2 = merge pairs etc.
60 label mergeLevels_;
61
62 //- Direction of cell loop for the current level
63 static bool forward_;
64
65
66protected:
67
68 // Protected Member Functions
69
70 //- No copy construct
73 //- No copy assignment
74 void operator=(const pairGAMGAgglomeration&) = delete;
75
76
77public:
78
79 //- Runtime type information
80 TypeName("pair");
81
82
83 // Constructors
84
85 //- Construct given mesh and controls
87 (
88 const lduMesh& mesh,
90 );
91
92 //- Calculate and return agglomeration
94 (
95 label& nCoarseCells,
96 const lduAddressing& fineMatrixAddressing,
97 const scalarField& faceWeights
98 );
99
100 //- Agglomerate from a starting level. Starting level is usually 0
101 //- (initial mesh) but sometimes >0 (restarting after processor
102 //- agglomeration)
103 virtual void agglomerate
104 (
105 const label nCellsInCoarsestLevel,
106 const label startLevel,
107 const scalarField& startFaceWeights,
108 const bool doProcessorAgglomerate = true
109 );
110};
111
112
113// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115} // End namespace Foam
116
117// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118
119#endif
120
121// ************************************************************************* //
GAMGAgglomeration(const GAMGAgglomeration &)=delete
No copy construct.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
The class contains the addressing required by the lduMatrix: upper, lower and losort.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Definition lduMesh.H:54
TypeName("pair")
Runtime type information.
static tmp< labelField > agglomerate(label &nCoarseCells, const lduAddressing &fineMatrixAddressing, const scalarField &faceWeights)
Calculate and return agglomeration.
void operator=(const pairGAMGAgglomeration &)=delete
No copy assignment.
pairGAMGAgglomeration(const pairGAMGAgglomeration &)=delete
No copy construct.
A class for managing temporary objects.
Definition tmp.H:75
runTime controlDict().readEntry("adjustTimeStep"
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