nonConformalMappedWallPolyPatch.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) 2021-2024 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::nonConformalMappedWallPolyPatch
26 
27 Description
28  Wall poly patch which can do non-conformal mapping of values from another
29  potentially non-globally conforming wall poly patch
30 
31 See also
32  Foam::nonConformalCoupledPolyPatch
33 
34 SourceFiles
35  nonConformalMappedWallPolyPatch.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef nonConformalMappedWallPolyPatch_H
40 #define nonConformalMappedWallPolyPatch_H
41 
42 #include "wallPolyPatch.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class nonConformalMappedWallPolyPatch Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 :
56  public wallPolyPatch,
57  public nonConformalPolyPatch,
59 {
60 protected:
61 
62  // Protected Member Functions
63 
64  //- Initialise the calculation of the patch geometry
65  virtual void initCalcGeometry(PstreamBuffers&);
66 
67  //- Initialise the patches for moving points
68  virtual void initMovePoints(PstreamBuffers& pBufs, const pointField&);
69 
70  //- Initialise the update of the patch topology
71  virtual void initTopoChange(PstreamBuffers&);
72 
73  //- Clear geometry
74  virtual void clearGeom();
75 
76  //- Reset the patch name
77  virtual void rename(const wordList& newNames);
78 
79  //- Reset the patch index
80  virtual void reorder(const labelUList& newToOldIndex);
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("nonConformalMappedWall");
87 
88 
89  // Constructors
90 
91  //- Construct from components
93  (
94  const word& name,
95  const label size,
96  const label start,
97  const label index,
98  const polyBoundaryMesh& bm,
99  const word& patchType
100  );
101 
102  //- Construct from components
104  (
105  const word& name,
106  const label size,
107  const label start,
108  const label index,
109  const word& origPatchName,
110  const word& neighbourRegion,
111  const word& neighbourPatch,
112  const polyBoundaryMesh& bm
113  );
114 
115  //- Construct from dictionary
117  (
118  const word& name,
119  const dictionary& dict,
120  const label index,
121  const polyBoundaryMesh& bm,
122  const word& patchType
123  );
124 
125  //- Construct as copy, resetting the boundary mesh
127  (
129  const polyBoundaryMesh&
130  );
131 
132  //- Construct given the original patch and resetting the
133  // face list and boundary mesh information
135  (
137  const polyBoundaryMesh& bm,
138  const label index,
139  const label newSize,
140  const label newStart
141  );
142 
143  //- Construct and return a clone, resetting the boundary mesh
144  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
145  {
146  return autoPtr<polyPatch>
147  (
148  new nonConformalMappedWallPolyPatch(*this, bm)
149  );
150  }
151 
152  //- Construct and return a clone, resetting the face list
153  // and boundary mesh
154  virtual autoPtr<polyPatch> clone
155  (
156  const polyBoundaryMesh& bm,
157  const label index,
158  const label newSize,
159  const label newStart
160  ) const
161  {
162  return autoPtr<polyPatch>
163  (
165  (
166  *this,
167  bm,
168  index,
169  newSize,
170  newStart
171  )
172  );
173  }
174 
175 
176  //- Destructor
178 
179 
180  // Member Functions
181 
182  //- Write the polyPatch data as a dictionary
183  virtual void write(Ostream&) const;
184 };
185 
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
autoPtr< PrimitivePatch< SubList< face >, const pointField & > > clone() const
Construct and return a clone.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
label size() const
Return the number of elements in the UList.
Definition: UListI.H:311
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:162
Base class for poly patches which provides non-conformal mapping between two potentially non-globally...
Wall poly patch which can do non-conformal mapping of values from another potentially non-globally co...
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual void rename(const wordList &newNames)
Reset the patch name.
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
nonConformalMappedWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
virtual void initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
TypeName("nonConformalMappedWall")
Runtime type information.
Non-conformal poly patch. This patch is a placeholder and must have no faces. This patch is linked to...
const word & origPatchName() const
Original patch name.
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