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-2021 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 decomposition dictionary. Region ignored
82  explicit structuredDecomp
83  (
84  const dictionary& decompDict,
85  const word& regionName = ""
86  );
87 
88 
89  //- Destructor
90  virtual ~structuredDecomp() = default;
91 
92 
93  // Member Functions
94 
95  //- Is method parallel aware
96  // (i.e. does it synchronize domains across proc boundaries)
97  virtual bool parallelAware() const;
98 
99  //- Return for every coordinate the wanted processor number.
100  // Use the mesh connectivity (if needed)
101  virtual labelList decompose
102  (
103  const polyMesh& mesh,
104  const pointField& points,
105  const scalarField& pointWeights
106  ) const;
107 
108  //- Return for every coordinate the wanted processor number.
109  // Explicitly provided connectivity - does not use mesh_.
111  (
112  const labelListList& globalCellCells,
113  const pointField& cc,
114  const scalarField& cWeights
115  ) const
116  {
118  return labelList();
119  }
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:67
wordRes.H
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
decompositionMethod.H
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
regionName
Foam::word regionName
Definition: createNamedDynamicFvMesh.H:1
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::Field< vector >
Foam::structuredDecomp::parallelAware
virtual bool parallelAware() const
Is method parallel aware.
Definition: structuredDecomp.C:68
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
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:75