BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / engine / enginePiston / enginePiston.H
blob5904ce36f3b8b1cf81c178b5255ada851b32390a
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
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::enginePiston
27 Description
28     Foam::enginePiston
30 SourceFiles
31     enginePiston.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef enginePiston_H
36 #define enginePiston_H
38 #include "polyPatchID.H"
39 #include "coordinateSystem.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 // Forward declaration of classes
47 class polyMesh;
48 class engineTime;
50 /*---------------------------------------------------------------------------*\
51                            Class enginePiston Declaration
52 \*---------------------------------------------------------------------------*/
54 class enginePiston
56     // Private data
58         //- Reference to engine mesh
59         const polyMesh& mesh_;
61         //- Reference to engine database
62         const engineTime& engineDB_;
64         //- Piston patch
65         polyPatchID patchID_;
67         //- Coordinate system
68         autoPtr<coordinateSystem> csPtr_;
71         // Piston layering data
73             //- Min layer thickness
74             const scalar minLayer_;
76             //- Max layer thickness
77             const scalar maxLayer_;
80     // Private Member Functions
82         //- Disallow default bitwise copy construct
83         enginePiston(const enginePiston&);
85         //- Disallow default bitwise assignment
86         void operator=(const enginePiston&);
89 public:
91     // Static data members
94     // Constructors
96         //- Construct from components
97         enginePiston
98         (
99             const polyMesh& mesh,
100             const word& pistonPatchName,
101             const autoPtr<coordinateSystem>& pistonCS,
102             const scalar minLayer,
103             const scalar maxLayer
105         );
107         //- Construct from dictionary
108         enginePiston
109         (
110             const polyMesh& mesh,
111             const dictionary& dict
112         );
115     // Destructor - default
118     // Member Functions
120         //- Return coordinate system
121         const coordinateSystem& cs() const
122         {
123             return csPtr_();
124         }
126         //- Return ID of piston patch
127         const polyPatchID& patchID() const
128         {
129             return patchID_;
130         }
132         // Piston layering thickness
134             scalar minLayer() const
135             {
136                 return minLayer_;
137             }
139             scalar maxLayer() const
140             {
141                 return maxLayer_;
142             }
145         //- Write dictionary
146         void writeDict(Ostream&) const;
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 #endif
158 // ************************************************************************* //