nonConformalMappedWallPolyPatch.C
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 \*---------------------------------------------------------------------------*/
25 
27 #include "mappedPolyPatch.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
35 
37  (
38  polyPatch,
40  word
41  );
43  (
44  polyPatch,
47  );
48 }
49 
50 
51 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
52 
54 (
55  PstreamBuffers& pBufs
56 )
57 {
60 }
61 
62 
64 (
65  PstreamBuffers& pBufs,
66  const pointField& p
67 )
68 {
71 }
72 
73 
75 (
76  PstreamBuffers& pBufs
77 )
78 {
81 }
82 
83 
85 {
88 }
89 
90 
92 {
93  wallPolyPatch::rename(newNames);
95 }
96 
97 
99 (
100  const labelUList& newToOldIndex
101 )
102 {
103  wallPolyPatch::reorder(newToOldIndex);
104  nonConformalPolyPatch::reorder(newToOldIndex);
105 }
106 
107 
108 // * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
109 
111 (
112  const word& name,
113  const label size,
114  const label start,
115  const label index,
116  const polyBoundaryMesh& bm
117 )
118 :
119  wallPolyPatch(name, size, start, index, bm),
120  nonConformalPolyPatch(static_cast<const polyPatch&>(*this)),
122  (
123  static_cast<const nonConformalPolyPatch&>(*this)
124  )
125 {
126  // mapped is not constraint type so add mapped group explicitly
128  {
130  }
131 }
132 
133 
135 (
136  const word& name,
137  const label size,
138  const label start,
139  const label index,
140  const word& origPatchName,
141  const word& nbrRegionName,
142  const word& nbrPatchName,
143  const bool owner,
144  const polyBoundaryMesh& bm
145 )
146 :
147  wallPolyPatch(name, size, start, index, bm),
148  nonConformalPolyPatch(*this, origPatchName),
150  (
151  *this,
152  nbrRegionName,
153  nbrPatchName,
154  cyclicTransform(true),
155  owner
156  )
157 {
158  // mapped is not constraint type so add mapped group explicitly
160  {
162  }
163 }
164 
165 
167 (
168  const word& name,
169  const dictionary& dict,
170  const label index,
171  const polyBoundaryMesh& bm
172 )
173 :
174  wallPolyPatch(name, dict, index, bm),
175  nonConformalPolyPatch(*this, dict),
176  nonConformalMappedPatchBase(*this, dict, transformType::defaultNone)
177 {
178  // mapped is not constraint type so add mapped group explicitly
180  {
182  }
183 }
184 
185 
187 (
189  const polyBoundaryMesh& bm
190 )
191 :
192  wallPolyPatch(pp, bm),
193  nonConformalPolyPatch(*this, pp),
194  nonConformalMappedPatchBase(*this, pp)
195 {}
196 
197 
199 (
201  const polyBoundaryMesh& bm,
202  const label index,
203  const label newSize,
204  const label newStart
205 )
206 :
207  wallPolyPatch(pp, bm, index, newSize, newStart),
208  nonConformalPolyPatch(*this, pp),
209  nonConformalMappedPatchBase(*this, pp)
210 {}
211 
212 
213 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
214 
216 {}
217 
218 
219 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
220 
222 {
226 }
227 
228 
229 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
void append(const T &)
Append an element at the end of the list.
Definition: ListI.H:178
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Cyclic plane transformation.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
transformType
The type of the transformation permitted/required by this patch.
Base class for poly patches which provides non-conformal mapping between two potentially non-globally...
virtual void write(Ostream &) const
Write as a dictionary.
void clearOut(const bool move)
Clear out data on mesh change.
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.
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...
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.
const wordList & inGroups() const
Return the optional groups patch belongs to.
Foam::polyBoundaryMesh.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:71
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: polyPatch.C:306
virtual void rename(const wordList &newNames)
Reset the patch name.
Definition: polyPatch.C:81
virtual void clearGeom()
Clear geometry.
Definition: polyPatch.C:75
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
Definition: polyPatch.C:87
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:98
virtual void initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:116
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: polyPatch.H:109
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
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
dictionary dict
volScalarField & p