mappedFilmSurfacePolyPatch.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) 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 
27 #include "mappedPolyPatch.H"
29 
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
35 
38  (
39  polyPatch,
42  );
43 }
44 
45 
46 // * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * * * * //
47 
49 (
50  const word& name,
51  const label size,
52  const label start,
53  const label index,
54  const polyBoundaryMesh& bm,
55  const word& patchType
56 )
57 :
58  filmSurfacePolyPatch(name, size, start, index, bm, patchType),
59  mappedExtrudedPatchBase(static_cast<const polyPatch&>(*this))
60 {
61  // mapped is not constraint type so add mapped group explicitly
62  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
63  {
64  inGroups().append(mappedPolyPatch::typeName);
65  }
66 }
67 
68 
70 (
71  const word& name,
72  const label size,
73  const label start,
74  const label index,
75  const word& neighbourRegion,
76  const word& neighbourPatch,
77  const bool isExtrudedRegion,
78  const polyBoundaryMesh& bm
79 )
80 :
81  filmSurfacePolyPatch(name, size, start, index, bm, typeName),
83  (
84  *this,
85  neighbourRegion,
86  neighbourPatch,
87  isExtrudedRegion,
88  cyclicTransform(true)
89  )
90 {}
91 
92 
94 (
95  const word& name,
96  const dictionary& dict,
97  const label index,
98  const polyBoundaryMesh& bm,
99  const word& patchType
100 )
101 :
102  filmSurfacePolyPatch(name, dict, index, bm, patchType),
103  mappedExtrudedPatchBase(*this, dict, true)
104 {
105  // mapped is not constraint type so add mapped group explicitly
106  if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1)
107  {
108  inGroups().append(mappedPolyPatch::typeName);
109  }
110 }
111 
112 
114 (
115  const mappedFilmSurfacePolyPatch& pp,
116  const polyBoundaryMesh& bm
117 )
118 :
119  filmSurfacePolyPatch(pp, bm),
120  mappedExtrudedPatchBase(*this, pp)
121 {}
122 
123 
125 (
126  const mappedFilmSurfacePolyPatch& pp,
127  const polyBoundaryMesh& bm,
128  const label index,
129  const label newSize,
130  const label newStart
131 )
132 :
133  filmSurfacePolyPatch(pp, bm, index, newSize, newStart),
134  mappedExtrudedPatchBase(*this, pp)
135 {}
136 
137 
138 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
139 
141 {}
142 
143 
144 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
145 
147 {
150 }
151 
152 
154 (
155  PstreamBuffers& pBufs,
156  const pointField& p
157 )
158 {
161 }
162 
163 
165 {
168 }
169 
170 
172 {
175 }
176 
177 
178 // ************************************************************************* //
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).
Cyclic plane transformation.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Foam::filmSurfacePolyPatch.
Engine which provides mapping between two patches and which offsets the geometry to account for the e...
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual void clearOut()
Clear out data on mesh change.
Film surface patch which holds a mapping engine to map values from another patch.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
mappedFilmSurfacePolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
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 calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
Definition: polyPatch.H:101
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