BUG: pointHitSort: define operator<
[OpenFOAM-1.7.x.git] / src / dummyThirdParty / metisDecomp / dummyMetisDecomp.C
blobb9e4e6aa0d40c4aa10fbfe07aee5e0b62bdb7cb3
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2010-2010 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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"
28 #include "Time.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"
33 "\n"
34 "Please install metis and make sure that libmetis.so is in your "
35 "LD_LIBRARY_PATH.\n"
36 "The metisDecomp library can then be built in $FOAM_SRC/decompositionMethods/"
37 "metisDecomp\n";
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 namespace Foam
43     defineTypeNameAndDebug(metisDecomp, 0);
45     addToRunTimeSelectionTable
46     (
47         decompositionMethod,
48         metisDecomp,
49         dictionaryMesh
50     );
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
64     FatalErrorIn
65     (
66         "labelList metisDecomp::decompose"
67         "("
68             "const List<int>&, "
69             "const List<int>&, "
70             "const scalarField&, "
71             "List<int>&"
72         ")"
73     )   << notImplementedMessage << exit(FatalError);
75     return -1;
79 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
81 Foam::metisDecomp::metisDecomp
83     const dictionary& decompositionDict,
84     const polyMesh& mesh
87     decompositionMethod(decompositionDict),
88     mesh_(mesh)
92 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
94 Foam::labelList Foam::metisDecomp::decompose
96     const pointField& points,
97     const scalarField& pointWeights
100     FatalErrorIn
101     (
102         "labelList metisDecomp::decompose"
103         "("
104             "const pointField&, "
105             "const scalarField&"
106         ")"
107     )   << notImplementedMessage << exit(FatalError);
109     return labelList();
113 Foam::labelList Foam::metisDecomp::decompose
115     const labelList& agglom,
116     const pointField& agglomPoints,
117     const scalarField& agglomWeights
120     FatalErrorIn
121     (
122         "labelList metisDecomp::decompose"
123         "("
124             "const labelList&, "
125             "const pointField&, "
126             "const scalarField&"
127         ")"
128     )   << notImplementedMessage << exit(FatalError);
130     return labelList();
134 Foam::labelList Foam::metisDecomp::decompose
136     const labelListList& globalCellCells,
137     const pointField& cellCentres,
138     const scalarField& cellWeights
141     FatalErrorIn
142     (
143         "labelList metisDecomp::decompose"
144         "("
145             "const labelListList&, "
146             "const pointField&, "
147             "const scalarField&"
148         ")"
149     )   << notImplementedMessage << exit(FatalError);
151     return labelList();
155 // ************************************************************************* //