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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::oversetPolyPatch
28
29Description
30 Patch for indicating interpolated boundaries (in overset meshes).
31
32SourceFiles
33 oversetPolyPatch.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef oversetPolyPatch_H
38#define oversetPolyPatch_H
39
40#include "polyPatch.H"
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44namespace Foam
45{
46
47class polyMesh;
48
49/*---------------------------------------------------------------------------*\
50 Class oversetPolyPatch Declaration
51\*---------------------------------------------------------------------------*/
54:
55 public polyPatch
56{
57 // Private data
58
59 //- Master patch ID
60 mutable label masterPatchID_;
61
62
63public:
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 (
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// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Patch for indicating interpolated boundaries (in overset meshes).
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
bool master() const
Am I master patch? The master is responsible for doing all.
virtual ~oversetPolyPatch()
Destructor.
TypeName("overset")
Runtime type information.
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:75
friend class polyBoundaryMesh
Definition: polyPatch.H:99
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:364
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
UList< label > labelUList
A UList of labels.
Definition: UList.H:85
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73