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