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