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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "metisDecomp.H"
27 #include "addToRunTimeSelectionTable.H"
30 static const char* notImplementedMessage =
31 "You are trying to use metis but do not have the metisDecomp library loaded."
32 "\nThis message is from the dummy metisDecomp stub library instead.\n"
34 "Please install metis and make sure that libmetis.so is in your "
36 "The metisDecomp library can then be built in $FOAM_SRC/decompositionMethods/"
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 defineTypeNameAndDebug(metisDecomp, 0);
45 addToRunTimeSelectionTable
54 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
56 Foam::label Foam::metisDecomp::decompose
58 const List<int>& adjncy,
59 const List<int>& xadj,
60 const scalarField& cellWeights,
61 List<int>& finalDecomp
66 "labelList metisDecomp::decompose"
70 "const scalarField&, "
73 ) << notImplementedMessage << exit(FatalError);
79 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
81 Foam::metisDecomp::metisDecomp
83 const dictionary& decompositionDict,
87 decompositionMethod(decompositionDict),
92 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
94 Foam::labelList Foam::metisDecomp::decompose
96 const pointField& points,
97 const scalarField& pointWeights
102 "labelList metisDecomp::decompose"
104 "const pointField&, "
107 ) << notImplementedMessage << exit(FatalError);
113 Foam::labelList Foam::metisDecomp::decompose
115 const labelList& agglom,
116 const pointField& agglomPoints,
117 const scalarField& agglomWeights
122 "labelList metisDecomp::decompose"
125 "const pointField&, "
128 ) << notImplementedMessage << exit(FatalError);
134 Foam::labelList Foam::metisDecomp::decompose
136 const labelListList& globalCellCells,
137 const pointField& cellCentres,
138 const scalarField& cellWeights
143 "labelList metisDecomp::decompose"
145 "const labelListList&, "
146 "const pointField&, "
149 ) << notImplementedMessage << exit(FatalError);
155 // ************************************************************************* //