multiLevelDecomp.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::multiLevelDecomp
26 
27 Description
28  Decomposition given using consecutive application of decomposers.
29 
30 SourceFiles
31  multiLevelDecomp.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef multiLevelDecomp_H
36 #define multiLevelDecomp_H
37 
38 #include "decompositionMethod.H"
39 
40 namespace Foam
41 {
42 
43 /*---------------------------------------------------------------------------*\
44  Class multiLevelDecomp Declaration
45 \*---------------------------------------------------------------------------*/
46 
47 class multiLevelDecomp
48 :
49  public decompositionMethod
50 {
51  // Private Data
52 
53  dictionary methodsDict_;
54 
56 
57 
58  // Private Member Functions
59 
60  //- Given connectivity across processors work out connectivity
61  // for a (consistent) subset
62  void subsetGlobalCellCells
63  (
64  const label nDomains,
65  const label domainI,
66  const labelList& dist,
67 
68  const labelListList& cellCells,
69  const labelList& set,
70  labelListList& subCellCells,
71  labelList& cutConnections
72  ) const;
73 
74  //- Decompose level methodI without addressing
75  void decompose
76  (
77  const labelListList& pointPoints,
78  const pointField& points,
79  const scalarField& pointWeights,
80  const labelList& pointMap, // map back to original points
81  const label levelI,
82 
83  labelField& finalDecomp
84  );
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("multiLevel");
91 
92 
93  // Constructors
94 
95  //- Construct given the decomposition dictionary
96  multiLevelDecomp(const dictionary& decompositionDict);
97 
98  //- Disallow default bitwise copy construction
99  multiLevelDecomp(const multiLevelDecomp&) = delete;
100 
101 
102  //- Destructor
103  virtual ~multiLevelDecomp()
104  {}
105 
106 
107  // Member Functions
108 
109  //- Is method parallel aware (i.e. does it synchronize domains across
110  // proc boundaries)
111  virtual bool parallelAware() const;
112 
113  //- Inherit decompose from decompositionMethod
115 
116  //- Return for every coordinate the wanted processor number. Use the
117  // mesh connectivity (if needed)
118  virtual labelList decompose
119  (
120  const polyMesh& mesh,
121  const pointField& points,
122  const scalarField& pointWeights
123  );
124 
125  //- Return for every coordinate the wanted processor number. Explicitly
126  // provided connectivity - does not use mesh_.
127  virtual labelList decompose
128  (
129  const labelListList& globalCellCells,
130  const pointField& cc,
131  const scalarField& cWeights
132  );
133 
134 
135  // Member Operators
136 
137  //- Disallow default bitwise assignment
138  void operator=(const multiLevelDecomp&) = delete;
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
virtual labelList decompose(const pointField &points, const scalarField &pointWeights)
Return for every coordinate the wanted processor number.
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
multiLevelDecomp(const dictionary &decompositionDict)
Construct given the decomposition dictionary.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
dynamicFvMesh & mesh
Decomposition given using consecutive application of decomposers.
const pointField & points
Abstract base class for decomposition.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:70
void operator=(const multiLevelDecomp &)=delete
Disallow default bitwise assignment.
TypeName("multiLevel")
Runtime type information.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
virtual bool parallelAware() const
Is method parallel aware (i.e. does it synchronize domains across.
virtual ~multiLevelDecomp()
Destructor.
Namespace for OpenFOAM.