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-2026 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  )
72  :
74  {}
75 
76  //- Construct from dictionary
78  (
79  const word& name,
80  const dictionary& dict,
81  const label index,
82  const polyBoundaryMesh& bm
83  )
84  :
86  {}
87 
88  //- Construct as copy, resetting the boundary mesh
90  (
91  const cyclicSlipPolyPatch& pp,
92  const polyBoundaryMesh& bm
93  )
94  :
95  cyclicPolyPatch(pp, bm)
96  {}
97 
98  //- Construct given the original patch and resetting the
99  // face list and boundary mesh information
101  (
102  const cyclicSlipPolyPatch& pp,
103  const polyBoundaryMesh& bm,
104  const label index,
105  const label newSize,
106  const label newStart,
107  const word& nbrPatchName
108  )
109  :
110  cyclicPolyPatch(pp, bm, index, newSize, newStart, nbrPatchName)
111  {}
112 
113  //- Construct and return a clone, resetting the boundary mesh
114  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
115  {
116  return autoPtr<polyPatch>(new cyclicSlipPolyPatch(*this, bm));
117  }
118 
119  //- Construct and return a clone, resetting the face list
120  // and boundary mesh
121  virtual autoPtr<polyPatch> clone
122  (
123  const polyBoundaryMesh& bm,
124  const label index,
125  const label newSize,
126  const label newStart
127  ) const
128  {
129  return autoPtr<polyPatch>
130  (
132  (
133  *this,
134  bm,
135  index,
136  newSize,
137  newStart,
138  nbrPatchName()
139  )
140  );
141  }
142 
143 
144  //- Destructor
145  virtual ~cyclicSlipPolyPatch()
146  {}
147 };
148 
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 } // End namespace Foam
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 #endif
157 
158 // ************************************************************************* //
autoPtr< PrimitivePatch< SubList< face >, const pointField & > > clone() const
Construct and return a clone.
label size() const
Return the number of elements in the UList.
Definition: UListI.H:311
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Cyclic plane patch.
const word & nbrPatchName() const
Neighbour patch name.
Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch which is cyclicSlip with sl...
cyclicSlipPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Construct from components.
TypeName("cyclicSlip")
Runtime type information.
virtual ~cyclicSlipPolyPatch()
Destructor.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
label index() const
Return the index of this patch in the boundaryMesh.
const word & name() const
Return name.
Foam::polyBoundaryMesh.
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:277
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dictionary dict