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-2026 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  );
100 
101  //- Construct from components
103  (
104  const word& name,
105  const label size,
106  const label start,
107  const label index,
108  const word& origPatchName,
109  const word& neighbourRegionName,
110  const word& neighbourPatchName,
111  const bool owner,
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  );
123 
124  //- Construct as copy, resetting the boundary mesh
126  (
128  const polyBoundaryMesh&
129  );
130 
131  //- Construct given the original patch and resetting the
132  // face list and boundary mesh information
134  (
136  const polyBoundaryMesh& bm,
137  const label index,
138  const label newSize,
139  const label newStart
140  );
141 
142  //- Construct and return a clone, resetting the boundary mesh
143  virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
144  {
145  return autoPtr<polyPatch>
146  (
147  new nonConformalMappedWallPolyPatch(*this, bm)
148  );
149  }
150 
151  //- Construct and return a clone, resetting the face list
152  // and boundary mesh
153  virtual autoPtr<polyPatch> clone
154  (
155  const polyBoundaryMesh& bm,
156  const label index,
157  const label newSize,
158  const label newStart
159  ) const
160  {
161  return autoPtr<polyPatch>
162  (
164  (
165  *this,
166  bm,
167  index,
168  newSize,
169  newStart
170  )
171  );
172  }
173 
174 
175  //- Destructor
177 
178 
179  // Member Functions
180 
181  //- Write the polyPatch data as a dictionary
182  virtual void write(Ostream&) const;
183 };
184 
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 } // End namespace Foam
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Base class for poly patches which provides non-conformal mapping between two potentially non-globally...
bool owner() const
Does this side own the patch?
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.
virtual void initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
TypeName("nonConformalMappedWall")
Runtime type information.
nonConformalMappedWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Construct from components.
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:277
Foam::wallPolyPatch.
Definition: wallPolyPatch.H:51
A class for handling words, derived from string.
Definition: word.H:63
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