dummyPtscotchDecomp.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-2021 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 "ptscotchDecomp.H"
28 #include "Time.H"
29 
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";
39 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45  defineTypeNameAndDebug(ptscotchDecomp, 0);
46 
48  (
49  decompositionMethod,
50  ptscotchDecomp,
51  distributor
52  );
53 }
54 
55 
56 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
57 
58 void Foam::ptscotchDecomp::check(const int retVal, const char* str)
59 {}
60 
61 
62 Foam::label Foam::ptscotchDecomp::decompose
63 (
64  const fileName& meshPath,
65  const List<label>& initxadj,
66  const List<label>& initadjncy,
67  const scalarField& initcWeights,
68 
69  List<label>& finalDecomp
70 ) const
71 {
73  << notImplementedMessage << exit(FatalError);
74 
75  return -1;
76 }
77 
78 
79 Foam::label Foam::ptscotchDecomp::decompose
80 (
81  const fileName& meshPath,
82  const label adjncySize,
83  const label adjncy[],
84  const label xadjSize,
85  const label xadj[],
86  const scalarField& cWeights,
87  List<label>& finalDecomp
88 ) const
89 {
91  << notImplementedMessage << exit(FatalError);
92 
93  return -1;
94 }
95 
96 
97 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
98 
100 (
101  const dictionary& decompositionDict
102 )
103 :
104  decompositionMethod(decompositionDict)
105 {}
106 
107 
108 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
109 
110 Foam::labelList Foam::ptscotchDecomp::decompose
111 (
112  const polyMesh& mesh,
113  const pointField& points,
114  const scalarField& pointWeights
115 )
116 {
118  << notImplementedMessage << exit(FatalError);
119 
120  return labelList::null();
121 }
122 
123 
124 Foam::labelList Foam::ptscotchDecomp::decompose
125 (
126  const polyMesh& mesh,
127  const labelList& agglom,
128  const pointField& agglomPoints,
129  const scalarField& pointWeights
130 )
131 {
133  << notImplementedMessage << exit(FatalError);
134 
135  return labelList::null();
136 }
137 
138 
139 Foam::labelList Foam::ptscotchDecomp::decompose
140 (
141  const labelListList& globalCellCells,
142  const pointField& cellCentres,
143  const scalarField& cWeights
144 )
145 {
147  << notImplementedMessage << exit(FatalError);
148 
149  return labelList::null();
150 }
151 
152 
153 // ************************************************************************* //
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
ptscotchDecomp(const dictionary &decompositionDict)
Construct given the decomposition dictionary and mesh.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:306
Holds information (coordinate and normal) regarding nearest wall point.
static const List< label > & null()
Return a null List.
Definition: ListI.H:118
Macros for easy insertion into run-time selection tables.
static const char * notImplementedMessage
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Abstract base class for decomposition.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:76
Namespace for OpenFOAM.