Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / dummyThirdParty / scotchDecomp / dummyScotchDecomp.C
blob007f708a5debd2700104115a664dc8d3489b5f5d
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 "scotchDecomp.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "Time.H"
30 static const char* notImplementedMessage =
31 "You are trying to use scotch but do not have the scotchDecomp library loaded."
32 "\nThis message is from the dummy scotchDecomp stub library instead.\n"
33 "\n"
34 "Please install scotch and make sure that libscotch.so is in your "
35 "LD_LIBRARY_PATH.\n"
36 "The scotchDecomp library can then be built in "
37 "$FOAM_SRC/parallel/decompose/decompositionMethods/scotchDecomp\n";
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
44     defineTypeNameAndDebug(scotchDecomp, 0);
46     addToRunTimeSelectionTable
47     (
48         decompositionMethod,
49         scotchDecomp,
50         dictionary
51     );
54 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
56 void Foam::scotchDecomp::check(const int retVal, const char* str)
60 Foam::label Foam::scotchDecomp::decompose
62     const fileName& meshPath,
63     const List<int>& adjncy,
64     const List<int>& xadj,
65     const scalarField& cWeights,
67     List<int>& finalDecomp
70     FatalErrorIn
71     (
72         "label scotchDecomp::decompose\n"
73         "(\n"
74             "const fileName& meshPath,\n"
75             "const List<int>&,\n"
76             "const List<int>&,\n"
77             "const scalarField&,\n"
78             "List<int>&\n"
79         ")\n"
80     )   << notImplementedMessage << exit(FatalError);
82     return -1;
86 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
88 Foam::scotchDecomp::scotchDecomp
90     const dictionary& decompositionDict
93     decompositionMethod(decompositionDict)
97 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
99 Foam::labelList Foam::scotchDecomp::decompose
101     const polyMesh& mesh,
102     const pointField& points,
103     const scalarField& pointWeights
106     FatalErrorIn
107     (
108         "labelList scotchDecomp::decompose"
109         "("
110             "const pointField&, "
111             "const scalarField&"
112         ")"
113     )   << notImplementedMessage << exit(FatalError);
115     return labelList::null();
119 Foam::labelList Foam::scotchDecomp::decompose
121     const polyMesh& mesh,
122     const labelList& agglom,
123     const pointField& agglomPoints,
124     const scalarField& pointWeights
127     FatalErrorIn
128     (
129         "labelList scotchDecomp::decompose"
130         "("
131             "const labelList&, "
132             "const pointField&, "
133             "const scalarField&"
134         ")"
135     )   << notImplementedMessage << exit(FatalError);
137     return labelList::null();
141 Foam::labelList Foam::scotchDecomp::decompose
143     const labelListList& globalCellCells,
144     const pointField& cellCentres,
145     const scalarField& cWeights
148     FatalErrorIn
149     (
150         "labelList scotchDecomp::decompose"
151         "("
152             "const labelListList&, "
153             "const pointField&, "
154             "const scalarField&"
155         ")"
156     )   << notImplementedMessage << exit(FatalError);
158     return labelList::null();
162 // ************************************************************************* //