cyclicSlipPolyPatch.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-2012 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::cyclicSlipPolyPatch
29 
30 Description
31  Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch
32  which is cyclicSlip with slip constraints
33 
34 SourceFiles
35  cyclicSlipPolyPatch.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef cyclicSlipPolyPatch_H
40 #define cyclicSlipPolyPatch_H
41 
42 #include "cyclicPolyPatch.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class cyclicSlipPolyPatch Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public cyclicPolyPatch
56 {
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("cyclicSlip");
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,
76  )
77  :
78  cyclicPolyPatch(name, size, start, index, bm, patchType, transform)
79  {}
80 
81  //- Construct from dictionary
83  (
84  const word& name,
85  const dictionary& dict,
86  const label index,
87  const polyBoundaryMesh& bm,
88  const word& patchType
89  )
90  :
91  cyclicPolyPatch(name, dict, index, bm, patchType)
92  {}
93 
94  //- Construct as copy, resetting the boundary mesh
96  (
97  const cyclicSlipPolyPatch& pp,
98  const polyBoundaryMesh& bm
99  )
100  :
101  cyclicPolyPatch(pp, bm)
102  {}
103 
104  //- Construct given the original patch and resetting the
105  // face list and boundary mesh information
107  (
108  const cyclicSlipPolyPatch& pp,
109  const polyBoundaryMesh& bm,
110  const label index,
111  const label newSize,
112  const label newStart,
114  )
115  :
116  cyclicPolyPatch(pp, bm, index, newSize, newStart, neighbPatchName)
117  {}
118 
119 
120  //- Construct given the original patch and a map
122  (
123  const cyclicPolyPatch& pp,
124  const polyBoundaryMesh& bm,
125  const label index,
126  const labelUList& mapAddressing,
127  const label newStart
128  )
129  :
130  cyclicPolyPatch(pp, bm, index, mapAddressing, newStart)
131  {}
132 
133 
134  //- Construct and return a clone, resetting the boundary mesh
135  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
136  {
137  return autoPtr<polyPatch>(new cyclicSlipPolyPatch(*this, bm));
138  }
139 
140  //- Construct and return a clone, resetting the face list
141  // and boundary mesh
142  virtual autoPtr<polyPatch> clone
143  (
144  const polyBoundaryMesh& bm,
145  const label index,
146  const label newSize,
147  const label newStart
148  ) const
149  {
150  return autoPtr<polyPatch>
151  (
153  (
154  *this,
155  bm,
157  newSize,
158  newStart,
160  )
161  );
162  }
163 
164  //- Construct and return a clone, resetting the face list
165  // and boundary mesh
166  virtual autoPtr<polyPatch> clone
167  (
168  const polyBoundaryMesh& bm,
169  const label index,
170  const labelUList& mapAddressing,
171  const label newStart
172  ) const
173  {
174  return autoPtr<polyPatch>
175  (
177  (
178  *this,
179  bm,
180  index,
181  mapAddressing,
182  newStart
183  )
184  );
185  }
186 
187 
188  // Destructor
189 
190  virtual ~cyclicSlipPolyPatch() = default;
191 
192 
193 };
194 
195 
196 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 
198 } // End namespace Foam
199 
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 
202 #endif
203 
204 // ************************************************************************* //
dictionary dict
friend class polyBoundaryMesh
Definition: polyPatch.H:107
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
label start() const noexcept
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:441
A class for handling words, derived from Foam::string.
Definition: word.H:63
Cyclic plane patch.
Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch which is cyclicSlip with sl...
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
const word & name() const noexcept
The patch name.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
virtual ~cyclicSlipPolyPatch()=default
const word & neighbPatchName() const
Neighbour patch name.
cyclicSlipPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform=UNKNOWN)
Construct from components.
virtual transformType transform() const
Type of transform.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
label index() const noexcept
The index of this patch in the boundaryMesh.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Namespace for OpenFOAM.
TypeName("cyclicSlip")
Runtime type information.