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,
113  const word& neighbPatchName
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
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,
156  index,
157  newSize,
158  newStart,
160  )
161  );
162  }
163 
164  //- Construct and return a clone, resetting the face list
165  // and boundary mesh
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:62
cyclicPolyPatch.H
Foam::cyclicPolyPatch
Cyclic plane patch.
Definition: cyclicPolyPatch.H:65
Foam::cyclicSlipPolyPatch::cyclicSlipPolyPatch
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.
Definition: cyclicSlipPolyPatch.H:67
Foam::coupledPolyPatch::UNKNOWN
Definition: coupledPolyPatch.H:61
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:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::polyPatch::start
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:313
Foam::coupledPolyPatch::transform
virtual transformType transform() const
Type of transform.
Definition: coupledPolyPatch.H:258
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::cyclicSlipPolyPatch
Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch which is cyclicSlip with sl...
Definition: cyclicSlipPolyPatch.H:52
Foam::cyclicSlipPolyPatch::~cyclicSlipPolyPatch
virtual ~cyclicSlipPolyPatch()=default
Foam::cyclicSlipPolyPatch::TypeName
TypeName("cyclicSlip")
Runtime type information.
Foam::UList< label >
Foam::coupledPolyPatch::transformType
transformType
Definition: coupledPolyPatch.H:59
Foam::patchIdentifier::name
const word & name() const
The patch name.
Definition: patchIdentifier.H:134
Foam::cyclicPolyPatch::neighbPatchName
const word & neighbPatchName() const
Neighbour patch name.
Definition: cyclicPolyPatch.C:802
Foam::patchIdentifier::index
label index() const
The index of this patch in the boundaryMesh.
Definition: patchIdentifier.H:158
Foam::cyclicSlipPolyPatch::clone
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Definition: cyclicSlipPolyPatch.H:134
Foam::cyclicPolyPatch::cyclicPolyPatch
cyclicPolyPatch(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.
Definition: cyclicPolyPatch.C:593