mappedVariableThicknessWallPolyPatch.H
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-2012 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::mappedVariableThicknessWallPolyPatch
28
29Description
30 Foam::mappedVariableThicknessWallPolyPatch
31
32SourceFiles
33 mappedVariableThicknessWallPolyPatch.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef mappedVariableThicknessWallPolyPatch_H
38#define mappedVariableThicknessWallPolyPatch_H
39
40#include "wallPolyPatch.H"
41#include "mappedWallPolyPatch.H"
42
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
48
49class polyMesh;
50
51/*---------------------------------------------------------------------------*\
52 Class mappedVariableThicknessWallPolyPatch Declaration
53\*---------------------------------------------------------------------------*/
56:
58{
59
60 // Private data
61
62 //- Thickness
63 scalarList thickness_;
64
65
66public:
67
68 //- Runtime type information
69 TypeName("mappedWallVariableThickness");
70
71
72 // Constructors
73
74 //- Construct from components
76 (
77 const word& name,
78 const label size,
79 const label start,
80 const label index,
81 const polyBoundaryMesh& bm,
82 const word& patchType
83 );
84
85 //- Construct from components
87 (
88 const word& name,
89 const label size,
90 const label start,
91 const label index,
92 const word& sampleRegion,
94 const word& samplePatch,
95 const vectorField& offset,
96 const polyBoundaryMesh& bm
97 );
98
99 //- Construct from components. Uniform offset.
101 (
102 const word& name,
103 const label size,
104 const label start,
105 const label index,
106 const word& sampleRegion,
108 const word& samplePatch,
109 const vector& offset,
110 const polyBoundaryMesh& bm
111 );
112
113 //- Construct from dictionary
115 (
116 const word& name,
117 const dictionary& dict,
118 const label index,
119 const polyBoundaryMesh& bm,
120 const word& patchType
121 );
122
123 //- Construct as copy, resetting the boundary mesh
125 (
127 const polyBoundaryMesh&
128 );
129
130 //- Construct given the original patch and resetting the
131 // face list and boundary mesh information
133 (
135 const polyBoundaryMesh& bm,
136 const label index,
137 const label newSize,
138 const label newStart
139 );
140
141 //- Construct given the original patch and a map
143 (
145 const polyBoundaryMesh& bm,
146 const label index,
147 const labelUList& mapAddressing,
148 const label newStart
149 );
150
151 //- Construct and return a clone, resetting the boundary mesh
152 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
153 {
154 return autoPtr<polyPatch>
155 (
157 );
158 }
159
160 //- Construct and return a clone, resetting the face list
161 // and boundary mesh
163 (
164 const polyBoundaryMesh& bm,
165 const label index,
166 const label newSize,
167 const label newStart
168 ) const
169 {
170 return autoPtr<polyPatch>
171 (
173 (
174 *this,
175 bm,
176 index,
177 newSize,
178 newStart
179 )
180 );
181 }
182
183 //- Construct and return a clone, resetting the face list
184 // and boundary mesh
186 (
187 const polyBoundaryMesh& bm,
188 const label index,
189 const labelUList& mapAddressing,
190 const label newStart
191 ) const
192 {
193 return autoPtr<polyPatch>
194 (
196 (
197 *this,
198 bm,
199 index,
200 mapAddressing,
201 newStart
202 )
203 );
204 }
205
206
207 //- Destructor
209
210
211 // Member functions
212
213 //- Return non const thickness
215 {
216 return thickness_;
217 }
218
219
220 //- Return const thickness
221 const scalarList& thickness() const
222 {
223 return thickness_;
224 }
225
226
227 //- Write the polyPatch data as a dictionary
228 void write(Ostream&) const;
229};
230
231
232// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
233
234} // End namespace Foam
235
236// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
237
238#endif
239
240// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const vector & offset() const noexcept
Offset vector (from patch faces to destination mesh objects)
sampleMode
Mesh items to sample.
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE)
sampleMode mode() const noexcept
What to sample.
const word & sampleRegion() const
Region to sample.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
TypeName("mappedWallVariableThickness")
Runtime type information.
const scalarList & thickness() const
Return const thickness.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:364
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
UList< label > labelUList
A UList of labels.
Definition: UList.H:85
runTime write()
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73