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 | Copyright (C) 2011-2012 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 Class
25  Foam::mappedVariableThicknessWallPolyPatch
26 
27 Description
28  Foam::mappedVariableThicknessWallPolyPatch
29 
30 SourceFiles
31  mappedVariableThicknessWallPolyPatch.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef mappedVariableThicknessWallPolyPatch_H
36 #define mappedVariableThicknessWallPolyPatch_H
37 
38 #include "wallPolyPatch.H"
39 #include "mappedWallPolyPatch.H"
40 
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class polyMesh;
48 
49 /*---------------------------------------------------------------------------*\
50  Class mappedVariableThicknessWallPolyPatch Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public mappedWallPolyPatch
56 {
57 
58  // Private data
59 
60  //- Thickness
61  scalarList thickness_;
62 
63 
64 public:
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,
91  const mappedPatchBase::sampleMode mode,
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,
105  const mappedPatchBase::sampleMode mode,
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  );
179  }
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
207 
208 
209  // Member functions
210 
211  //- Return non const thickness
213  {
214  return thickness_;
215  }
216 
217 
218  //- Return const thickness
219  const scalarList& thickness() const
220  {
221  return thickness_;
222  }
223 
224 
225  //- Write the polyPatch data as a dictionary
226  void write(Ostream&) const;
227 };
228 
229 
230 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
231 
232 } // End namespace Foam
233 
234 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
235 
236 #endif
237 
238 // ************************************************************************* //
Foam::mappedVariableThicknessWallPolyPatch.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
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.
A class for handling words, derived from string.
Definition: word.H:59
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
scalarList & thickness()
Return non const thickness.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
Foam::polyBoundaryMesh.
Determines a mapping between patch face centres and mesh cell or face centres and processors they&#39;re ...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
sampleMode
Mesh items to sample.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
void write(Ostream &) const
Write the polyPatch data as a dictionary.