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/>.
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 from "
37 "$FOAM_SRC/parallel/decompose/metisDecomp and dynamically loading or linking"
38 " this library will add metis as a decomposition method.\n"
39 "Please be aware that there are license restrictions on using Metis.";
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 defineTypeNameAndDebug(metisDecomp, 0);
47 addToRunTimeSelectionTable
56 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
58 Foam::label Foam::metisDecomp::decompose
60 const List<int>& adjncy,
61 const List<int>& xadj,
62 const scalarField& cellWeights,
63 List<int>& finalDecomp
68 "labelList metisDecomp::decompose"
72 "const scalarField&, "
75 ) << notImplementedMessage << exit(FatalError);
81 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
83 Foam::metisDecomp::metisDecomp
85 const dictionary& decompositionDict
88 decompositionMethod(decompositionDict)
92 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
94 Foam::labelList Foam::metisDecomp::decompose
97 const pointField& points,
98 const scalarField& pointWeights
103 "labelList metisDecomp::decompose"
105 "const pointField&, "
108 ) << notImplementedMessage << exit(FatalError);
114 Foam::labelList Foam::metisDecomp::decompose
116 const polyMesh& mesh,
117 const labelList& agglom,
118 const pointField& agglomPoints,
119 const scalarField& agglomWeights
124 "labelList metisDecomp::decompose"
127 "const pointField&, "
130 ) << notImplementedMessage << exit(FatalError);
136 Foam::labelList Foam::metisDecomp::decompose
138 const labelListList& globalCellCells,
139 const pointField& cellCentres,
140 const scalarField& cellWeights
145 "labelList metisDecomp::decompose"
147 "const labelListList&, "
148 "const pointField&, "
151 ) << notImplementedMessage << exit(FatalError);
157 // ************************************************************************* //