BUG: pointHitSort: define operator<
[OpenFOAM-1.7.x.git] / src / dummyThirdParty / parMetisDecomp / dummyParMetisDecomp.C
blob769c62b03d7f0e48d8b69a388772614fbed5c65a
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-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 "parMetisDecomp.H"
27 #include "addToRunTimeSelectionTable.H"
28 #include "polyMesh.H"
29 #include "Time.H"
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 namespace Foam
35     defineTypeNameAndDebug(parMetisDecomp, 0);
37     addToRunTimeSelectionTable
38     (
39         decompositionMethod,
40         parMetisDecomp,
41         dictionaryMesh
42     );
45 static const char* notImplementedMessage =
46 "You are trying to use parMetis but do not have the parMetisDecomp library "
47 "loaded.\n"
48 "This message is from the dummy parMetisDecomp stub library instead.\n"        
49 "\n"                                                                           
50 "Please install parMetis and make sure that libparMetis.so is in your "            
51 "LD_LIBRARY_PATH.\n"                                                           
52 "The parMetisDecomp library can then be built in $FOAM_SRC/decompositionMethods/"
53 "parMetisDecomp\n";                                                              
56 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
58 //- Does prevention of 0 cell domains and calls parmetis.
59 Foam::label Foam::parMetisDecomp::decompose
61     Field<int>& xadj,
62     Field<int>& adjncy,
63     const pointField& cellCentres,
64     Field<int>& cellWeights,
65     Field<int>& faceWeights,
66     const List<int>& options,
68     List<int>& finalDecomp
71     FatalErrorIn
72     (
73         "label parMetisDecomp::decompose"
74         "("
75             "Field<int>&, "
76             "Field<int>&, "
77             "const pointField&, "
78             "Field<int>&, "
79             "Field<int>&, "
80             "const List<int>&, "
81             "List<int>&"
82         ")"
83     )<< notImplementedMessage << exit(FatalError);
85     return -1;
89 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
91 Foam::parMetisDecomp::parMetisDecomp
93     const dictionary& decompositionDict,
94     const polyMesh& mesh
97     decompositionMethod(decompositionDict),
98     mesh_(mesh)
102 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
104 Foam::labelList Foam::parMetisDecomp::decompose
106     const pointField& cc,
107     const scalarField& cWeights
110     FatalErrorIn
111     (
112         "labelList parMetisDecomp::decompose"
113         "("
114             "const pointField&, "
115             "const scalarField&"
116         ")"
117     )   << notImplementedMessage << exit(FatalError);
119     return labelList();
123 Foam::labelList Foam::parMetisDecomp::decompose
125     const labelList& cellToRegion,
126     const pointField& regionPoints,
127     const scalarField& regionWeights
130     FatalErrorIn
131     (
132         "labelList parMetisDecomp::decompose"
133         "("
134             "const labelList&, "
135             "const pointField&, "
136             "const scalarField&"
137         ")"
138     )   << notImplementedMessage << exit(FatalError);
140     return labelList();
144 Foam::labelList Foam::parMetisDecomp::decompose
146     const labelListList& globalCellCells,
147     const pointField& cellCentres,
148     const scalarField& cWeights
151     FatalErrorIn
152     (
153         "labelList parMetisDecomp::decompose"
154         "("
155             "const labelListList&, "
156             "const pointField&, "
157             "const scalarField&"
158         ")"
159     )   << notImplementedMessage << exit(FatalError);
161     return labelList();
165 void Foam::parMetisDecomp::calcMetisDistributedCSR
167     const polyMesh& mesh,
168     List<int>& adjncy,
169     List<int>& xadj
172     FatalErrorIn
173     (
174         "void parMetisDecomp::calcMetisDistributedCSR"
175         "("
176             "const polyMesh&, "
177             "List<int>&, "
178             "List<int>&"
179         ")"
180     )   << notImplementedMessage << exit(FatalError);
184 // ************************************************************************* //