mappedWallPolyPatch.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) 2011-2018 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 
26 #include "mappedWallPolyPatch.H"
28 #include "mappedPolyPatch.H"
29 
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34  defineTypeNameAndDebug(mappedWallPolyPatch, 0);
35 
36  addToRunTimeSelectionTable(polyPatch, mappedWallPolyPatch, word);
38  (
39  polyPatch,
40  mappedWallPolyPatch,
41  dictionary
42  );
43 }
44 
45 
46 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
47 
49 (
50  const word& name,
51  const label size,
52  const label start,
53  const label index,
54  const polyBoundaryMesh& bm,
55  const word& patchType
56 )
57 :
58  wallPolyPatch(name, size, start, index, bm, patchType),
59  mappedPatchBase(static_cast<const polyPatch&>(*this))
60 {
61  // mapped is not constraint type so add mapped group explicitly
62  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
63  {
64  inGroups().append(mappedPolyPatch::typeName);
65  }
66 }
67 
68 
70 (
71  const word& name,
72  const label size,
73  const label start,
74  const label index,
75  const word& sampleRegion,
76  const mappedPatchBase::sampleMode mode,
77  const word& samplePatch,
78  const vectorField& offset,
79  const polyBoundaryMesh& bm
80 )
81 :
82  wallPolyPatch(name, size, start, index, bm, typeName),
84  (
85  static_cast<const polyPatch&>(*this),
86  sampleRegion,
87  mode,
88  samplePatch,
89  offset
90  )
91 {}
92 
93 
95 (
96  const word& name,
97  const label size,
98  const label start,
99  const label index,
100  const word& sampleRegion,
101  const mappedPatchBase::sampleMode mode,
102  const word& samplePatch,
103  const vector& offset,
104  const polyBoundaryMesh& bm
105 )
106 :
107  wallPolyPatch(name, size, start, index, bm, typeName),
109  (
110  static_cast<const polyPatch&>(*this),
111  sampleRegion,
112  mode,
113  samplePatch,
114  offset
115  )
116 {}
117 
118 
120 (
121  const word& name,
122  const dictionary& dict,
123  const label index,
124  const polyBoundaryMesh& bm,
125  const word& patchType
126 )
127 :
128  wallPolyPatch(name, dict, index, bm, patchType),
129  mappedPatchBase(*this, dict)
130 {
131  // mapped is not constraint type so add mapped group explicitly
132  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
133  {
134  inGroups().append(mappedPolyPatch::typeName);
135  }
136 }
137 
138 
140 (
141  const mappedWallPolyPatch& pp,
142  const polyBoundaryMesh& bm
143 )
144 :
145  wallPolyPatch(pp, bm),
146  mappedPatchBase(*this, pp)
147 {}
148 
149 
151 (
152  const mappedWallPolyPatch& pp,
153  const polyBoundaryMesh& bm,
154  const label index,
155  const label newSize,
156  const label newStart
157 )
158 :
159  wallPolyPatch(pp, bm, index, newSize, newStart),
160  mappedPatchBase(*this, pp)
161 {}
162 
163 
165 (
166  const mappedWallPolyPatch& pp,
167  const polyBoundaryMesh& bm,
168  const label index,
169  const labelUList& mapAddressing,
170  const label newStart
171 )
172 :
173  wallPolyPatch(pp, bm, index, mapAddressing, newStart),
174  mappedPatchBase(*this, pp, mapAddressing)
175 {}
176 
177 
178 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
179 
181 {
183 }
184 
185 
186 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
187 
189 {
191 }
192 
193 
195 {
198 }
199 
200 
202 (
203  PstreamBuffers& pBufs,
204  const pointField& p
205 )
206 {
208 }
209 
210 
212 (
213  PstreamBuffers& pBufs,
214  const pointField& p
215 )
216 {
217  wallPolyPatch::movePoints(pBufs, p);
219 }
220 
221 
223 {
225 }
226 
227 
229 {
232 }
233 
234 
236 {
239 }
240 
241 
242 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:115
virtual void write(Ostream &) const
Write as a dictionary.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: polyPatch.H:108
Macros for easy insertion into run-time selection tables.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: polyPatch.C:357
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual void movePoints(PstreamBuffers &, const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:57
A class for handling words, derived from string.
Definition: word.H:59
Determines a mapping between patch face centres and mesh cell or face centres and processors they&#39;re ...
Foam::wallPolyPatch.
Definition: wallPolyPatch.H:48
Determines a mapping between patch face centres and mesh cell or face centres and processors they&#39;re ...
mappedWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:62
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
Foam::polyBoundaryMesh.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: polyPatch.H:104
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
virtual ~mappedWallPolyPatch()
Destructor.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:100
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
sampleMode
Mesh items to sample.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Namespace for OpenFOAM.