dummyPtscotch.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 "ptscotch.H"
28 #include "Time.H"
29 
30 static const char* notImplementedMessage =
31 "You are trying to use ptscotch but do not have the "
32 "ptscotch library loaded."
33 "\nThis message is from the dummy ptscotch 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 ptscotch library can then be built in "
38 "$FOAM_SRC/parallel/decompose/ptscotch\n";
39 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace decompositionMethods
46 {
48 
50  (
52  ptscotch,
53  distributor
54  );
55 }
56 }
57 
58 
59 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
60 
61 void Foam::decompositionMethods::ptscotch::check
62 (
63  const int retVal,
64  const char* str
65 )
66 {}
67 
68 
70 (
71  const fileName& meshPath,
72  const List<label>& initxadj,
73  const List<label>& initadjncy,
74  const scalarField& initcWeights,
75 
76  List<label>& finalDecomp
77 ) const
78 {
81 
82  return -1;
83 }
84 
85 
87 (
88  const fileName& meshPath,
89  const label adjncySize,
90  const label adjncy[],
91  const label xadjSize,
92  const label xadj[],
93  const scalarField& cWeights,
94  List<label>& finalDecomp
95 ) const
96 {
99 
100  return -1;
101 }
102 
103 
104 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
105 
107 (
108  const dictionary& decompositionDict
109 )
110 :
111  decompositionMethod(decompositionDict)
112 {}
113 
114 
115 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
116 
118 (
119  const polyMesh& mesh,
120  const pointField& points,
121  const scalarField& pointWeights
122 )
123 {
126 
127  return labelList::null();
128 }
129 
130 
132 (
133  const polyMesh& mesh,
134  const labelList& agglom,
135  const pointField& agglomPoints,
136  const scalarField& pointWeights
137 )
138 {
141 
142  return labelList::null();
143 }
144 
145 
147 (
148  const labelListList& globalCellCells,
149  const pointField& cellCentres,
150  const scalarField& cWeights
151 )
152 {
155 
156  return labelList::null();
157 }
158 
159 
160 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
static const List< label > & null()
Return a null List.
Definition: ListI.H:118
Abstract base class for decomposition.
PTScotch domain decomposition. For the main details about how to define the strategies,...
Definition: ptscotch.H:67
virtual labelList decompose(const pointField &points, const scalarField &pointWeights)
Inherit decompose from decompositionMethod.
ptscotch(const dictionary &decompositionDict)
Construct given the decomposition dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
static const char * notImplementedMessage
Definition: dummyPtscotch.C:30
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
const pointField & points
addToRunTimeSelectionTable(decompositionMethod, metis, decomposer)
Namespace for OpenFOAM.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
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
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
error FatalError