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 | Copyright (C) 2013-2014 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::symmetryPlanePolyPatch
26 
27 Description
28  Symmetry-plane patch.
29 
30 SourceFiles
31  symmetryPlanePolyPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef symmetryPlanePolyPatch_H
36 #define symmetryPlanePolyPatch_H
37 
38 #include "polyPatch.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class symmetryPlanePolyPatch Declaration
47 \*---------------------------------------------------------------------------*/
48 
50 :
51  public polyPatch
52 {
53  // Private data
54 
55  //- Symmetry plane normal
56  vector n_;
57 
58 
59 protected:
60 
61  // Protected Member Functions
62 
63  //- Calculate the patch geometry
64  virtual void calcGeometry(PstreamBuffers&);
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("symmetryPlane");
71 
72 
73  // Constructors
74 
75  //- Construct from components
77  (
78  const word& name,
79  const label size,
80  const label start,
81  const label index,
82  const polyBoundaryMesh& bm,
83  const word& patchType
84  );
85 
86  //- Construct from dictionary
88  (
89  const word& name,
90  const dictionary& dict,
91  const label index,
92  const polyBoundaryMesh& bm,
93  const word& patchType
94  );
95 
96  //- Construct as copy, resetting the boundary mesh
98  (
100  const polyBoundaryMesh&
101  );
102 
103  //- Construct given the original patch and resetting the
104  // face list and boundary mesh information
106  (
107  const symmetryPlanePolyPatch& pp,
108  const polyBoundaryMesh& bm,
109  const label index,
110  const label newSize,
111  const label newStart
112  );
113 
114  //- Construct given the original patch and a map
116  (
117  const symmetryPlanePolyPatch& pp,
118  const polyBoundaryMesh& bm,
119  const label index,
120  const labelUList& mapAddressing,
121  const label newStart
122  );
123 
124  //- Construct and return a clone, resetting the boundary mesh
125  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
126  {
127  return autoPtr<polyPatch>(new symmetryPlanePolyPatch(*this, bm));
128  }
129 
130  //- Construct and return a clone, resetting the face list
131  // and boundary mesh
133  (
134  const polyBoundaryMesh& bm,
135  const label index,
136  const label newSize,
137  const label newStart
138  ) const
139  {
140  return autoPtr<polyPatch>
141  (
142  new symmetryPlanePolyPatch(*this, bm, index, newSize, newStart)
143  );
144  }
145 
146  //- Construct and return a clone, resetting the face list
147  // and boundary mesh
149  (
150  const polyBoundaryMesh& bm,
151  const label index,
152  const labelUList& mapAddressing,
153  const label newStart
154  ) const
155  {
156  return autoPtr<polyPatch>
157  (
159  (
160  *this,
161  bm,
162  index,
163  mapAddressing,
164  newStart
165  )
166  );
167  }
168 
169 
170  // Member Functions
171 
172  //- Return symmetry plane normal
173  const vector& n() const
174  {
175  return n_;
176  }
177 };
178 
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 } // End namespace Foam
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #endif
187 
188 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
symmetryPlanePolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
TypeName("symmetryPlane")
Runtime type information.
const vector & n() const
Return symmetry plane normal.
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.
A class for handling words, derived from string.
Definition: word.H:59
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
Foam::polyBoundaryMesh.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Namespace for OpenFOAM.