STYLE: date
[OpenFOAM-2.0.x.git] / src / dummyThirdParty / ptscotchDecomp / dummyPtscotchDecomp.C
blob90aca7c618cfcdb34b210d7f9a2a5399d16fc567
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2010-2011 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 "ptscotchDecomp.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "Time.H"
30 static const char* notImplementedMessage =
31 "You are trying to use ptscotch but do not have the "
32 "ptscotchDecomp library loaded."
33 "\nThis message is from the dummy ptscotchDecomp stub library instead.\n"
34 "\n"
35 "Please install ptscotch and make sure that libptscotch.so is in your "
36 "LD_LIBRARY_PATH.\n"
37 "The ptscotchDecomp library can then be built in "
38 "$FOAM_SRC/parallel/decompose/ptscotchDecomp\n";
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
45     defineTypeNameAndDebug(ptscotchDecomp, 0);
47     addToRunTimeSelectionTable
48     (
49         decompositionMethod,
50         ptscotchDecomp,
51         dictionary
52     );
55 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
57 void Foam::ptscotchDecomp::check(const int retVal, const char* str)
61 Foam::label Foam::ptscotchDecomp::decomposeZeroDomains
63     const fileName& meshPath,
64     const List<int>& initxadj,
65     const List<int>& initadjncy,
66     const scalarField& initcWeights,
68     List<int>& finalDecomp
69 ) const
71     FatalErrorIn
72     (
73         "label ptscotchDecomp::decompose"
74         "("
75             "const List<int>&, "
76             "const List<int>&, "
77             "const scalarField&, "
78             "List<int>&"
79         ")"
80     )   << notImplementedMessage << exit(FatalError);
82     return -1;
84 Foam::label Foam::ptscotchDecomp::decompose
86     const fileName& meshPath,
87     const List<int>& adjncy,
88     const List<int>& xadj,
89     const scalarField& cWeights,
90     List<int>& finalDecomp
91 ) const
93     FatalErrorIn
94     (
95         "label ptscotchDecomp::decompose"
96         "("
97             "const List<int>&, "
98             "const List<int>&, "
99             "const scalarField&, "
100             "List<int>&"
101         ")"
102     )   << notImplementedMessage << exit(FatalError);
104     return -1;
108 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
110 Foam::ptscotchDecomp::ptscotchDecomp
112     const dictionary& decompositionDict
115     decompositionMethod(decompositionDict)
119 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
121 Foam::labelList Foam::ptscotchDecomp::decompose
123     const polyMesh& mesh,
124     const pointField& points,
125     const scalarField& pointWeights
128     FatalErrorIn
129     (
130         "labelList ptscotchDecomp::decompose"
131         "("
132             "const pointField&, "
133             "const scalarField&"
134         ")"
135     )   << notImplementedMessage << exit(FatalError);
137     return labelList::null();
141 Foam::labelList Foam::ptscotchDecomp::decompose
143     const polyMesh& mesh,
144     const labelList& agglom,
145     const pointField& agglomPoints,
146     const scalarField& pointWeights
149     FatalErrorIn
150     (
151         "labelList ptscotchDecomp::decompose"
152         "("
153             "const labelList&, "
154             "const pointField&, "
155             "const scalarField&"
156         ")"
157     )   << notImplementedMessage << exit(FatalError);
159     return labelList::null();
163 Foam::labelList Foam::ptscotchDecomp::decompose
165     const labelListList& globalCellCells,
166     const pointField& cellCentres,
167     const scalarField& cWeights
170     FatalErrorIn
171     (
172         "labelList ptscotchDecomp::decompose"
173         "("
174             "const labelListList&, "
175             "const pointField&, "
176             "const scalarField&"
177         ")"
178     )   << notImplementedMessage << exit(FatalError);
180     return labelList::null();
184 // ************************************************************************* //