All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
regionCoupledPolyPatch.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-2020 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 {
135  polyPatch::initMovePoints(pBufs, p);
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 // ************************************************************************* //
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Base class with common functionality for regionCoupled polyPatch. It includes AMI.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
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 clearGeom()
Clear geometry.
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:363
virtual void movePoints(PstreamBuffers &, const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:57
virtual ~regionCoupledPolyPatch()
Destructor.
A class for handling words, derived from string.
Definition: word.H:59
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
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.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:62
virtual void movePoints(PstreamBuffers &pBufs, const pointField &)
Correct patches after moving points.
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:54
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
Region coupled polyPatch.
defineTypeNameAndDebug(combustionModel, 0)
Buffers for inter-processor communications streams (UOPstream, UIPstream).
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:100
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Namespace for OpenFOAM.