engineMesh.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::engineMesh
28 
29 Description
30  Foam::engineMesh
31 
32 SourceFiles
33  engineMesh.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef engineMesh_H
38 #define engineMesh_H
39 
40 #include "engineTime.H"
41 #include "fvMesh.H"
42 #include "autoPtr.H"
43 #include "runTimeSelectionTables.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class engineMesh Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class engineMesh
55 :
56  public fvMesh
57 {
58  // Private Member Functions
59 
60  //- No copy construct
61  engineMesh(const engineMesh&) = delete;
62 
63  //- No copy assignment
64  void operator=(const engineMesh&) = delete;
65 
66 
67 protected:
68 
69  // Protected data
70 
71  const engineTime& engineDB_;
72 
73  label pistonIndex_;
74  label linerIndex_;
75  label cylinderHeadIndex_;
76 
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("engineMesh");
85 
86 
87  // Declare run-time constructor selection table
88 
90  (
91  autoPtr,
92  engineMesh,
93  IOobject,
94  (const IOobject& io),
95  (io)
96  );
97 
98 
99  // Constructors
100 
101  //- Construct from objectRegistry, and read/write options
102  explicit engineMesh(const IOobject& io);
103 
104 
105  // Selectors
106 
107  //- Select null constructed
108  static autoPtr<engineMesh> New(const IOobject& io);
109 
110 
111  //- Destructor
112  virtual ~engineMesh();
113 
114 
115  // Member Functions
116 
117  //- Is mesh dynamic
118  virtual bool dynamic() const
119  {
120  return true;
121  }
122 
123  virtual void move() = 0;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::engineMesh
Foam::engineMesh.
Definition: engineMesh.H:53
Foam::engineMesh::~engineMesh
virtual ~engineMesh()
Destructor.
Definition: engineMesh.C:133
Foam::engineMesh::pistonPosition_
dimensionedScalar pistonPosition_
Definition: engineMesh.H:77
Foam::engineMesh::linerIndex_
label linerIndex_
Definition: engineMesh.H:73
Foam::engineMesh::cylinderHeadIndex_
label cylinderHeadIndex_
Definition: engineMesh.H:74
Foam::engineMesh::deckHeight_
dimensionedScalar deckHeight_
Definition: engineMesh.H:76
Foam::engineMesh::pistonIndex_
label pistonIndex_
Definition: engineMesh.H:72
Foam::engineMesh::TypeName
TypeName("engineMesh")
Runtime type information.
Foam::engineMesh::move
virtual void move()=0
Foam::engineMesh::New
static autoPtr< engineMesh > New(const IOobject &io)
Select null constructed.
Definition: engineMeshNew.C:34
Foam::engineTime
An abstract class for the time description of the piston motion.
Definition: engineTime.H:54
Foam::dimensioned< scalar >
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::engineMesh::dynamic
virtual bool dynamic() const
Is mesh dynamic.
Definition: engineMesh.H:117
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::engineMesh::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, engineMesh, IOobject,(const IOobject &io),(io))
engineTime.H
Foam::engineMesh::engineDB_
const engineTime & engineDB_
Definition: engineMesh.H:70
autoPtr.H