nonuniformTransformCyclicPolyPatch.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-2016 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::nonuniformTransformCyclicPolyPatch
29 
30 Description
31  Transform boundary used in extruded regions. Allows non-uniform transforms.
32  Wip.
33 
34 SourceFiles
35  nonuniformTransformCyclicPolyPatch.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef nonuniformTransformCyclicPolyPatch_H
40 #define nonuniformTransformCyclicPolyPatch_H
41 
42 #include "cyclicPolyPatch.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class nonuniformTransformCyclicPolyPatch Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public cyclicPolyPatch
56 {
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("nonuniformTransformCyclic");
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  (
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  (
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  //- Construct given the original patch and a map
121  (
123  const polyBoundaryMesh& bm,
124  const label index,
125  const labelUList& mapAddressing,
126  const label newStart
127  )
128  :
129  cyclicPolyPatch(pp, bm, index, mapAddressing, newStart)
130  {}
131 
132  //- Construct and return a clone, resetting the boundary mesh
133  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
134  {
135  return autoPtr<polyPatch>
136  (
138  );
139  }
140 
141  //- Construct and return a clone, resetting the face list
142  // and boundary mesh
144  (
145  const polyBoundaryMesh& bm,
146  const label index,
147  const label newSize,
148  const label newStart
149  ) const
150  {
151  return autoPtr<polyPatch>
152  (
154  (
155  *this,
156  bm,
157  index,
158  newSize,
159  newStart,
161  )
162  );
163  }
164 
165  //- Construct and return a clone, resetting the face list
166  // and boundary mesh
168  (
169  const polyBoundaryMesh& bm,
170  const label index,
171  const labelUList& mapAddressing,
172  const label newStart
173  ) const
174  {
175  return autoPtr<polyPatch>
176  (
178  (
179  *this,
180  bm,
181  index,
182  mapAddressing,
183  newStart
184  )
185  );
186  }
187 
188 
189  // Destructor
190 
191  virtual ~nonuniformTransformCyclicPolyPatch() = default;
192 
193 
194 };
195 
196 
197 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 
199 } // End namespace Foam
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 #endif
204 
205 // ************************************************************************* //
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::nonuniformTransformCyclicPolyPatch::~nonuniformTransformCyclicPolyPatch
virtual ~nonuniformTransformCyclicPolyPatch()=default
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::nonuniformTransformCyclicPolyPatch::TypeName
TypeName("nonuniformTransformCyclic")
Runtime type information.
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::nonuniformTransformCyclicPolyPatch
Transform boundary used in extruded regions. Allows non-uniform transforms. Wip.
Definition: nonuniformTransformCyclicPolyPatch.H:52
Foam::nonuniformTransformCyclicPolyPatch::clone
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Definition: nonuniformTransformCyclicPolyPatch.H:132
Foam::UList< label >
Foam::nonuniformTransformCyclicPolyPatch::nonuniformTransformCyclicPolyPatch
nonuniformTransformCyclicPolyPatch(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: nonuniformTransformCyclicPolyPatch.H:67
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::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