mappedFilmSurfacePolyPatch.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) 2023-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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
35 
38  (
39  polyPatch,
42  );
43 }
44 
45 
46 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
47 
49 {
52 }
53 
54 
56 (
57  PstreamBuffers& pBufs,
58  const pointField& p
59 )
60 {
63 }
64 
65 
67 {
70 }
71 
72 
73 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
74 
76 (
77  const word& name,
78  const label size,
79  const label start,
80  const label index,
81  const polyBoundaryMesh& bm,
82  const word& patchType
83 )
84 :
85  filmSurfacePolyPatch(name, size, start, index, bm, patchType),
86  mappedExtrudedPatchBase(static_cast<const polyPatch&>(*this))
87 {
88  // mapped is not constraint type so add mapped group explicitly
89  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
90  {
91  inGroups().append(mappedPolyPatch::typeName);
92  }
93 }
94 
95 
97 (
98  const word& name,
99  const label size,
100  const label start,
101  const label index,
102  const word& neighbourRegion,
103  const word& neighbourPatch,
104  const bool isExtrudedRegion,
105  const polyBoundaryMesh& bm
106 )
107 :
108  filmSurfacePolyPatch(name, size, start, index, bm, typeName),
110  (
111  *this,
112  neighbourRegion,
113  neighbourPatch,
114  isExtrudedRegion,
115  cyclicTransform(true)
116  )
117 {
118  // mapped is not constraint type so add mapped group explicitly
119  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
120  {
121  inGroups().append(mappedPolyPatch::typeName);
122  }
123 }
124 
125 
127 (
128  const word& name,
129  const dictionary& dict,
130  const label index,
131  const polyBoundaryMesh& bm,
132  const word& patchType
133 )
134 :
135  filmSurfacePolyPatch(name, dict, index, bm, patchType),
137 {
138  // mapped is not constraint type so add mapped group explicitly
139  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
140  {
141  inGroups().append(mappedPolyPatch::typeName);
142  }
143 }
144 
145 
147 (
148  const mappedFilmSurfacePolyPatch& pp,
149  const polyBoundaryMesh& bm
150 )
151 :
152  filmSurfacePolyPatch(pp, bm),
153  mappedExtrudedPatchBase(*this, pp)
154 {}
155 
156 
158 (
159  const mappedFilmSurfacePolyPatch& pp,
160  const polyBoundaryMesh& bm,
161  const label index,
162  const label newSize,
163  const label newStart
164 )
165 :
166  filmSurfacePolyPatch(pp, bm, index, newSize, newStart),
167  mappedExtrudedPatchBase(*this, pp)
168 {}
169 
170 
171 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
172 
174 {}
175 
176 
177 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
178 
180 {
183 }
184 
185 
186 // ************************************************************************* //
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
Foam::filmSurfacePolyPatch.
Engine which provides mapping between two patches and which offsets the geometry to account for the e...
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Film surface patch which holds a mapping engine to map values from another patch.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
mappedFilmSurfacePolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
virtual void topoChange(PstreamBuffers &)
Update of the patch topology.
virtual void clearOut() const
Clear out data on mesh change.
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 movePoints(const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:57
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: polyPatch.H:101
virtual void topoChange(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:69
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