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