Loading...
Searching...
No Matches
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 "scalarField.H"
41#include "wallPolyPatch.H"
42#include "mappedWallPolyPatch.H"
43
44// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45
46namespace Foam
47{
49/*---------------------------------------------------------------------------*\
50 Class mappedVariableThicknessWallPolyPatch Declaration
51\*---------------------------------------------------------------------------*/
52
54:
56{
57
58 // Private data
59
60 //- Thickness
61 scalarField thickness_;
62
63
64public:
65
66 //- Runtime type information
67 TypeName("mappedWallVariableThickness");
68
69
70 // Constructors
71
72 //- Construct from components
74 (
75 const word& name,
76 const label size,
77 const label start,
78 const label index,
79 const polyBoundaryMesh& bm,
80 const word& patchType
81 );
82
83 //- Construct from components
85 (
86 const word& name,
87 const label size,
88 const label start,
89 const label index,
90 const word& sampleRegion,
92 const word& samplePatch,
93 const vectorField& offset,
94 const polyBoundaryMesh& bm
95 );
96
97 //- Construct from components. Uniform offset.
99 (
100 const word& name,
101 const label size,
102 const label start,
103 const label index,
104 const word& sampleRegion,
106 const word& samplePatch,
107 const vector& offset,
108 const polyBoundaryMesh& bm
109 );
110
111 //- Construct from dictionary
113 (
114 const word& name,
115 const dictionary& dict,
116 const label index,
117 const polyBoundaryMesh& bm,
118 const word& patchType
119 );
120
121 //- Construct as copy, resetting the boundary mesh
123 (
125 const polyBoundaryMesh&
126 );
127
128 //- Construct given the original patch and resetting the
129 // face list and boundary mesh information
131 (
133 const polyBoundaryMesh& bm,
134 const label index,
135 const label newSize,
136 const label newStart
137 );
138
139 //- Construct given the original patch and a map
141 (
143 const polyBoundaryMesh& bm,
144 const label index,
145 const labelUList& mapAddressing,
146 const label newStart
147 );
148
149 //- Construct and return a clone, resetting the boundary mesh
150 virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
151 {
152 return autoPtr<polyPatch>
153 (
155 );
156 }
157
158 //- Construct and return a clone, resetting the face list
159 // and boundary mesh
161 (
162 const polyBoundaryMesh& bm,
163 const label index,
164 const label newSize,
165 const label newStart
166 ) const
167 {
168 return autoPtr<polyPatch>
169 (
171 (
172 *this,
173 bm,
174 index,
175 newSize,
176 newStart
177 )
178 );
180
181 //- Construct and return a clone, resetting the face list
182 // and boundary mesh
184 (
185 const polyBoundaryMesh& bm,
186 const label index,
187 const labelUList& mapAddressing,
188 const label newStart
189 ) const
190 {
191 return autoPtr<polyPatch>
192 (
194 (
195 *this,
196 bm,
197 index,
198 mapAddressing,
199 newStart
200 )
201 );
202 }
203
204
205 //- Destructor
206 virtual ~mappedVariableThicknessWallPolyPatch() = default;
207
208
209 // Member Functions
210
211 //- Return thickness (non-const access)
212 scalarField& thickness() noexcept { return thickness_; }
213
214 //- Return thickness (const access)
215 const scalarField& thickness() const noexcept { return thickness_; }
216
217 //- Write the polyPatch data as a dictionary
218 void write(Ostream&) const;
219};
220
221
222// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223
224} // End namespace Foam
225
226// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227
228#endif
229
230// ************************************************************************* //
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
void size(const label n)
Definition UList.H:118
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
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.
scalarField & thickness() noexcept
Return thickness (non-const access).
const scalarField & thickness() const noexcept
Return thickness (const access).
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) const
Construct and return a clone, resetting the face list.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const label newStart) const
Construct and return a clone, resetting the face list.
TypeName("mappedWallVariableThickness")
Runtime type information.
mappedVariableThicknessWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
virtual ~mappedVariableThicknessWallPolyPatch()=default
Destructor.
mappedWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
label index() const noexcept
The index of this patch in the boundaryMesh.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
label start() const noexcept
Return start label of this patch in the polyMesh face list.
Definition polyPatch.H:446
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
const direction noexcept
Definition scalarImpl.H:265
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
Vector< scalar > vector
Definition vector.H:57
UList< label > labelUList
A UList of labels.
Definition UList.H:75
runTime write()
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68