mappedInternalPolyPatch.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) 2022-2023 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 
28 
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
34 
37 }
38 
39 
40 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
41 
43 {
45 }
46 
47 
49 {
52 }
53 
54 
56 (
57  PstreamBuffers& pBufs,
58  const pointField& p
59 )
60 {
62 }
63 
64 
66 (
67  PstreamBuffers& pBufs,
68  const pointField& p
69 )
70 {
71  polyPatch::movePoints(pBufs, p);
73 }
74 
75 
77 {
79 }
80 
81 
83 {
84  polyPatch::topoChange(pBufs);
86 }
87 
88 
89 
90 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
91 
93 (
94  const word& name,
95  const label size,
96  const label start,
97  const label index,
98  const polyBoundaryMesh& bm,
99  const word& patchType
100 )
101 :
102  polyPatch(name, size, start, index, bm, patchType),
103  mappedInternalPatchBase(static_cast<const polyPatch&>(*this))
104 {
105  if (findIndex(inGroups(), typeName) == -1)
106  {
107  inGroups().append(typeName);
108  }
109 }
110 
111 
113 (
114  const word& name,
115  const dictionary& dict,
116  const label index,
117  const polyBoundaryMesh& bm,
118  const word& patchType
119 )
120 :
121  polyPatch(name, dict, index, bm, patchType),
123 {
124  if (findIndex(inGroups(), typeName) == -1)
125  {
126  inGroups().append(typeName);
127  }
128 }
129 
130 
132 (
133  const mappedInternalPolyPatch& pp,
134  const polyBoundaryMesh& bm
135 )
136 :
137  polyPatch(pp, bm),
138  mappedInternalPatchBase(*this, pp)
139 {}
140 
141 
143 (
144  const mappedInternalPolyPatch& pp,
145  const polyBoundaryMesh& bm,
146  const label index,
147  const label newSize,
148  const label newStart
149 )
150 :
151  polyPatch(pp, bm, index, newSize, newStart),
152  mappedInternalPatchBase(*this, pp)
153 {}
154 
155 
156 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
157 
159 {}
160 
161 
162 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
163 
165 {
166  polyPatch::write(os);
168 }
169 
170 
171 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
void append(const T &)
Append an element at the end of the list.
Definition: ListI.H:178
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Buffers for inter-processor communications streams (UOPstream, UIPstream).
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Engine which provides mapping from cells to patch faces.
virtual void write(Ostream &) const
Write as a dictionary.
void clearOut()
Clear out data on mesh change.
Patch which holds a mapping engine to map cell values onto the patch.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
mappedInternalPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
virtual ~mappedInternalPolyPatch()
Destructor.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
virtual void initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
virtual void topoChange(PstreamBuffers &)
Update of the patch topology.
const wordList & inGroups() const
Return the optional groups patch belongs to.
Foam::polyBoundaryMesh.
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: polyPatch.C:355
virtual void movePoints(const pointField &p)
Correct patches after moving points.
Definition: polyPatch.C:57
virtual void initCalcGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
Definition: polyPatch.H:97
virtual void initTopoChange(PstreamBuffers &)
Initialise the update of the patch topology.
Definition: polyPatch.H:115
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: polyPatch.H:101
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
Definition: polyPatch.H:108
virtual void topoChange(PstreamBuffers &)
Update of the patch topology.
Definition: polyPatch.C:69
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
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
defineTypeNameAndDebug(combustionModel, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
dictionary dict
volScalarField & p