initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / engine / enginePiston / enginePiston.H
blobf3ce2bef7b06ced5b4c46fb679d52213fcab3773
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::enginePiston
28 Description
29     Foam::enginePiston
31 SourceFiles
32     enginePiston.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef enginePiston_H
37 #define enginePiston_H
39 #include "polyPatchID.H"
40 #include "coordinateSystem.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 // Forward declaration of classes
48 class polyMesh;
49 class engineTime;
51 /*---------------------------------------------------------------------------*\
52                            Class enginePiston Declaration
53 \*---------------------------------------------------------------------------*/
55 class enginePiston
57     // Private data
59         //- Reference to engine mesh
60         const polyMesh& mesh_;
62         //- Reference to engine database
63         const engineTime& engineDB_;
65         //- Piston patch
66         polyPatchID patchID_;
68         //- Coordinate system
69         autoPtr<coordinateSystem> csPtr_;
72         // Piston layering data
74             //- Min layer thickness
75             const scalar minLayer_;
77             //- Max layer thickness
78             const scalar maxLayer_;
81     // Private Member Functions
83         //- Disallow default bitwise copy construct
84         enginePiston(const enginePiston&);
86         //- Disallow default bitwise assignment
87         void operator=(const enginePiston&);
90 public:
92     // Static data members
95     // Constructors
97         //- Construct from components
98         enginePiston
99         (
100             const polyMesh& mesh,
101             const word& pistonPatchName,
102             const autoPtr<coordinateSystem>& pistonCS,
103             const scalar minLayer,
104             const scalar maxLayer
106         );
108         //- Construct from dictionary
109         enginePiston
110         (
111             const polyMesh& mesh,
112             const dictionary& dict
113         );
116     // Destructor - default
119     // Member Functions
121         //- Return coordinate system
122         const coordinateSystem& cs() const
123         {
124             return csPtr_();
125         }
127         //- Return ID of piston patch
128         const polyPatchID& patchID() const
129         {
130             return patchID_;
131         }
133         // Piston layering thickness
135             scalar minLayer() const
136             {
137                 return minLayer_;
138             }
140             scalar maxLayer() const
141             {
142                 return maxLayer_;
143             }
146         //- Write dictionary
147         void writeDict(Ostream&) const;
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 } // End namespace Foam
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 #endif
159 // ************************************************************************* //