dummyScotchDecomp.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 "scotchDecomp.H"
28 #include "Time.H"
29 
30 static const char* notImplementedMessage =
31 "You are trying to use scotch but do not have the scotchDecomp library loaded."
32 "\nThis message is from the dummy scotchDecomp stub library instead.\n"
33 "\n"
34 "Please install scotch and make sure that libscotch.so is in your "
35 "LD_LIBRARY_PATH.\n"
36 "The scotchDecomp library can then be built in "
37 "$FOAM_SRC/parallel/decompose/decompositionMethods/scotchDecomp\n";
38 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44  defineTypeNameAndDebug(scotchDecomp, 0);
45 
47  (
48  decompositionMethod,
49  scotchDecomp,
50  decomposer
51  );
52 
54  (
55  decompositionMethod,
56  scotchDecomp,
57  distributor
58  );
59 }
60 
61 
62 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
63 
64 void Foam::scotchDecomp::check(const int retVal, const char* str)
65 {}
66 
67 
68 Foam::label Foam::scotchDecomp::decompose
69 (
70  const fileName& meshPath,
71  const List<label>& adjncy,
72  const List<label>& xadj,
73  const scalarField& cWeights,
74 
75  List<label>& finalDecomp
76 )
77 {
79  << notImplementedMessage << exit(FatalError);
80 
81  return -1;
82 }
83 
84 
85 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
86 
88 (
89  const dictionary& decompositionDict
90 )
91 :
92  decompositionMethod(decompositionDict)
93 {}
94 
95 
96 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
97 
98 Foam::labelList Foam::scotchDecomp::decompose
99 (
100  const polyMesh& mesh,
101  const pointField& points,
102  const scalarField& pointWeights
103 )
104 {
106  << notImplementedMessage << exit(FatalError);
107 
108  return labelList::null();
109 }
110 
111 
112 Foam::labelList Foam::scotchDecomp::decompose
113 (
114  const polyMesh& mesh,
115  const labelList& agglom,
116  const pointField& agglomPoints,
117  const scalarField& pointWeights
118 )
119 {
121  << notImplementedMessage << exit(FatalError);
122 
123  return labelList::null();
124 }
125 
126 
127 Foam::labelList Foam::scotchDecomp::decompose
128 (
129  const labelListList& globalCellCells,
130  const pointField& cellCentres,
131  const scalarField& cWeights
132 )
133 {
135  << notImplementedMessage << exit(FatalError);
136 
137  return labelList::null();
138 }
139 
140 
141 // ************************************************************************* //
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
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:306
Holds information (coordinate and normal) regarding nearest wall point.
static const char * notImplementedMessage
static const List< label > & null()
Return a null List.
Definition: ListI.H:118
Macros for easy insertion into run-time selection tables.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Abstract base class for decomposition.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
scotchDecomp(const dictionary &decompositionDict)
Construct given the decomposition dictionary and mesh.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:76
Namespace for OpenFOAM.