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 | Copyright (C) 2011-2015 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  dictionary
52  );
53 }
54 
55 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
56 
57 void Foam::ptscotchDecomp::check(const int retVal, const char* str)
58 {}
59 
60 
62 (
63  const fileName& meshPath,
64  const List<label>& initxadj,
65  const List<label>& initadjncy,
66  const scalarField& initcWeights,
67 
68  List<label>& finalDecomp
69 ) const
70 {
73 
74  return -1;
75 }
76 
77 
79 (
80  const fileName& meshPath,
81  const label adjncySize,
82  const label adjncy[],
83  const label xadjSize,
84  const label xadj[],
85  const scalarField& cWeights,
86  List<label>& finalDecomp
87 ) const
88 {
91 
92  return -1;
93 }
94 
95 
96 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
97 
99 (
100  const dictionary& decompositionDict
101 )
102 :
103  decompositionMethod(decompositionDict)
104 {}
105 
106 
107 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
108 
110 (
111  const polyMesh& mesh,
112  const pointField& points,
113  const scalarField& pointWeights
114 )
115 {
118 
119  return labelList::null();
120 }
121 
122 
124 (
125  const polyMesh& mesh,
126  const labelList& agglom,
127  const pointField& agglomPoints,
128  const scalarField& pointWeights
129 )
130 {
133 
134  return labelList::null();
135 }
136 
137 
139 (
140  const labelListList& globalCellCells,
141  const pointField& cellCentres,
142  const scalarField& cWeights
143 )
144 {
147 
148  return labelList::null();
149 }
150 
151 
152 // ************************************************************************* //
Foam::List::null
static const List< T > & null()
Return a null List.
Definition: ListI.H:43
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::ptscotchDecomp::ptscotchDecomp
ptscotchDecomp(const ptscotchDecomp &)
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::decompositionMethod
Abstract base class for decomposition.
Definition: decompositionMethod.H:48
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
notImplementedMessage
static const char * notImplementedMessage
Definition: dummyPtscotchDecomp.C:30
Foam::ptscotchDecomp::decompose
label decompose(const fileName &meshPath, const List< label > &adjncy, const List< label > &xadj, const scalarField &cWeights, List< label > &finalDecomp) const
Decompose. Handles size 0 arrays.
Definition: dummyPtscotchDecomp.C:62
Foam::ptscotchDecomp::check
static void check(const int, const char *)
Check and print error message.
Definition: dummyPtscotchDecomp.C:57
Foam::List< label >
points
const pointField & points
Definition: gmvOutputHeader.H:1
ptscotchDecomp.H
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)