mappedWallPolyPatch.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::mappedWallPolyPatch
26 
27 Description
28  Wall patch which holds a mapping engine to map values from another patch
29 
30 SourceFiles
31  mappedWallPolyPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef mappedWallPolyPatch_H
36 #define mappedWallPolyPatch_H
37 
38 #include "wallPolyPatch.H"
39 #include "mappedPatchBase.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class mappedWallPolyPatch Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public wallPolyPatch,
53  public mappedPatchBase
54 {
55 protected:
56 
57  // Protected Member Functions
58 
59  //- Calculate the patch geometry
60  virtual void calcGeometry(PstreamBuffers&);
61 
62  //- Correct patches after moving points
63  virtual void movePoints(PstreamBuffers&, const pointField&);
64 
65  //- Update of the patch topology
66  virtual void topoChange(PstreamBuffers&);
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("mappedWall");
73 
74 
75  // Constructors
76 
77  //- Construct from components
79  (
80  const word& name,
81  const label size,
82  const label start,
83  const label index,
84  const polyBoundaryMesh& bm,
85  const word& patchType
86  );
87 
88  //- Construct from components
90  (
91  const word& name,
92  const label size,
93  const label start,
94  const label index,
95  const word& neighbourRegion,
96  const word& neighbourPatch,
97  const polyBoundaryMesh& bm
98  );
99 
100  //- Construct from dictionary
102  (
103  const word& name,
104  const dictionary& dict,
105  const label index,
106  const polyBoundaryMesh& bm,
107  const word& patchType
108  );
109 
110  //- Construct as copy, resetting the boundary mesh
112  (
113  const mappedWallPolyPatch&,
114  const polyBoundaryMesh&
115  );
116 
117  //- Construct given the original patch and resetting the
118  // face list and boundary mesh information
120  (
121  const mappedWallPolyPatch& pp,
122  const polyBoundaryMesh& bm,
123  const label index,
124  const label newSize,
125  const label 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 mappedWallPolyPatch(*this, bm));
132  }
133 
134  //- Construct and return a clone, resetting the face list
135  // and boundary mesh
136  virtual autoPtr<polyPatch> clone
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  )
154  );
155  }
156 
157 
158  //- Destructor
159  virtual ~mappedWallPolyPatch();
160 
161 
162  // Member Functions
163 
164  //- Write the polyPatch data as a dictionary
165  virtual void write(Ostream&) const;
166 };
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace Foam
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #endif
176 
177 // ************************************************************************* //
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.
Wall patch which holds a mapping engine to map values from another patch.
mappedWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
TypeName("mappedWall")
Runtime type information.
virtual ~mappedWallPolyPatch()
Destructor.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
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