structuredDecomp.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) 2011-2012 OpenFOAM Foundation
9  Copyright (C) 2018 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::structuredDecomp
29 
30 Description
31  Walk out decomposition of patch cells mesh - selectable as \c structured.
32 
33 SourceFiles
34  structuredDecomp.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef structuredDecomp_H
39 #define structuredDecomp_H
40 
41 #include "decompositionMethod.H"
42 #include "wordRes.H"
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class structuredDecomp Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class structuredDecomp
52 :
53  public decompositionMethod
54 {
55  // Private data
56 
57  dictionary methodDict_;
58 
59  wordRes patches_;
60 
62 
63 
64  // Private Member Functions
65 
66  //- No copy construct
67  structuredDecomp(const structuredDecomp&) = delete;
68 
69  //- No copy assignment
70  void operator=(const structuredDecomp&) = delete;
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("structured");
77 
78 
79  // Constructors
80 
81  //- Construct given the decomposition dictionary
82  structuredDecomp(const dictionary& decompDict);
83 
84 
85  //- Destructor
86  virtual ~structuredDecomp() = default;
87 
88 
89  // Member Functions
90 
91  //- Is method parallel aware
92  // (i.e. does it synchronize domains across proc boundaries)
93  virtual bool parallelAware() const;
94 
95  //- Return for every coordinate the wanted processor number.
96  // Use the mesh connectivity (if needed)
97  virtual labelList decompose
98  (
99  const polyMesh& mesh,
100  const pointField& points,
101  const scalarField& pointWeights
102  ) const;
103 
104  //- Return for every coordinate the wanted processor number.
105  // Explicitly provided connectivity - does not use mesh_.
107  (
108  const labelListList& globalCellCells,
109  const pointField& cc,
110  const scalarField& cWeights
111  ) const
112  {
114  return labelList();
115  }
116 };
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 } // End namespace Foam
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 #endif
126 
127 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:71
wordRes.H
decompositionMethod.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:445
Foam::Field< vector >
Foam::structuredDecomp::parallelAware
virtual bool parallelAware() const
Is method parallel aware.
Definition: structuredDecomp.C:65
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::decompositionMethod
Abstract base class for domain decomposition.
Definition: decompositionMethod.H:51
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::structuredDecomp::TypeName
TypeName("structured")
Runtime type information.
Foam::structuredDecomp::~structuredDecomp
virtual ~structuredDecomp()=default
Destructor.
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::List< label >
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::structuredDecomp
Walk out decomposition of patch cells mesh - selectable as structured.
Definition: structuredDecomp.H:50
Foam::wordRes
A List of wordRe with additional matching capabilities.
Definition: wordRes.H:51
Foam::structuredDecomp::decompose
virtual labelList decompose(const polyMesh &mesh, const pointField &points, const scalarField &pointWeights) const
Return for every coordinate the wanted processor number.
Definition: structuredDecomp.C:72