1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
25 Foam::engineScotchDecomp
28 Domain decomposition for internal combustion engine simulations with
31 The algorithm attempts to be as general as possible and operates in the
33 - identify piston region and peform a decomposition biased towards the
34 piston axis. This aims to preserve load balancing when cell layers
36 - identify static regions and decompose them separately
39 Hrvoje Jasak, Wikki Ltd. All rights reserved.
44 \*---------------------------------------------------------------------------*/
46 #ifndef engineScotchDecomp_H
47 #define engineScotchDecomp_H
49 #include "scotchDecomp.H"
55 /*---------------------------------------------------------------------------*\
56 Class engineScotchDecomp Declaration
57 \*---------------------------------------------------------------------------*/
59 class engineScotchDecomp
68 //- Sliding patch pairs
69 List<Pair<word> > slidingPatchPairs_;
71 //- Use expanded area around sliding patches
72 Switch expandSliding_;
75 // Private Member Functions
77 //- Disallow default bitwise copy construct
78 engineScotchDecomp(const engineScotchDecomp&);
80 //- Disallow default bitwise assignment
81 void operator=(const engineScotchDecomp&);
84 //- Check and print error message
85 static void check(const int, const char*);
89 const List<int>& adjncy,
90 const List<int>& xadj,
91 const scalarField& cWeights,
92 List<int>& finalDecomp
98 //- Runtime type information
99 TypeName("engineScotch");
104 //- Construct given the decomposition dictionary and mesh
107 const dictionary& decompositionDict,
114 virtual ~engineScotchDecomp()
120 virtual bool parallelAware() const
125 //- Decompose cells with weights
126 virtual labelList decompose
128 const pointField& points,
129 const scalarField& pointWeights
132 //- Decompose cells with weights with explicitly provided connectivity
133 virtual labelList decompose
135 const labelListList& globalCellCells,
136 const pointField& cc,
137 const scalarField& cWeights
140 return decompose(cc, cWeights);
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 } // End namespace Foam
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 // ************************************************************************* //