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-------------------------------------------------------------------------------
11License
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
33static 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
45namespace Foam
46{
49 (
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// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Abstract base class for domain decomposition.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Domain decomposition using METIS-like data structures.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Scotch domain decomposition.
Definition: scotchDecomp.H:233
virtual label decomposeSerial(const labelList &adjncy, const labelList &xadj, const List< scalar > &cWeights, labelList &decomp) const
Decompose non-parallel.
bool decompose() const noexcept
Query the decompose flag (normally off)
A class for handling words, derived from Foam::string.
Definition: word.H:68
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
dynamicFvMesh & mesh
Foam::word regionName(Foam::polyMesh::defaultRegion)
static const char * notImplementedMessage
static const char * notImplementedMessage
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
const pointField & points
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition: List.H:66
error FatalError
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
constexpr char nl
The newline '\n' character (0x0a)
Definition: Ostream.H:53