regionCoupledWallPolyPatch.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-2020 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::regionCoupledWallPolyPatch
26 
27 Description
28  regionCoupledWall
29 
30 SourceFiles
31  regionCoupledWallPolyPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef regionCoupledWallPolyPatch_H
36 #define regionCoupledWallPolyPatch_H
37 
38 #include "wallPolyPatch.H"
39 #include "regionCoupledBase.H"
40 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class polyMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class regionCoupledWallPolyPatch Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public wallPolyPatch,
56  public regionCoupledBase
57 {
58 
59 protected:
60 
61  //- Initialise the calculation of the patch geometry
62  virtual void initCalcGeometry(PstreamBuffers&);
63 
64  //- Calculate the patch geometry
65  virtual void calcGeometry(PstreamBuffers&);
66 
67  //- Initialise the patches for moving points
68  virtual void initMovePoints(PstreamBuffers&, const pointField&);
69 
70  //- Correct patches after moving points
71  virtual void movePoints(PstreamBuffers&, const pointField&);
72 
73  //- Initialise the update of the patch topology
74  virtual void initUpdateMesh(PstreamBuffers&);
75 
76  //- Update of the patch topology
77  virtual void updateMesh(PstreamBuffers&);
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("regionCoupledWall");
84 
85 
86  // Constructors
87 
88  //- Construct from components
90  (
91  const word& name,
92  const label size,
93  const label start,
94  const label index,
95  const polyBoundaryMesh& bm,
96  const word& patchType
97  );
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  (
114  const polyBoundaryMesh&
115  );
116 
117  //- Construct given the original patch and resetting the
118  // face list and boundary mesh information
120  (
121  const regionCoupledWallPolyPatch& pp,
122  const polyBoundaryMesh& bm,
123  const label index,
124  const label newSize,
125  const label newStart
126  );
127 
128  //- Construct given the original patch and a map
130  (
131  const regionCoupledWallPolyPatch& pp,
132  const polyBoundaryMesh& bm,
133  const label index,
134  const labelUList& mapAddressing,
135  const label newStart
136  );
137 
138  //- Construct and return a clone, resetting the boundary mesh
140  (
141  const polyBoundaryMesh& bm
142  ) const
143  {
145  (
146  new regionCoupledWallPolyPatch(*this, bm)
147  );
148  }
149 
150  //- Construct and return a clone, resetting the face list
151  // and boundary mesh
153  (
154  const polyBoundaryMesh& bm,
155  const label index,
156  const label newSize,
157  const label newStart
158  ) const
159  {
161  (
163  (
164  *this,
165  bm,
166  index,
167  newSize,
168  newStart
169  )
170  );
171  }
172 
173  //- Construct and return a clone, resetting the face list
174  // and boundary mesh
176  (
177  const polyBoundaryMesh& bm,
178  const label index,
179  const labelUList& mapAddressing,
180  const label newStart
181  ) const
182  {
183  return autoPtr<polyPatch>
184  (
186  (
187  *this,
188  bm,
189  index,
190  mapAddressing,
191  newStart
192  )
193  );
194  }
195 
196 
197  //- Destructor
198  virtual ~regionCoupledWallPolyPatch();
199 
200 
201  // Member Functions
202 
203  //- Return the type
204  virtual const word& regionCoupleType() const
205  {
206  return type();
207  }
208 
209  //- Write the polyPatch data as a dictionary
210  virtual void write(Ostream&) const;
211 };
212 
213 
214 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 
216 } // End namespace Foam
217 
218 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 
220 #endif
221 
222 // ************************************************************************* //
Base class with common functionality for regionCoupled polyPatch. It includes AMI.
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
virtual const word & regionCoupleType() const
Return the type.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual autoPtr< PrimitivePatch< FaceList, PointField > > clone() const
Construct and return a clone.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
A class for handling words, derived from string.
Definition: word.H:59
Foam::wallPolyPatch.
Definition: wallPolyPatch.H:48
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
Foam::polyBoundaryMesh.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
Buffers for inter-processor communications streams (UOPstream, UIPstream).
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
regionCoupledWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
TypeName("regionCoupledWall")
Runtime type information.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Namespace for OpenFOAM.