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