Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / src / meshTools / directMapped / directMappedPolyPatch / directMappedVariableThicknessWallPolyPatch.H
blobf8f063eb7820f0d6adb34372fdffb5b5511ce5b5
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011-2011 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 Class
25     Foam::directMappedVariableThicknessWallPolyPatch
27 Description
28     Foam::directMappedVariableThicknessWallPolyPatch
30 SourceFiles
31     directMappedVariableThicknessWallPolyPatch.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef directMappedVariableThicknessWallPolyPatch_H
36 #define directMappedVariableThicknessWallPolyPatch_H
38 #include "wallPolyPatch.H"
39 #include "directMappedWallPolyPatch.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 class polyMesh;
49 /*---------------------------------------------------------------------------*\
50         Class directMappedVariableThicknessWallPolyPatch Declaration
51 \*---------------------------------------------------------------------------*/
53 class directMappedVariableThicknessWallPolyPatch
55     public directMappedWallPolyPatch
58     // Private data
60         //- Thickness
61         scalarList thickness_;
64 public:
66     //- Runtime type information
67     TypeName("directMappedWallVariableThickness");
70     // Constructors
72         //- Construct from components
73         directMappedVariableThicknessWallPolyPatch
74         (
75             const word& name,
76             const label size,
77             const label start,
78             const label index,
79             const polyBoundaryMesh& bm
80         );
82         //- Construct from components
83         directMappedVariableThicknessWallPolyPatch
84         (
85             const word& name,
86             const label size,
87             const label start,
88             const label index,
89             const word& sampleRegion,
90             const directMappedPatchBase::sampleMode mode,
91             const word& samplePatch,
92             const vectorField& offset,
93             const polyBoundaryMesh& bm
94         );
96         //- Construct from components. Uniform offset.
97         directMappedVariableThicknessWallPolyPatch
98         (
99             const word& name,
100             const label size,
101             const label start,
102             const label index,
103             const word& sampleRegion,
104             const directMappedPatchBase::sampleMode mode,
105             const word& samplePatch,
106             const vector& offset,
107             const polyBoundaryMesh& bm
108         );
110         //- Construct from dictionary
111         directMappedVariableThicknessWallPolyPatch
112         (
113             const word& name,
114             const dictionary& dict,
115             const label index,
116             const polyBoundaryMesh& bm
117         );
119         //- Construct as copy, resetting the boundary mesh
120         directMappedVariableThicknessWallPolyPatch
121         (
122             const directMappedVariableThicknessWallPolyPatch&,
123             const polyBoundaryMesh&
124         );
126         //- Construct given the original patch and resetting the
127         //  face list and boundary mesh information
128         directMappedVariableThicknessWallPolyPatch
129         (
130             const directMappedVariableThicknessWallPolyPatch& pp,
131             const polyBoundaryMesh& bm,
132             const label index,
133             const label newSize,
134             const label newStart
135         );
137         //- Construct given the original patch and a map
138         directMappedVariableThicknessWallPolyPatch
139         (
140             const directMappedVariableThicknessWallPolyPatch& pp,
141             const polyBoundaryMesh& bm,
142             const label index,
143             const labelUList& mapAddressing,
144             const label newStart
145         );
147         //- Construct and return a clone, resetting the boundary mesh
148         virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
149         {
150             return autoPtr<polyPatch>
151             (
152                 new directMappedVariableThicknessWallPolyPatch(*this, bm)
153             );
154         }
156         //- Construct and return a clone, resetting the face list
157         //  and boundary mesh
158         virtual autoPtr<polyPatch> clone
159         (
160             const polyBoundaryMesh& bm,
161             const label index,
162             const label newSize,
163             const label newStart
164         ) const
165         {
166             return autoPtr<polyPatch>
167             (
168                 new directMappedVariableThicknessWallPolyPatch
169                 (
170                     *this,
171                     bm,
172                     index,
173                     newSize,
174                     newStart
175                 )
176             );
177         }
179         //- Construct and return a clone, resetting the face list
180         //  and boundary mesh
181         virtual autoPtr<polyPatch> clone
182         (
183             const polyBoundaryMesh& bm,
184             const label index,
185             const labelUList& mapAddressing,
186             const label newStart
187         ) const
188         {
189             return autoPtr<polyPatch>
190             (
191                 new directMappedVariableThicknessWallPolyPatch
192                 (
193                     *this,
194                     bm,
195                     index,
196                     mapAddressing,
197                     newStart
198                 )
199             );
200         }
203     //- Destructor
204     virtual ~directMappedVariableThicknessWallPolyPatch();
207     // Member functions
209         //- Return non const thickness
210         scalarList& thickness()
211         {
212             return thickness_;
213         }
216         //- Return const thickness
217         const scalarList& thickness() const
218         {
219             return thickness_;
220         }
223         //- Write the polyPatch data as a dictionary
224         void write(Ostream&) const;
228 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230 } // End namespace Foam
232 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234 #endif
236 // ************************************************************************* //