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  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "mappedWallPolyPatch.H"
31 #include "mappedPolyPatch.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37  defineTypeNameAndDebug(mappedWallPolyPatch, 0);
38 
39  addToRunTimeSelectionTable(polyPatch, mappedWallPolyPatch, word);
41  (
42  polyPatch,
43  mappedWallPolyPatch,
44  dictionary
45  );
46 }
47 
48 
49 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
50 
52 (
53  const word& name,
54  const label size,
55  const label start,
56  const label index,
57  const polyBoundaryMesh& bm,
58  const word& patchType
59 )
60 :
61  wallPolyPatch(name, size, start, index, bm, patchType),
62  mappedPatchBase(static_cast<const polyPatch&>(*this))
63 {
64  // mapped is not constraint type so add mapped group explicitly
65  inGroups().appendUniq(mappedPolyPatch::typeName);
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  inGroups().appendUniq(mappedPolyPatch::typeName);
133 }
134 
135 
137 (
138  const mappedWallPolyPatch& pp,
139  const polyBoundaryMesh& bm
140 )
141 :
142  wallPolyPatch(pp, bm),
143  mappedPatchBase(*this, pp)
144 {}
145 
146 
148 (
149  const mappedWallPolyPatch& pp,
150  const polyBoundaryMesh& bm,
151  const label index,
152  const label newSize,
153  const label newStart
154 )
155 :
156  wallPolyPatch(pp, bm, index, newSize, newStart),
157  mappedPatchBase(*this, pp)
158 {}
159 
160 
162 (
163  const mappedWallPolyPatch& pp,
164  const polyBoundaryMesh& bm,
165  const label index,
166  const labelUList& mapAddressing,
167  const label newStart
168 )
169 :
170  wallPolyPatch(pp, bm, index, mapAddressing, newStart),
171  mappedPatchBase(*this, pp, mapAddressing)
172 {}
173 
174 
175 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
176 
178 {
180 }
181 
182 
183 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
184 
186 {
188 }
189 
190 
192 {
195 }
196 
197 
199 (
200  PstreamBuffers& pBufs,
201  const pointField& p
202 )
203 {
205 }
206 
207 
209 (
210  PstreamBuffers& pBufs,
211  const pointField& p
212 )
213 {
216 }
217 
218 
220 {
222 }
223 
224 
226 {
229 }
230 
231 
233 {
236 }
237 
238 
239 // ************************************************************************* //
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
mappedPolyPatch.H
Foam::mappedPatchBase::clearOut
void clearOut()
Definition: mappedPatchBase.C:1573
Foam::mappedWallPolyPatch::calcGeometry
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: mappedWallPolyPatch.C:191
p
volScalarField & p
Definition: createFieldRefs.H:8
mappedWallPolyPatch.H
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::mappedWallPolyPatch::~mappedWallPolyPatch
virtual ~mappedWallPolyPatch()
Destructor.
Definition: mappedWallPolyPatch.C:177
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:63
Foam::mappedWallPolyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: mappedWallPolyPatch.C:225
Foam::mappedWallPolyPatch::movePoints
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
Definition: mappedWallPolyPatch.C:209
Foam::PstreamBuffers
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Definition: PstreamBuffers.H:88
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:114
Foam::Field< vector >
Foam::polyPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: polyPatch.H:107
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:68
Foam::polyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:99
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::mappedWallPolyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: mappedWallPolyPatch.C:185
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::polyPatch::write
virtual void write(Ostream &os) const
Write the polyPatch data as a dictionary.
Definition: polyPatch.C:413
os
OBJstream os(runTime.globalPath()/outputName)
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:52
Foam::mappedWallPolyPatch
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
Definition: mappedWallPolyPatch.H:59
Foam::Vector< scalar >
Foam::UList< label >
Foam::mappedPatchBase::write
virtual void write(Ostream &os) const
Write as a dictionary.
Definition: mappedPatchBase.C:1942
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::mappedWallPolyPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: mappedWallPolyPatch.C:199
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:103
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::mappedPatchBase::sampleMode
sampleMode
Mesh items to sample.
Definition: mappedPatchBase.H:119
Foam::mappedWallPolyPatch::write
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: mappedWallPolyPatch.C:232
Foam::mappedWallPolyPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: mappedWallPolyPatch.C:219