cyclicSlipPolyPatch.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 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::cyclicSlipPolyPatch
26 
27 Description
28  Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch
29  which is cyclicSlip with slip constraints
30 
31 SourceFiles
32  cyclicSlipPolyPatch.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef cyclicSlipPolyPatch_H
37 #define cyclicSlipPolyPatch_H
38 
39 #include "cyclicPolyPatch.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class cyclicSlipPolyPatch Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public cyclicPolyPatch
53 {
54 
55 public:
56 
57  //- Runtime type information
58  TypeName("cyclicSlip");
59 
60 
61  // Constructors
62 
63  //- Construct from components
65  (
66  const word& name,
67  const label size,
68  const label start,
69  const label index,
70  const polyBoundaryMesh& bm,
71  const word& patchType
72  )
73  :
74  cyclicPolyPatch(name, size, start, index, bm, 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  cyclicPolyPatch(name, dict, index, bm, patchType)
88  {}
89 
90  //- Construct as copy, resetting the boundary mesh
92  (
93  const cyclicSlipPolyPatch& pp,
94  const polyBoundaryMesh& bm
95  )
96  :
97  cyclicPolyPatch(pp, bm)
98  {}
99 
100  //- Construct given the original patch and resetting the
101  // face list and boundary mesh information
103  (
104  const cyclicSlipPolyPatch& pp,
105  const polyBoundaryMesh& bm,
106  const label index,
107  const label newSize,
108  const label newStart,
109  const word& nbrPatchName
110  )
111  :
112  cyclicPolyPatch(pp, bm, index, newSize, newStart, nbrPatchName)
113  {}
114 
115  //- Construct given the original patch and a map
117  (
118  const cyclicPolyPatch& pp,
119  const polyBoundaryMesh& bm,
120  const label index,
121  const labelUList& mapAddressing,
122  const label newStart
123  )
124  :
125  cyclicPolyPatch(pp, bm, index, mapAddressing, newStart)
126  {}
127 
128  //- Construct and return a clone, resetting the boundary mesh
129  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
130  {
131  return autoPtr<polyPatch>(new cyclicSlipPolyPatch(*this, bm));
132  }
133 
134  //- Construct and return a clone, resetting the face list
135  // and boundary mesh
137  (
138  const polyBoundaryMesh& bm,
139  const label index,
140  const label newSize,
141  const label newStart
142  ) const
143  {
144  return autoPtr<polyPatch>
145  (
147  (
148  *this,
149  bm,
150  index,
151  newSize,
152  newStart,
153  nbrPatchName()
154  )
155  );
156  }
157 
158  //- Construct and return a clone, resetting the face list
159  // and boundary mesh
161  (
162  const polyBoundaryMesh& bm,
163  const label index,
164  const labelUList& mapAddressing,
165  const label newStart
166  ) const
167  {
168  return autoPtr<polyPatch>
169  (
171  (
172  *this,
173  bm,
174  index,
175  mapAddressing,
176  newStart
177  )
178  );
179  }
180 
181 
182  //- Destructor
183  virtual ~cyclicSlipPolyPatch()
184  {}
185 };
186 
187 
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 
190 } // End namespace Foam
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
const word & nbrPatchName() const
Neighbour patch name.
A class for handling words, derived from string.
Definition: word.H:59
Cyclic plane patch.
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
Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch which is cyclicSlip with sl...
virtual ~cyclicSlipPolyPatch()
Destructor.
Foam::polyBoundaryMesh.
autoPtr< PrimitivePatch< FaceList, PointField > > clone() const
Construct and return a clone.
cyclicSlipPolyPatch(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:52
Namespace for OpenFOAM.
TypeName("cyclicSlip")
Runtime type information.