mappedExtrudedWallPolyPatch.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-2023 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::mappedExtrudedWallPolyPatch
26 
27 Description
28  Wall patch which holds a mapping engine to map values from another patch
29 
30 SourceFiles
31  mappedExtrudedWallPolyPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef mappedExtrudedWallPolyPatch_H
36 #define mappedExtrudedWallPolyPatch_H
37 
38 #include "wallPolyPatch.H"
40 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class mappedExtrudedWallPolyPatch Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public wallPolyPatch,
55 {
56 protected:
57 
58  // Protected Member Functions
59 
60  //- Calculate the patch geometry
61  virtual void calcGeometry(PstreamBuffers&);
62 
63  //- Correct patches after moving points
64  virtual void movePoints(PstreamBuffers&, const pointField&);
65 
66  //- Update of the patch topology
67  virtual void topoChange(PstreamBuffers&);
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("mappedExtrudedWall");
74 
75 
76  // Constructors
77 
78  //- Construct from components
80  (
81  const word& name,
82  const label size,
83  const label start,
84  const label index,
85  const polyBoundaryMesh& bm,
86  const word& patchType
87  );
88 
89  //- Construct from components
91  (
92  const word& name,
93  const label size,
94  const label start,
95  const label index,
96  const word& neighbourRegion,
97  const word& neighbourPatch,
98  const bool isExtrudedRegion,
99  const polyBoundaryMesh& bm
100  );
101 
102  //- Construct from dictionary
104  (
105  const word& name,
106  const dictionary& dict,
107  const label index,
108  const polyBoundaryMesh& bm,
109  const word& patchType
110  );
111 
112  //- Construct as copy, resetting the boundary mesh
114  (
116  const polyBoundaryMesh&
117  );
118 
119  //- Construct given the original patch and resetting the
120  // face list and boundary mesh information
122  (
123  const mappedExtrudedWallPolyPatch& pp,
124  const polyBoundaryMesh& bm,
125  const label index,
126  const label newSize,
127  const label newStart
128  );
129 
130  //- Construct and return a clone, resetting the boundary mesh
131  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
132  {
133  return autoPtr<polyPatch>
134  (
135  new mappedExtrudedWallPolyPatch(*this, bm)
136  );
137  }
138 
139  //- Construct and return a clone, resetting the face list
140  // and boundary mesh
141  virtual autoPtr<polyPatch> clone
142  (
143  const polyBoundaryMesh& bm,
144  const label index,
145  const label newSize,
146  const label newStart
147  ) const
148  {
149  return autoPtr<polyPatch>
150  (
152  (
153  *this,
154  bm,
155  index,
156  newSize,
157  newStart
158  )
159  );
160  }
161 
162 
163  //- Destructor
165 
166 
167  // Member Functions
168 
169  //- Write the polyPatch data as a dictionary
170  virtual void write(Ostream&) const;
171 };
172 
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 } // End namespace Foam
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
autoPtr< PrimitivePatch< FaceList, PointField > > clone() const
Construct and return a clone.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Engine which provides mapping between two patches and which offsets the geometry to account for the e...
Wall patch which holds a mapping engine to map values from another patch.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
TypeName("mappedExtrudedWall")
Runtime type information.
mappedExtrudedWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
virtual void topoChange(PstreamBuffers &)
Update of the patch topology.
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:280
Foam::wallPolyPatch.
Definition: wallPolyPatch.H:51
A class for handling words, derived from string.
Definition: word.H:62
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