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-------------------------------------------------------------------------------
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::symmetryPolyPatch
28
29Description
30 Symmetry patch for non-planar or multi-plane patches.
31
32SourceFiles
33 symmetryPolyPatch.C
34
35See also
36 symmetryPlanePolyPatch
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef symmetryPolyPatch_H
41#define symmetryPolyPatch_H
42
43#include "polyPatch.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class symmetryPolyPatch Declaration
52\*---------------------------------------------------------------------------*/
55:
56 public polyPatch
57{
58public:
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// ************************************************************************* //
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
Symmetry patch for non-planar or multi-plane patches.
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 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