masslessBody.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2024 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::RBD::masslessBody
26 
27 Description
28 
29 SourceFiles
30  masslessBodyI.H
31  masslessBody.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef RBD_masslessBody_H
36 #define RBD_masslessBody_H
37 
38 #include "rigidBody.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 namespace RBD
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class masslessBody Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class masslessBody
52 :
53  public rigidBody
54 {
55 
56 public:
57 
58  //- Runtime type information
59  TypeName("masslessBody");
60 
61 
62  // Constructors
63 
64  //- Construct a massless body
65  inline masslessBody();
66 
67  //- Construct a named massless body
68  inline masslessBody(const word& name);
69 
70  //- Construct from dictionary
71  inline masslessBody
72  (
73  const word& name,
74  const dictionary& dict
75  );
76 
77  //- Return clone of this masslessBody
78  virtual autoPtr<rigidBody> clone() const;
79 
80 
81  //- Destructor
82  virtual ~masslessBody();
83 
84 
85  // Member Functions
86 
87  //- Return true if this body is a massless component of a composite body
88  virtual bool massless() const;
89 
90  //- Write
91  virtual void write(Ostream&) const;
92 };
93 
94 
95 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
96 
97 } // End namespace RBD
98 } // End namespace Foam
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 #include "masslessBodyI.H"
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 #endif
107 
108 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
virtual void write(Ostream &) const
Write.
Definition: masslessBody.C:69
virtual bool massless() const
Return true if this body is a massless component of a composite body.
Definition: masslessBody.C:63
virtual ~masslessBody()
Destructor.
Definition: masslessBody.C:57
virtual autoPtr< rigidBody > clone() const
Return clone of this masslessBody.
Definition: masslessBody.C:49
masslessBody()
Construct a massless body.
Definition: masslessBodyI.H:28
TypeName("masslessBody")
Runtime type information.
const word & name() const
Return name.
Definition: rigidBodyI.H:65
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict