1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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::simpleGeomDecomp
32 \*---------------------------------------------------------------------------*/
34 #ifndef simpleGeomDecomp_H
35 #define simpleGeomDecomp_H
37 #include "geomDecomp.H"
42 /*---------------------------------------------------------------------------*\
43 Class simpleGeomDecomp Declaration
44 \*---------------------------------------------------------------------------*/
46 class simpleGeomDecomp
50 // Private Member Functions
52 void assignToProcessorGroup(labelList&, const label) const;
54 void assignToProcessorGroup
56 labelList& processorGroup,
57 const label nProcGroup,
58 const labelList& indices,
59 const scalarField& weights,
60 const scalar summedWeights
63 labelList decomposeOneProc(const pointField& points) const;
65 labelList decomposeOneProc
67 const pointField& points,
68 const scalarField& weights
71 //- Disallow default bitwise copy construct and assignment
72 void operator=(const simpleGeomDecomp&);
73 simpleGeomDecomp(const simpleGeomDecomp&);
78 //- Runtime type information
84 //- Construct given the decomposition dictionary
85 simpleGeomDecomp(const dictionary& decompositionDict);
89 virtual ~simpleGeomDecomp()
95 virtual bool parallelAware() const
97 // simpleDecomp sends all points to the master which does
102 virtual labelList decompose(const pointField&);
104 virtual labelList decompose(const pointField&, const scalarField&);
106 virtual labelList decompose(const polyMesh&, const pointField& points)
108 return decompose(points);
111 virtual labelList decompose
114 const pointField& points,
115 const scalarField& pointWeights
118 return decompose(points, pointWeights);
121 //- Explicitly provided connectivity
122 virtual labelList decompose
124 const labelListList& globalCellCells,
125 const pointField& cc,
126 const scalarField& cWeights
129 return decompose(cc, cWeights);
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 } // End namespace Foam
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 // ************************************************************************* //