mappedWallPolyPatch.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2013 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,
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,
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 {
219 }
220 
221 
223 {
225 }
226 
227 
229 {
232 }
233 
234 
236 {
239 }
240 
241 
242 // ************************************************************************* //
mappedPolyPatch.H
Foam::mappedPatchBase::write
virtual void write(Ostream &) const
Write as a dictionary.
Definition: mappedPatchBase.C:1387
Foam::mappedPatchBase::clearOut
void clearOut()
Definition: mappedPatchBase.C:1227
Foam::mappedWallPolyPatch::calcGeometry
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: mappedWallPolyPatch.C:194
mappedWallPolyPatch.H
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::mappedWallPolyPatch::~mappedWallPolyPatch
virtual ~mappedWallPolyPatch()
Destructor.
Definition: mappedWallPolyPatch.C:180
Foam::polyPatch::movePoints
virtual void movePoints(PstreamBuffers &, const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:57
Foam::polyBoundaryMesh
Foam::polyBoundaryMesh.
Definition: polyBoundaryMesh.H:60
Foam::mappedWallPolyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: mappedWallPolyPatch.C:228
Foam::mappedWallPolyPatch::movePoints
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
Definition: mappedWallPolyPatch.C:212
Foam::findIndex
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Foam::PstreamBuffers
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Definition: PstreamBuffers.H:85
Foam::polyPatch::write
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: polyPatch.C:382
Foam::mappedPatchBase
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
Definition: mappedPatchBase.H:101
Foam::polyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:62
Foam::mode
mode_t mode(const fileName &)
Return the file mode.
Definition: POSIX.C:573
Foam::polyPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:115
Foam::label
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
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::polyPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: polyPatch.H:108
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Foam::polyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:100
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::mappedWallPolyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: mappedWallPolyPatch.C:188
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::wallPolyPatch
Foam::wallPolyPatch.
Definition: wallPolyPatch.H:48
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::mappedWallPolyPatch::mappedWallPolyPatch
mappedWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
Definition: mappedWallPolyPatch.C:49
Foam::mappedWallPolyPatch
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
Definition: mappedWallPolyPatch.H:57
Foam::Vector< scalar >
Foam::UList
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::mappedWallPolyPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: mappedWallPolyPatch.C:202
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::polyPatch::calcGeometry
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: polyPatch.H:104
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::mappedPatchBase::sampleMode
sampleMode
Mesh items to sample.
Definition: mappedPatchBase.H:109
Foam::mappedWallPolyPatch::write
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: mappedWallPolyPatch.C:235
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Foam::mappedWallPolyPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: mappedWallPolyPatch.C:222