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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2013 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "mappedWallPolyPatch.H"
30 #include "mappedPolyPatch.H"
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36  defineTypeNameAndDebug(mappedWallPolyPatch, 0);
37 
38  addToRunTimeSelectionTable(polyPatch, mappedWallPolyPatch, word);
40  (
41  polyPatch,
42  mappedWallPolyPatch,
43  dictionary
44  );
45 }
46 
47 
48 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
49 
51 (
52  const word& name,
53  const label size,
54  const label start,
55  const label index,
56  const polyBoundaryMesh& bm,
57  const word& patchType
58 )
59 :
60  wallPolyPatch(name, size, start, index, bm, patchType),
61  mappedPatchBase(static_cast<const polyPatch&>(*this))
62 {
63  // mapped is not constraint type so add mapped group explicitly
64  if (!inGroups().found(mappedPolyPatch::typeName))
65  {
66  inGroups().append(mappedPolyPatch::typeName);
67  }
68 }
69 
70 
72 (
73  const word& name,
74  const label size,
75  const label start,
76  const label index,
77  const word& sampleRegion,
79  const word& samplePatch,
80  const vectorField& offset,
81  const polyBoundaryMesh& bm
82 )
83 :
84  wallPolyPatch(name, size, start, index, bm, typeName),
86  (
87  static_cast<const polyPatch&>(*this),
88  sampleRegion,
89  mode,
90  samplePatch,
91  offset
92  )
93 {}
94 
95 
97 (
98  const word& name,
99  const label size,
100  const label start,
101  const label index,
102  const word& sampleRegion,
104  const word& samplePatch,
105  const vector& offset,
106  const polyBoundaryMesh& bm
107 )
108 :
109  wallPolyPatch(name, size, start, index, bm, typeName),
111  (
112  static_cast<const polyPatch&>(*this),
113  sampleRegion,
114  mode,
115  samplePatch,
116  offset
117  )
118 {}
119 
120 
122 (
123  const word& name,
124  const dictionary& dict,
125  const label index,
126  const polyBoundaryMesh& bm,
127  const word& patchType
128 )
129 :
130  wallPolyPatch(name, dict, index, bm, patchType),
131  mappedPatchBase(*this, dict)
132 {
133  // mapped is not constraint type so add mapped group explicitly
134  if (!inGroups().found(mappedPolyPatch::typeName))
135  {
136  inGroups().append(mappedPolyPatch::typeName);
137  }
138 }
139 
140 
142 (
143  const mappedWallPolyPatch& pp,
144  const polyBoundaryMesh& bm
145 )
146 :
147  wallPolyPatch(pp, bm),
148  mappedPatchBase(*this, pp)
149 {}
150 
151 
153 (
154  const mappedWallPolyPatch& pp,
155  const polyBoundaryMesh& bm,
156  const label index,
157  const label newSize,
158  const label newStart
159 )
160 :
161  wallPolyPatch(pp, bm, index, newSize, newStart),
162  mappedPatchBase(*this, pp)
163 {}
164 
165 
167 (
168  const mappedWallPolyPatch& pp,
169  const polyBoundaryMesh& bm,
170  const label index,
171  const labelUList& mapAddressing,
172  const label newStart
173 )
174 :
175  wallPolyPatch(pp, bm, index, mapAddressing, newStart),
176  mappedPatchBase(*this, pp, mapAddressing)
177 {}
178 
179 
180 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
181 
183 {
185 }
186 
187 
188 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
189 
191 {
193 }
194 
195 
197 {
200 }
201 
202 
204 (
205  PstreamBuffers& pBufs,
206  const pointField& p
207 )
208 {
210 }
211 
212 
214 (
215  PstreamBuffers& pBufs,
216  const pointField& p
217 )
218 {
221 }
222 
223 
225 {
227 }
228 
229 
231 {
234 }
235 
236 
238 {
241 }
242 
243 
244 // ************************************************************************* //
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
mappedPolyPatch.H
Foam::mappedPatchBase::write
virtual void write(Ostream &) const
Write as a dictionary.
Definition: mappedPatchBase.C:1898
Foam::mappedPatchBase::clearOut
void clearOut()
Definition: mappedPatchBase.C:1560
Foam::mappedWallPolyPatch::calcGeometry
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: mappedWallPolyPatch.C:196
p
volScalarField & p
Definition: createFieldRefs.H:8
mappedWallPolyPatch.H
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::mappedWallPolyPatch::~mappedWallPolyPatch
virtual ~mappedWallPolyPatch()
Destructor.
Definition: mappedWallPolyPatch.C:182
Foam::polyPatch::movePoints
virtual void movePoints(PstreamBuffers &, const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:61
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:62
Foam::mappedWallPolyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: mappedWallPolyPatch.C:230
Foam::mappedWallPolyPatch::movePoints
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
Definition: mappedWallPolyPatch.C:214
Foam::PstreamBuffers
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Definition: PstreamBuffers.H:87
Foam::polyPatch::write
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: polyPatch.C:405
Foam::mappedPatchBase
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
Definition: mappedPatchBase.H:112
Foam::polyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:67
Foam::mode
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
Definition: MSwindows.C:564
Foam::polyPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:117
Foam::Field< vector >
Foam::polyPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: polyPatch.H:110
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::polyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:102
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::mappedWallPolyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: mappedWallPolyPatch.C:190
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::wallPolyPatch
Foam::wallPolyPatch.
Definition: wallPolyPatch.H:50
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
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:51
Foam::mappedWallPolyPatch
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
Definition: mappedWallPolyPatch.H:59
found
bool found
Definition: TABSMDCalcMethod2.H:32
Foam::Vector< scalar >
Foam::UList< label >
Foam::mappedWallPolyPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: mappedWallPolyPatch.C:204
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::polyPatch::calcGeometry
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: polyPatch.H:106
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::mappedPatchBase::sampleMode
sampleMode
Mesh items to sample.
Definition: mappedPatchBase.H:120
Foam::mappedWallPolyPatch::write
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: mappedWallPolyPatch.C:237
Foam::mappedWallPolyPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: mappedWallPolyPatch.C:224