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