dummyMetis.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "metis.H"
28 #include "Time.H"
29 
30 static const char* notImplementedMessage =
31 "You are trying to use metis but do not have the metis library loaded."
32 "\nThis message is from the dummy metis 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 metis library can then be built from "
37 "$FOAM_SRC/parallel/decompose/metis 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.";
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace decompositionMethods
46 {
49 }
50 }
51 
52 
53 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
54 
56 (
57  const List<label>& adjncy,
58  const List<label>& xadj,
59  const scalarField& cellWeights,
60  List<label>& finalDecomp
61 )
62 {
65 
66  return -1;
67 }
68 
69 
70 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
71 
73 (
74  const dictionary& decompositionDict,
75  const dictionary& methodDict
76 )
77 :
78  decompositionMethod(decompositionDict)
79 {}
80 
81 
82 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
83 
85 (
86  const polyMesh& mesh,
87  const pointField& points,
88  const scalarField& pointWeights
89 )
90 {
93 
94  return labelList();
95 }
96 
97 
99 (
100  const polyMesh& mesh,
101  const labelList& agglom,
102  const pointField& agglomPoints,
103  const scalarField& agglomWeights
104 )
105 {
108 
109  return labelList();
110 }
111 
112 
114 (
115  const labelListList& globalCellCells,
116  const pointField& cellCentres,
117  const scalarField& cellWeights
118 )
119 {
122 
123  return labelList();
124 }
125 
126 
127 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Abstract base class for decomposition.
Metis domain decomposition.
Definition: metis.H:51
virtual labelList decompose(const pointField &points, const scalarField &pointWeights)
Inherit decompose from decompositionMethod.
metis(const dictionary &decompositionDict, const dictionary &methodDict)
Construct given the decomposition dictionary.
Definition: dummyMetis.C:73
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
static const char * notImplementedMessage
Definition: dummyMetis.C:30
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
volScalarField scalarField(fieldObject, mesh)
const pointField & points
addToRunTimeSelectionTable(decompositionMethod, metis, decomposer)
Namespace for OpenFOAM.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
List< label > labelList
A List of labels.
Definition: labelList.H:56
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
error FatalError