symmetryPolyPatch.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) 2011-2016 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::symmetryPolyPatch
26 
27 Description
28  Symmetry patch for non-planar or multi-plane patches.
29 
30 SourceFiles
31  symmetryPolyPatch.C
32 
33 See also
34  symmetryPlanePolyPatch
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef symmetryPolyPatch_H
39 #define symmetryPolyPatch_H
40 
41 #include "polyPatch.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class symmetryPolyPatch Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public polyPatch
55 {
56 public:
57 
58  //- Runtime type information
59  TypeName("symmetry");
60 
61 
62  // Constructors
63 
64  //- Construct from components
66  (
67  const word& name,
68  const label size,
69  const label start,
70  const label index,
71  const polyBoundaryMesh& bm,
72  const word& patchType
73  );
74 
75  //- Construct from dictionary
77  (
78  const word& name,
79  const dictionary& dict,
80  const label index,
81  const polyBoundaryMesh& bm,
82  const word& patchType
83  );
84 
85  //- Construct as copy, resetting the boundary mesh
87 
88  //- Construct given the original patch and resetting the
89  // face list and boundary mesh information
91  (
92  const symmetryPolyPatch& pp,
93  const polyBoundaryMesh& bm,
94  const label index,
95  const label newSize,
96  const label newStart
97  );
98 
99  //- Construct given the original patch and a map
101  (
102  const symmetryPolyPatch& pp,
103  const polyBoundaryMesh& bm,
104  const label index,
105  const labelUList& mapAddressing,
106  const label newStart
107  );
108 
109  //- Construct and return a clone, resetting the boundary mesh
110  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
111  {
112  return autoPtr<polyPatch>(new symmetryPolyPatch(*this, bm));
113  }
114 
115  //- Construct and return a clone, resetting the face list
116  // and boundary mesh
118  (
119  const polyBoundaryMesh& bm,
120  const label index,
121  const label newSize,
122  const label newStart
123  ) const
124  {
125  return autoPtr<polyPatch>
126  (
127  new symmetryPolyPatch(*this, bm, index, newSize, newStart)
128  );
129  }
130 
131  //- Construct and return a clone, resetting the face list
132  // and boundary mesh
134  (
135  const polyBoundaryMesh& bm,
136  const label index,
137  const labelUList& mapAddressing,
138  const label newStart
139  ) const
140  {
141  return autoPtr<polyPatch>
142  (
143  new symmetryPolyPatch(*this, bm, index, mapAddressing, newStart)
144  );
145  }
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #endif
156 
157 // ************************************************************************* //
Symmetry patch for non-planar or multi-plane patches.
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
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
TypeName("symmetry")
Runtime type information.
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.
symmetryPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
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.