dummyPtscotchDecomp.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2015 OpenFOAM Foundation
9  Copyright (C) 2018-2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "ptscotchDecomp.H"
31 #include "Time.H"
32 
33 static const char* notImplementedMessage =
34 "Attempted to use <ptscotch> without the ptscotchDecomp library loaded.\n"
35 "This message is from the dummy ptscotchDecomp stub library instead.\n\n"
36 "Please install <ptscotch> and ensure libptscotch.so is in LD_LIBRARY_PATH.\n"
37 "The ptscotchDecomp library can then be built from "
38 "src/parallel/decompose/ptscotchDecomp.\n"
39 "Dynamically loading or linking this library will add "
40 "<ptscotch> as a decomposition method.\n";
41 
42 
43 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47  defineTypeNameAndDebug(ptscotchDecomp, 0);
48 
50  (
51  decompositionMethod,
52  ptscotchDecomp,
53  dictionary
54  );
55 }
56 
57 
58 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
59 
60 void Foam::ptscotchDecomp::graphPath(const polyMesh& unused) const {}
61 void Foam::ptscotchDecomp::check(const int retVal, const char* str) {}
62 
63 
64 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
65 
66 Foam::label Foam::ptscotchDecomp::decompose
67 (
68  const labelList& adjncy,
69  const labelList& xadj,
70  const List<scalar>& cWeights,
71  labelList& finalDecomp
72 ) const
73 {
76 
77  return -1;
78 }
79 
80 
81 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
82 
83 Foam::label Foam::ptscotchDecomp::decompose
84 (
85  const label adjncySize,
86  const label adjncy[],
87  const label xadjSize,
88  const label xadj[],
89  const List<scalar>& cWeights,
90  labelList& finalDecomp
91 ) const
92 {
95 
96  return -1;
97 }
98 
99 
100 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
101 
102 Foam::ptscotchDecomp::ptscotchDecomp
103 (
104  const dictionary& decompDict
105 )
106 :
107  decompositionMethod(decompDict),
108  coeffsDict_(dictionary::null)
109 {}
110 
111 
112 Foam::ptscotchDecomp::ptscotchDecomp
113 (
114  const dictionary& decompDict,
115  const word& regionName
116 )
117 :
118  decompositionMethod(decompDict, regionName),
119  coeffsDict_(dictionary::null)
120 {}
121 
122 
123 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
124 
125 Foam::labelList Foam::ptscotchDecomp::decompose
126 (
127  const polyMesh& mesh,
128  const pointField& points,
129  const scalarField& pointWeights
130 ) const
131 {
134 
135  return labelList();
136 }
137 
138 
139 Foam::labelList Foam::ptscotchDecomp::decompose
140 (
141  const polyMesh& mesh,
142  const labelList& agglom,
143  const pointField& agglomPoints,
144  const scalarField& pointWeights
145 ) const
146 {
149 
150  return labelList();
151 }
152 
153 
154 Foam::labelList Foam::ptscotchDecomp::decompose
155 (
156  const labelListList& globalCellCells,
157  const pointField& cellCentres,
158  const scalarField& cWeights
159 ) const
160 {
163 
164  return labelList();
165 }
166 
167 
168 // ************************************************************************* //
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:71
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::dictionary::null
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Definition: dictionary.H:385
regionName
Foam::word regionName
Definition: createNamedDynamicFvMesh.H:1
Foam::Field< vector >
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::decompositionMethod
Abstract base class for domain decomposition.
Definition: decompositionMethod.H:51
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Time.H
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:381
notImplementedMessage
static const char * notImplementedMessage
Definition: dummyPtscotchDecomp.C:33
Foam::List< label >
points
const pointField & points
Definition: gmvOutputHeader.H:1
ptscotchDecomp.H
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)