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