1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
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/>.
33 \*---------------------------------------------------------------------------*/
35 #ifndef enginePiston_H
36 #define enginePiston_H
38 #include "polyPatchID.H"
39 #include "coordinateSystem.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 // Forward declaration of classes
50 /*---------------------------------------------------------------------------*\
51 Class enginePiston Declaration
52 \*---------------------------------------------------------------------------*/
58 //- Reference to engine mesh
59 const polyMesh& mesh_;
61 //- Reference to engine database
62 const engineTime& engineDB_;
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&);
91 // Static data members
96 //- Construct from components
100 const word& pistonPatchName,
101 const autoPtr<coordinateSystem>& pistonCS,
102 const scalar minLayer,
103 const scalar maxLayer
107 //- Construct from dictionary
110 const polyMesh& mesh,
111 const dictionary& dict
115 // Destructor - default
120 //- Return coordinate system
121 const coordinateSystem& cs() const
126 //- Return ID of piston patch
127 const polyPatchID& patchID() const
132 // Piston layering thickness
134 scalar minLayer() const
139 scalar maxLayer() const
146 void writeDict(Ostream&) const;
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 // ************************************************************************* //