1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::multiLevelDecomp
28 Decomposition given using consecutive application of decomposers.
33 \*---------------------------------------------------------------------------*/
35 #ifndef multiLevelDecomp_H
36 #define multiLevelDecomp_H
38 #include "decompositionMethod.H"
43 /*---------------------------------------------------------------------------*\
44 Class multiLevelDecomp Declaration
45 \*---------------------------------------------------------------------------*/
47 class multiLevelDecomp
49 public decompositionMethod
53 dictionary methodsDict_;
55 PtrList<decompositionMethod> methods_;
58 // Private Member Functions
60 //- Given connectivity across processors work out connectivity
61 // for a (consistent) subset
62 void subsetGlobalCellCells
66 const labelList& dist,
68 const labelListList& cellCells,
70 labelListList& subCellCells,
71 labelList& cutConnections
74 //- Decompose level methodI without addressing
77 const labelListList& pointPoints,
78 const pointField& points,
79 const scalarField& pointWeights,
80 const labelList& pointMap, // map back to original points
83 labelField& finalDecomp
86 //- Disallow default bitwise copy construct and assignment
87 void operator=(const multiLevelDecomp&);
88 multiLevelDecomp(const multiLevelDecomp&);
93 //- Runtime type information
94 TypeName("multiLevel");
99 //- Construct given the decomposition dictionary
100 multiLevelDecomp(const dictionary& decompositionDict);
104 virtual ~multiLevelDecomp()
110 //- Is method parallel aware (i.e. does it synchronize domains across
112 virtual bool parallelAware() const;
114 //- Return for every coordinate the wanted processor number. Use the
115 // mesh connectivity (if needed)
116 virtual labelList decompose
118 const polyMesh& mesh,
119 const pointField& points,
120 const scalarField& pointWeights
123 //- Return for every coordinate the wanted processor number. Explicitly
124 // provided connectivity - does not use mesh_.
125 virtual labelList decompose
127 const labelListList& globalCellCells,
128 const pointField& cc,
129 const scalarField& cWeights
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 } // End namespace Foam
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 // ************************************************************************* //