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
68  (
69  const dictionary& decompositionDict,
70  const dictionary& methodDict
71  );
72 
73  //- Disallow default bitwise copy construction
74  manual(const manual&) = delete;
75 
76 
77  //- Destructor
78  virtual ~manual()
79  {}
80 
81 
82  // Member Functions
83 
84  //- Return for every coordinate the wanted processor number. Use the
85  // mesh connectivity (if needed)
86  virtual labelList decompose
87  (
88  const polyMesh& mesh,
89  const pointField& cellCentres,
90  const scalarField& cellWeights
91  );
92 
93  //- Return for every coordinate the wanted processor number. Explicitly
94  // provided connectivity - does not use mesh_.
95  // The connectivity is equal to mesh.cellCells() except for
96  // - in parallel the cell numbers are global cell numbers (starting
97  // from 0 at processor0 and then incrementing all through the
98  // processors)
99  // - the connections are across coupled patches
100  virtual labelList decompose
101  (
102  const labelListList& globalCellCells,
103  const pointField& cellCentres,
104  const scalarField& cellWeights
105  )
106  {
108  return labelList(0);
109  }
110 
111 
112  // Member Operators
113 
114  //- Disallow default bitwise assignment
115  void operator=(const manual&) = delete;
116 };
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace decompositionMethods
122 } // End namespace Foam
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 #endif
127 
128 // ************************************************************************* //
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:72
virtual ~manual()
Destructor.
Definition: manual.H:77
TypeName("manual")
Runtime type information.
manual(const dictionary &decompositionDict, const dictionary &methodDict)
Construct given the decomposition dictionary.
Definition: manual.C:59
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A class for handling file names.
Definition: fileName.H:82
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#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