regionCoupledPolyPatch.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-2012 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 "regionCoupledPolyPatch.H"
27 #include "polyMesh.H"
28 #include "Time.H"
30 
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36  defineTypeNameAndDebug(regionCoupledPolyPatch, 0);
37 
38  addToRunTimeSelectionTable(polyPatch, regionCoupledPolyPatch, word);
39  addToRunTimeSelectionTable(polyPatch, regionCoupledPolyPatch, dictionary);
40 }
41 
42 
43 // * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * //
44 
46 (
47  const word& name,
48  const label size,
49  const label start,
50  const label index,
51  const polyBoundaryMesh& bm,
52  const word& patchType
53 )
54 :
55  polyPatch(name, size, start, index, bm, patchType),
56  regionCoupledBase(static_cast<const polyPatch&>(*this))
57 {}
58 
59 
61 (
62  const word& name,
63  const dictionary& dict,
64  const label index,
65  const polyBoundaryMesh& bm,
66  const word& patchType
67 )
68 :
69  polyPatch(name, dict, index, bm, patchType),
70  regionCoupledBase(*this, dict)
71 {}
72 
73 
75 (
76  const regionCoupledPolyPatch& pp,
77  const polyBoundaryMesh& bm
78 )
79 :
80  polyPatch(pp, bm),
81  regionCoupledBase(*this, pp)
82 {}
83 
84 
86 (
87  const regionCoupledPolyPatch& pp,
88  const polyBoundaryMesh& bm,
89  const label index,
90  const label newSize,
91  const label newStart
92 )
93 :
94  polyPatch(pp, bm, index, newSize, newStart),
95  regionCoupledBase(*this, pp)
96 {}
97 
98 
100 (
101  const regionCoupledPolyPatch& pp,
102  const polyBoundaryMesh& bm,
103  const label index,
104  const labelUList& mapAddressing,
105  const label newStart
106 )
107 :
108  polyPatch(pp, bm, index, mapAddressing, newStart),
109  regionCoupledBase(*this, pp)
110 {}
111 
112 
113 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
114 
116 {
118 }
119 
120 
121 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
122 
124 {
126 }
127 
128 
130 (
131  PstreamBuffers& pBufs,
132  const pointField& p
133 )
134 {
136 }
137 
138 
140 (
141  PstreamBuffers& pBufs,
142  const pointField& p
143 )
144 {
145  polyPatch::movePoints(pBufs, p);
147 }
148 
149 
151 {
153 }
154 
155 
157 {
158  polyPatch::updateMesh(pBufs);
160 }
161 
162 
164 {
165  polyPatch::write(os);
167 }
168 
169 
170 // ************************************************************************* //
Foam::regionCoupledPolyPatch::regionCoupledPolyPatch
regionCoupledPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from (base couped patch) components.
Definition: regionCoupledPolyPatch.C:46
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
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::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
regionCoupledPolyPatch.H
polyMesh.H
Foam::polyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:62
Foam::regionCoupledPolyPatch::initGeometry
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: regionCoupledPolyPatch.C:123
Foam::regionCoupledPolyPatch::updateMesh
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: regionCoupledPolyPatch.C:156
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::regionCoupledPolyPatch
Region coupled polyPatch.
Definition: regionCoupledPolyPatch.H:50
Foam::regionCoupledBase
Base class with common functinality for regionCoupled polyPatch. It includes AMI.
Definition: regionCoupledBase.H:51
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::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
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::regionCoupledPolyPatch::write
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: regionCoupledPolyPatch.C:163
Foam::regionCoupledPolyPatch::movePoints
virtual void movePoints(PstreamBuffers &pBufs, const pointField &)
Correct patches after moving points.
Definition: regionCoupledPolyPatch.C:140
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::regionCoupledBase::write
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: regionCoupledBase.C:333
Foam::regionCoupledPolyPatch::initUpdateMesh
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: regionCoupledPolyPatch.C:150
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::regionCoupledBase::clearGeom
virtual void clearGeom()
Clear geometry.
Definition: regionCoupledBase.C:116
Foam::regionCoupledPolyPatch::~regionCoupledPolyPatch
virtual ~regionCoupledPolyPatch()
Destructor.
Definition: regionCoupledPolyPatch.C:115
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Foam::regionCoupledPolyPatch::initMovePoints
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
Definition: regionCoupledPolyPatch.C:130