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-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 \*---------------------------------------------------------------------------*/
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  const word& patchType
118 )
119 :
120  wallPolyPatch(name, size, start, index, bm, patchType),
121  nonConformalPolyPatch(static_cast<const polyPatch&>(*this)),
123  (
124  static_cast<const nonConformalPolyPatch&>(*this)
125  )
126 {
127  // mapped is not constraint type so add mapped group explicitly
128  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
129  {
130  inGroups().append(mappedPolyPatch::typeName);
131  }
132 }
133 
134 
136 (
137  const word& name,
138  const label size,
139  const label start,
140  const label index,
141  const word& origPatchName,
142  const word& nbrRegionName,
143  const word& nbrPatchName,
144  const bool owner,
145  const polyBoundaryMesh& bm
146 )
147 :
148  wallPolyPatch(name, size, start, index, bm, typeName),
149  nonConformalPolyPatch(*this, origPatchName),
151  (
152  *this,
153  nbrRegionName,
154  nbrPatchName,
155  cyclicTransform(true),
156  owner
157  )
158 {
159  // mapped is not constraint type so add mapped group explicitly
160  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
161  {
162  inGroups().append(mappedPolyPatch::typeName);
163  }
164 }
165 
166 
168 (
169  const word& name,
170  const dictionary& dict,
171  const label index,
172  const polyBoundaryMesh& bm,
173  const word& patchType
174 )
175 :
176  wallPolyPatch(name, dict, index, bm, patchType),
177  nonConformalPolyPatch(*this, dict),
178  nonConformalMappedPatchBase(*this, dict, transformType::defaultNone)
179 {
180  // mapped is not constraint type so add mapped group explicitly
181  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
182  {
183  inGroups().append(mappedPolyPatch::typeName);
184  }
185 }
186 
187 
189 (
191  const polyBoundaryMesh& bm
192 )
193 :
194  wallPolyPatch(pp, bm),
195  nonConformalPolyPatch(*this, pp),
196  nonConformalMappedPatchBase(*this, pp)
197 {}
198 
199 
201 (
203  const polyBoundaryMesh& bm,
204  const label index,
205  const label newSize,
206  const label newStart
207 )
208 :
209  wallPolyPatch(pp, bm, index, newSize, newStart),
210  nonConformalPolyPatch(*this, pp),
211  nonConformalMappedPatchBase(*this, pp)
212 {}
213 
214 
215 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
216 
218 {}
219 
220 
221 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
222 
224 {
228 }
229 
230 
231 // ************************************************************************* //
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.
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.
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:70
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: polyPatch.C:355
virtual void rename(const wordList &newNames)
Reset the patch name.
Definition: polyPatch.C:82
virtual void clearGeom()
Clear geometry.
Definition: polyPatch.C:76
virtual void reorder(const labelUList &newToOldIndex)
Reset the patch index.
Definition: polyPatch.C:88
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:97
virtual void initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:115
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: polyPatch.H:108
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
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
defineTypeNameAndDebug(combustionModel, 0)
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,.
dictionary dict
volScalarField & p