dummyScotchDecomp.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-2021 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 "scotchDecomp.H"
31 #include "Time.H"
32 
33 static const char* notImplementedMessage =
34 "Attempted to use <scotch> without the scotchDecomp library loaded.\n"
35 "This message is from the dummy scotchDecomp stub library instead.\n\n"
36 "Please install <scotch> and ensure libscotch.so is in LD_LIBRARY_PATH.\n"
37 "The scotchDecomp library can then be built from "
38 "src/parallel/decompose/scotchDecomp.\n"
39 "Dynamically loading or linking this library will add "
40 "<scotch> as a decomposition method.\n";
41 
42 
43 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47  defineTypeNameAndDebug(scotchDecomp, 0);
49  (
50  decompositionMethod,
51  scotchDecomp,
52  dictionary
53  );
54 }
55 
56 
57 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
58 
60 (
61  const labelList& adjncy,
62  const labelList& xadj,
63  const List<scalar>& cWeights,
64  labelList& decomp
65 ) const
66 {
69  << exit(FatalError);
70 
71  return -1;
72 }
73 
74 
75 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
76 
78 (
79  const dictionary& decompDict,
80  const word& regionName
81 )
82 :
83  metisLikeDecomp("scotch", decompDict, regionName)
84 {}
85 
86 
87 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
88 
90 (
91  const polyMesh& mesh,
92  const pointField& points,
93  const scalarField& pointWeights
94 ) const
95 {
98 
99  return labelList();
100 }
101 
102 
104 (
105  const polyMesh& mesh,
106  const labelList& agglom,
107  const pointField& agglomPoints,
108  const scalarField& pointWeights
109 ) const
110 {
113 
114  return labelList();
115 }
116 
117 
119 (
120  const labelListList& globalCellCells,
121  const pointField& cellCentres,
122  const scalarField& cWeights
123 ) const
124 {
127 
128  return labelList();
129 }
130 
131 
132 // ************************************************************************* //
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::scotchDecomp::decomposeSerial
virtual label decomposeSerial(const labelList &adjncy, const labelList &xadj, const List< scalar > &cWeights, labelList &decomp) const
Decompose non-parallel.
Definition: dummyScotchDecomp.C:60
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
regionName
Foam::word regionName
Definition: createNamedDynamicFvMesh.H:1
Foam::Field< vector >
scotchDecomp.H
Foam::metisLikeDecomp
Domain decomposition using METIS-like data structures.
Definition: metisLikeDecomp.H:51
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:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
notImplementedMessage
static const char * notImplementedMessage
Definition: dummyScotchDecomp.C:33
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::scotchDecomp::scotchDecomp
scotchDecomp(const scotchDecomp &)=delete
No copy construct.
Time.H
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
Foam::nl
constexpr char nl
Definition: Ostream.H:404
Foam::List< label >
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::scotchDecomp::decompose
virtual labelList decompose(const polyMesh &mesh, const pointField &points, const scalarField &pointWeights) const
Return for every coordinate the wanted processor number.
Definition: dummyScotchDecomp.C:90
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)