initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / utilities / mesh / generation / extrudeMesh / extrudeModel / wedge / wedge.H
blob39c4b4a2d3073ade350e8c5db80f6faea29b5d5b
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::extrudeModels::wedge
28 Description
29     Extrudes by rotating a surface around an axis
30     - extrusion is opposite the surface/patch normal so inwards the source
31       mesh
32     - axis direction has to be consistent with this.
33     - use -mergeFaces option if doing full 360 and want to merge front and back
34     - note direction of axis. This should be consistent with rotating against
35       the patch normal direction. If you get it wrong you'll see all cells
36       with extreme aspect ratio and internal faces wrong way around in
37       checkMesh
39 \*---------------------------------------------------------------------------*/
41 #ifndef wedge_H
42 #define wedge_H
44 #include "extrudeModel.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace Foam
50 namespace extrudeModels
53 /*---------------------------------------------------------------------------*\
54                          Class wedge Declaration
55 \*---------------------------------------------------------------------------*/
57 class wedge
59     public extrudeModel
61     // Private data
63         //- Point on axis
64         const point axisPt_;
66         //- Normalized direction of axis
67         const vector axis_;
69         //- Overall angle (radians)
70         const scalar angle_;
73 public:
75     //- Runtime type information
76     TypeName("wedge");
78     // Constructors
80         //- Construct from components
81         wedge(const dictionary& dict);
84     //- Destrcuctor
85     ~wedge();
88     // Member Operators
90         point operator()
91         (
92             const point& surfacePoint,
93             const vector& surfaceNormal,
94             const label layer
95         ) const;
99 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 } // End namespace extrudeModels
102 } // End namespace Foam
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 #endif
108 // ************************************************************************* //