noDecomp.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2012-2015 OpenFOAM Foundation
9  Copyright (C) 2017-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::noDecomp
29 
30 Description
31  A dummy decomposition method, selected as \c none.
32 
33  Method coefficients: \a none
34 
35 SourceFiles
36  noDecomp.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Foam_noDecomp_H
41 #define Foam_noDecomp_H
42 
43 #include "decompositionMethod.H"
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class noDecomp Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class noDecomp
53 :
54  public decompositionMethod
55 {
56 public:
57 
58  // Generated Methods
59 
60  //- No copy construct
61  noDecomp(const noDecomp&) = delete;
62 
63  //- No copy assignment
64  void operator=(const noDecomp&) = delete;
65 
66 
67  //- Runtime type information
68  TypeNameNoDebug("none");
69 
70 
71  // Constructors
72 
73  //- Construct with number of domains (ignored)
74  explicit noDecomp(const label numDomains);
75 
76  //- Construct given decomposition dictionary and optional region name
77  explicit noDecomp
78  (
79  const dictionary& decompDict,
80  const word& regionName = ""
81  );
82 
83 
84  //- Destructor
85  virtual ~noDecomp() = default;
86 
87 
88  // Member Functions
89 
90  //- Does not care about proc boundaries
91  virtual bool parallelAware() const
92  {
93  return true;
94  }
95 
96  //- Return for every coordinate the wanted processor number.
97  virtual labelList decompose
98  (
99  const pointField& points,
100  const scalarField& pointWeights_unused = scalarField::null()
101  ) const;
102 
103  //- Return for every cell the current local processor rank.
104  virtual labelList decompose
105  (
106  const polyMesh& mesh,
107  const pointField& cc_unused = pointField::null(),
108  const scalarField& cWeights_unused = scalarField::null()
109  ) const;
110 
111  //- Return for every cell the current local processor rank.
112  virtual labelList decompose
113  (
114  const CompactListList<label>& globalCellCells,
115  const pointField& cc_unused = pointField::null(),
116  const scalarField& cWeights_unused = scalarField::null()
117  ) const;
118 
119  //- Return for every cell the current local processor rank.
120  virtual labelList decompose
121  (
122  const labelListList& globalCellCells,
123  const pointField& cc_unused = pointField::null(),
124  const scalarField& cWeights_unused = scalarField::null()
125  ) const;
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #endif
136 
137 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
dynamicFvMesh & mesh
A dummy decomposition method, selected as none.
Definition: noDecomp.H:47
const pointField & points
A class for handling words, derived from Foam::string.
Definition: word.H:63
void operator=(const noDecomp &)=delete
No copy assignment.
Abstract base class for domain decomposition.
A packed storage of objects of type <T> using an offset table for access.
noDecomp(const noDecomp &)=delete
No copy construct.
TypeNameNoDebug("none")
Runtime type information.
virtual labelList decompose(const pointField &points, const scalarField &pointWeights_unused=scalarField::null()) const
Return for every coordinate the wanted processor number.
Definition: noDecomp.C:61
Foam::word regionName(args.getOrDefault< word >("region", Foam::polyMesh::defaultRegion))
static const Field< scalar > & null()
Return nullObject reference Field.
Definition: FieldI.H:24
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
virtual bool parallelAware() const
Does not care about proc boundaries.
Definition: noDecomp.H:100
virtual ~noDecomp()=default
Destructor.
Namespace for OpenFOAM.