symmetryPlanePolyPatch.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) 2013-2014 OpenFOAM Foundation
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::symmetryPlanePolyPatch
28
29Description
30 Symmetry-plane patch.
31
32SourceFiles
33 symmetryPlanePolyPatch.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef symmetryPlanePolyPatch_H
38#define symmetryPlanePolyPatch_H
39
40#include "polyPatch.H"
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44namespace Foam
45{
46
47/*---------------------------------------------------------------------------*\
48 Class symmetryPlanePolyPatch Declaration
49\*---------------------------------------------------------------------------*/
52:
53 public polyPatch
54{
55 // Private data
56
57 //- Symmetry plane normal
58 vector n_;
59
60
61protected:
62
63 // Protected Member Functions
64
65 //- Calculate the patch geometry
66 virtual void calcGeometry(PstreamBuffers&);
67
68
69public:
70
71 //- Runtime type information
72 TypeName("symmetryPlane");
73
74
75 // Constructors
76
77 //- Construct from components
79 (
80 const word& name,
81 const label size,
82 const label start,
83 const label index,
84 const polyBoundaryMesh& bm,
85 const word& patchType
86 );
87
88 //- Construct from dictionary
90 (
91 const word& name,
92 const dictionary& dict,
93 const label index,
94 const polyBoundaryMesh& bm,
95 const word& patchType
96 );
97
98 //- Construct as copy, resetting the boundary mesh
100 (
102 const polyBoundaryMesh&
103 );
104
105 //- Construct given the original patch and resetting the
106 // face list and boundary mesh information
108 (
109 const symmetryPlanePolyPatch& pp,
110 const polyBoundaryMesh& bm,
111 const label index,
112 const label newSize,
113 const label newStart
114 );
115
116 //- Construct given the original patch and a map
118 (
119 const symmetryPlanePolyPatch& pp,
120 const polyBoundaryMesh& bm,
121 const label index,
122 const labelUList& mapAddressing,
123 const label newStart
124 );
125
126 //- Construct and return a clone, resetting the boundary mesh
127 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
128 {
129 return autoPtr<polyPatch>(new symmetryPlanePolyPatch(*this, bm));
130 }
131
132 //- Construct and return a clone, resetting the face list
133 // and boundary mesh
135 (
136 const polyBoundaryMesh& bm,
137 const label index,
138 const label newSize,
139 const label newStart
140 ) const
141 {
142 return autoPtr<polyPatch>
143 (
144 new symmetryPlanePolyPatch(*this, bm, index, newSize, newStart)
145 );
146 }
147
148 //- Construct and return a clone, resetting the face list
149 // and boundary mesh
151 (
152 const polyBoundaryMesh& bm,
153 const label index,
154 const labelUList& mapAddressing,
155 const label newStart
156 ) const
157 {
158 return autoPtr<polyPatch>
159 (
161 (
162 *this,
163 bm,
164 index,
165 mapAddressing,
166 newStart
167 )
168 );
169 }
170
171
172 // Member Functions
173
174 //- Return symmetry plane normal
175 const vector& n() const
176 {
177 return n_;
178 }
179};
180
181
182// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183
184} // End namespace Foam
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188#endif
189
190// ************************************************************************* //
Buffers for inter-processor communications streams (UOPstream, UIPstream).
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
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
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
TypeName("symmetryPlane")
Runtime type information.
const vector & n() const
Return symmetry plane normal.
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