All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
simpleGeomDecomp.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-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::simpleGeomDecomp
26 
27 Description
28 
29 SourceFiles
30  simpleGeomDecomp.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef simpleGeomDecomp_H
35 #define simpleGeomDecomp_H
36 
37 #include "geomDecomp.H"
38 
39 namespace Foam
40 {
41 
42 /*---------------------------------------------------------------------------*\
43  Class simpleGeomDecomp Declaration
44 \*---------------------------------------------------------------------------*/
45 
46 class simpleGeomDecomp
47 :
48  public geomDecomp
49 {
50  // Private Member Functions
51 
52  void assignToProcessorGroup(labelList&, const label) const;
53 
54  void assignToProcessorGroup
55  (
56  labelList& processorGroup,
57  const label nProcGroup,
58  const labelList& indices,
59  const scalarField& weights,
60  const scalar summedWeights
61  ) const;
62 
63  labelList decomposeOneProc(const pointField& points) const;
64 
65  labelList decomposeOneProc
66  (
67  const pointField& points,
68  const scalarField& weights
69  ) const;
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("simple");
76 
77 
78  // Constructors
79 
80  //- Construct given the decomposition dictionary
81  simpleGeomDecomp(const dictionary& decompositionDict);
82 
83  //- Disallow default bitwise copy construction
84  simpleGeomDecomp(const simpleGeomDecomp&) = delete;
85 
86 
87  //- Destructor
88  virtual ~simpleGeomDecomp()
89  {}
90 
91 
92  // Member Functions
93 
94  virtual bool parallelAware() const
95  {
96  // simpleDecomp sends all points to the master which does
97  // the decomposition.
98  return true;
99  }
100 
101  virtual labelList decompose(const pointField&);
102 
103  virtual labelList decompose(const pointField&, const scalarField&);
105  virtual labelList decompose(const polyMesh&, const pointField& points)
106  {
107  return decompose(points);
108  }
109 
111  (
112  const polyMesh&,
113  const pointField& points,
114  const scalarField& pointWeights
115  )
116  {
117  return decompose(points, pointWeights);
118  }
119 
120  //- Explicitly provided connectivity
122  (
123  const labelListList& globalCellCells,
124  const pointField& cc,
125  const scalarField& cWeights
126  )
127  {
128  return decompose(cc, cWeights);
129  }
130 
131 
132  // Member Operators
133 
134  //- Disallow default bitwise assignment
135  void operator=(const simpleGeomDecomp&) = delete;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
TypeName("simple")
Runtime type information.
virtual ~simpleGeomDecomp()
Destructor.
Geometrical domain decomposition.
Definition: geomDecomp.H:47
virtual bool parallelAware() const
Is method parallel aware (i.e. does it synchronize domains across.
virtual labelList decompose(const pointField &)
Like decompose but with uniform weights on the points.
void operator=(const simpleGeomDecomp &)=delete
Disallow default bitwise assignment.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
simpleGeomDecomp(const dictionary &decompositionDict)
Construct given the decomposition dictionary.
Namespace for OpenFOAM.