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 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::mappedVariableThicknessWallPolyPatch
28 
29 Description
30  Foam::mappedVariableThicknessWallPolyPatch
31 
32 SourceFiles
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 
46 namespace Foam
47 {
48 
49 class polyMesh;
50 
51 /*---------------------------------------------------------------------------*\
52  Class mappedVariableThicknessWallPolyPatch Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
57  public mappedWallPolyPatch
58 {
59 
60  // Private data
61 
62  //- Thickness
63  scalarList thickness_;
64 
65 
66 public:
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 // ************************************************************************* //
mappedWallPolyPatch.H
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:63
wallPolyPatch.H
Foam::mappedVariableThicknessWallPolyPatch::write
void write(Ostream &) const
Write the polyPatch data as a dictionary.
Definition: mappedVariableThicknessWallPolyPatch.C:170
Foam::mappedVariableThicknessWallPolyPatch::TypeName
TypeName("mappedWallVariableThickness")
Runtime type information.
Foam::Field< vector >
Foam::mappedVariableThicknessWallPolyPatch::mappedVariableThicknessWallPolyPatch
mappedVariableThicknessWallPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
Definition: mappedVariableThicknessWallPolyPatch.C:56
Foam::mappedPatchBase::mode
sampleMode mode() const noexcept
What to sample.
Definition: mappedPatchBaseI.H:30
Foam::mappedVariableThicknessWallPolyPatch
Foam::mappedVariableThicknessWallPolyPatch.
Definition: mappedVariableThicknessWallPolyPatch.H:54
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::mappedVariableThicknessWallPolyPatch::thickness
const scalarList & thickness() const
Return const thickness.
Definition: mappedVariableThicknessWallPolyPatch.H:220
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::patchIdentifier::index
label index() const noexcept
The index of this patch in the boundaryMesh.
Definition: patchIdentifier.H:147
Foam::mappedVariableThicknessWallPolyPatch::clone
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
Definition: mappedVariableThicknessWallPolyPatch.H:151
Foam::polyPatch::start
label start() const
Return start label of this patch in the polyMesh face list.
Definition: polyPatch.H:361
Foam::mappedPatchBase::sampleRegion
const word & sampleRegion() const
Region to sample.
Definition: mappedPatchBaseI.H:42
Foam::mappedWallPolyPatch
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
Definition: mappedWallPolyPatch.H:59
Foam::mappedVariableThicknessWallPolyPatch::~mappedVariableThicknessWallPolyPatch
virtual ~mappedVariableThicknessWallPolyPatch()
Destructor.
Definition: mappedVariableThicknessWallPolyPatch.C:163
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::Vector< scalar >
Foam::List< scalar >
Foam::UList< label >
Foam::patchIdentifier::name
const word & name() const noexcept
The patch name.
Definition: patchIdentifier.H:135
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::mappedVariableThicknessWallPolyPatch::thickness
scalarList & thickness()
Return non const thickness.
Definition: mappedVariableThicknessWallPolyPatch.H:213
Foam::mappedPatchBase::sampleMode
sampleMode
Mesh items to sample.
Definition: mappedPatchBase.H:119
Foam::mappedPatchBase::offset
const vector & offset() const noexcept
Offset vector (from patch faces to destination mesh objects)
Definition: mappedPatchBaseI.H:135
Foam::mappedPatchBase::samplePatch
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE)
Definition: mappedPatchBaseI.H:68