multiLevelDecomp.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 | Copyright (C) 2011-2015 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  //- Disallow default bitwise copy construct and assignment
87  void operator=(const multiLevelDecomp&);
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("multiLevel");
95 
96 
97  // Constructors
98 
99  //- Construct given the decomposition dictionary
100  multiLevelDecomp(const dictionary& decompositionDict);
101 
102 
103  //- Destructor
104  virtual ~multiLevelDecomp()
105  {}
106 
107 
108  // Member Functions
109 
110  //- Is method parallel aware (i.e. does it synchronize domains across
111  // proc boundaries)
112  virtual bool parallelAware() const;
113 
114  //- Inherit decompose from decompositionMethod
116 
117  //- Return for every coordinate the wanted processor number. Use the
118  // mesh connectivity (if needed)
119  virtual labelList decompose
120  (
121  const polyMesh& mesh,
122  const pointField& points,
123  const scalarField& pointWeights
124  );
125 
126  //- Return for every coordinate the wanted processor number. Explicitly
127  // provided connectivity - does not use mesh_.
128  virtual labelList decompose
129  (
130  const labelListList& globalCellCells,
131  const pointField& cc,
132  const scalarField& cWeights
133  );
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual bool parallelAware() const
Is method parallel aware (i.e. does it synchronize domains across.
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:62
TypeName("multiLevel")
Runtime type information.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
virtual ~multiLevelDecomp()
Destructor.
Namespace for OpenFOAM.