gravityMeshObject.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) 2018-2019 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::meshObjects::gravity
28
29Description
30 Gravitational acceleration vector
31 Although termed a \em MeshObject it is registered on Time only
32 and thus identical for all regions.
33
34SourceFiles
35 gravityMeshObject.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef meshObjects_gravity_H
40#define meshObjects_gravity_H
41
43#include "MeshObject.H"
44#include "Time.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50namespace meshObjects
51{
52
53/*---------------------------------------------------------------------------*\
54 Class gravity Declaration
55\*---------------------------------------------------------------------------*/
57class gravity
58:
59 public MeshObject
60 <
61 Time,
62 TopologicalMeshObject,
63 gravity
64 >,
66{
67
68public:
69
70 //- Run-time type information
71 TypeNameNoDebug("g");
72
73
74 //- Construct on Time
75 explicit gravity(const Time& runTime)
76 :
79 (
81 (
82 "g", // Must be identical to typeName!
84 runTime,
87 false // let MeshObject register it
88 )
89 )
90 {}
91
92
93 //- Construct on Time
94 static const gravity& New(const Time& runTime)
95 {
97 }
98
99
100 //- Destructor
101 virtual ~gravity() = default;
102};
103
104
105// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106
107} // End namespace meshObjects
108} // End namespace Foam
109
110// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112#endif
113
114// ************************************************************************* //
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:170
@ MUST_READ_IF_MODIFIED
Definition: IOobject.H:180
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Definition: MeshObject.H:91
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
Gravitational acceleration vector Although termed a MeshObject it is registered on Time only and thus...
static const gravity & New(const Time &runTime)
Construct on Time.
TypeNameNoDebug("g")
Run-time type information.
virtual ~gravity()=default
Destructor.
gravity(const Time &runTime)
Construct on Time.
constant condensation/saturation model.
engineTime & runTime
Namespace for OpenFOAM.
#define TypeNameNoDebug(TypeNameString)
Declare a ClassNameNoDebug() with extra virtual type info.
Definition: typeInfo.H:68