oversetPolyPatch.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) 2016-2017 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::oversetPolyPatch
28 
29 Description
30  Patch for indicating interpolated boundaries (in overset meshes).
31 
32 SourceFiles
33  oversetPolyPatch.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef oversetPolyPatch_H
38 #define oversetPolyPatch_H
39 
40 #include "polyPatch.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class polyMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class oversetPolyPatch Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class oversetPolyPatch
54 :
55  public polyPatch
56 {
57  // Private data
58 
59  //- Master patch ID
60  mutable label masterPatchID_;
61 
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("overset");
67 
68 
69  // Constructors
70 
71  //- Construct from components
73  (
74  const word& name,
75  const label size,
76  const label start,
77  const label index,
78  const polyBoundaryMesh& bm,
79  const word& patchType
80  );
81 
82  //- Construct from dictionary
84  (
85  const word& name,
86  const dictionary& dict,
87  const label index,
88  const polyBoundaryMesh& bm,
89  const word& patchType
90  );
91 
92 
93  //- Construct as copy, resetting the boundary mesh
95  (
96  const oversetPolyPatch& pp,
97  const polyBoundaryMesh& bm
98  );
99 
100  //- Construct given the original patch and resetting the
101  // face list and boundary mesh information
103  (
104  const oversetPolyPatch& pp,
105  const polyBoundaryMesh& bm,
106  const label index,
107  const label newSize,
108  const label newStart
109  );
110 
111  //- Construct given the original patch and a map
113  (
114  const oversetPolyPatch& pp,
115  const polyBoundaryMesh& bm,
116  const label index,
117  const labelUList& mapAddressing,
118  const label newStart
119  );
120 
121  //- Construct and return a clone, resetting the boundary mesh
122  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
123  {
124  return autoPtr<polyPatch>(new oversetPolyPatch(*this, bm));
125  }
126 
127  //- Construct and return a clone, resetting the face list
128  // and boundary mesh
130  (
131  const polyBoundaryMesh& bm,
132  const label index,
133  const label newSize,
134  const label newStart
135  ) const
136  {
137  return autoPtr<polyPatch>
138  (
139  new oversetPolyPatch(*this, bm, index, newSize, newStart)
140  );
141  }
142 
143  //- Construct and return a clone, resetting the face list
144  // and boundary mesh
146  (
147  const polyBoundaryMesh& bm,
148  const label index,
149  const labelUList& mapAddressing,
150  const label newStart
151  ) const
152  {
153  return autoPtr<polyPatch>
154  (
155  new oversetPolyPatch
156  (
157  *this,
158  bm,
159  index,
160  mapAddressing,
161  newStart
162  )
163  );
164  }
165 
166 
167  //- Destructor
168  virtual ~oversetPolyPatch();
169 
170 
171  // Member functions
172 
173  //- Am I master patch? The master is responsible for doing all
174  // interpolation.
175  bool master() const;
176 };
177 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 } // End namespace Foam
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #endif
186 
187 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:63
polyPatch.H
Foam::oversetPolyPatch::master
bool master() const
Am I master patch? The master is responsible for doing all.
Definition: oversetPolyPatch.C:127
Foam::oversetPolyPatch
Patch for indicating interpolated boundaries (in overset meshes).
Definition: oversetPolyPatch.H:52
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::patchIdentifier::index
label index() const noexcept
The index of this patch in the boundaryMesh.
Definition: patchIdentifier.H:147
Foam::polyPatch::start
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:361
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::UList< label >
Foam::patchIdentifier::name
const word & name() const noexcept
The patch name.
Definition: patchIdentifier.H:135
Foam::oversetPolyPatch::clone
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Definition: oversetPolyPatch.H:121
Foam::oversetPolyPatch::~oversetPolyPatch
virtual ~oversetPolyPatch()
Destructor.
Definition: oversetPolyPatch.C:121
Foam::oversetPolyPatch::oversetPolyPatch
oversetPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
Definition: oversetPolyPatch.C:46
Foam::oversetPolyPatch::TypeName
TypeName("overset")
Runtime type information.