Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::cyclicSlipPolyPatch
29
30Description
31 Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch
32 which is cyclicSlip with slip constraints
33
34SourceFiles
35 cyclicSlipPolyPatch.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef cyclicSlipPolyPatch_H
40#define cyclicSlipPolyPatch_H
41
42#include "cyclicPolyPatch.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
49/*---------------------------------------------------------------------------*\
50 Class cyclicSlipPolyPatch Declaration
51\*---------------------------------------------------------------------------*/
52
54:
55 public cyclicPolyPatch
56{
57
58public:
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 (
99 )
100 :
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 )
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,
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// ************************************************************************* //
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
void size(const label n)
Definition UList.H:118
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
Cyclic plane patch.
const word & neighbPatchName() const
Neighbour patch name.
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.
Copy of cyclicSlip - used to be able to instantiate cyclicSlip pointPatch which is cyclicSlip with sl...
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
cyclicSlipPolyPatch(const cyclicSlipPolyPatch &pp, const polyBoundaryMesh &bm)
Construct as copy, resetting the boundary mesh.
virtual ~cyclicSlipPolyPatch()=default
cyclicSlipPolyPatch(const cyclicSlipPolyPatch &pp, const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart, const word &neighbPatchName)
Construct given the original patch and resetting the.
TypeName("cyclicSlip")
Runtime type information.
cyclicSlipPolyPatch(const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from dictionary.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) const
Construct and return a clone, resetting the face list.
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 autoPtr< polyPatch > clone(const polyBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const label newStart) const
Construct and return a clone, resetting the face list.
cyclicSlipPolyPatch(const cyclicPolyPatch &pp, const polyBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const label newStart)
Construct given the original patch and a map.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
label index() const noexcept
The index of this patch in the boundaryMesh.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
friend class polyBoundaryMesh
Definition polyPatch.H:112
label start() const noexcept
Return start label of this patch in the polyMesh face list.
Definition polyPatch.H:446
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
UList< label > labelUList
A UList of labels.
Definition UList.H:75
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68