manualDecomp.H
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-2019 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 Class
25  Foam::manualDecomp
26 
27 Description
28  Decomposition given a cell-to-processor association in a file
29 
30 SourceFiles
31  manualDecomp.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef manualDecomp_H
36 #define manualDecomp_H
37 
38 #include "decompositionMethod.H"
39 
40 namespace Foam
41 {
42 
43 /*---------------------------------------------------------------------------*\
44  Class manualDecomp Declaration
45 \*---------------------------------------------------------------------------*/
46 
47 class manualDecomp
48 :
49  public decompositionMethod
50 {
51  // Private Data
52 
53  fileName decompDataFile_;
54 
55 
56 public:
57 
58  //- Runtime type information
59  TypeName("manual");
60 
61 
62  // Constructors
63 
64  //- Construct given the decomposition dictionary
65  manualDecomp(const dictionary& decompositionDict);
66 
67  //- Disallow default bitwise copy construction
68  manualDecomp(const manualDecomp&) = delete;
69 
70 
71  //- Destructor
72  virtual ~manualDecomp()
73  {}
74 
75 
76  // Member Functions
77 
78  //- Manual decompose does not care about proc boundaries - is all
79  // up to the user.
80  virtual bool parallelAware() const
81  {
82  return true;
83  }
84 
85  //- Return for every coordinate the wanted processor number. Use the
86  // mesh connectivity (if needed)
87  virtual labelList decompose
88  (
89  const polyMesh& mesh,
90  const pointField& cc,
91  const scalarField& cWeights
92  );
93 
94  //- Return for every coordinate the wanted processor number. Explicitly
95  // provided connectivity - does not use mesh_.
96  // The connectivity is equal to mesh.cellCells() except for
97  // - in parallel the cell numbers are global cell numbers (starting
98  // from 0 at processor0 and then incrementing all through the
99  // processors)
100  // - the connections are across coupled patches
102  (
103  const labelListList& globalCellCells,
104  const pointField& cc,
105  const scalarField& cWeights
106  )
107  {
109  return labelList(0);
110  }
111 
112 
113  // Member Operators
114 
115  //- Disallow default bitwise assignment
116  void operator=(const manualDecomp&) = delete;
117 };
118 
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
A class for handling file names.
Definition: fileName.H:79
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual ~manualDecomp()
Destructor.
Definition: manualDecomp.H:71
virtual labelList decompose(const polyMesh &mesh, const pointField &cc, const scalarField &cWeights)
Return for every coordinate the wanted processor number. Use the.
Definition: manualDecomp.C:67
manualDecomp(const dictionary &decompositionDict)
Construct given the decomposition dictionary.
Definition: manualDecomp.C:51
dynamicFvMesh & mesh
List< label > labelList
A List of labels.
Definition: labelList.H:56
Abstract base class for decomposition.
TypeName("manual")
Runtime type information.
virtual bool parallelAware() const
Manual decompose does not care about proc boundaries - is all.
Definition: manualDecomp.H:79
void operator=(const manualDecomp &)=delete
Disallow default bitwise assignment.
Decomposition given a cell-to-processor association in a file.
Definition: manualDecomp.H:46
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:366
Namespace for OpenFOAM.