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-2026 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 
30 SourceFiles
31  masslessBodyI.H
32  masslessBody.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef RBD_masslessBody_H
37 #define RBD_masslessBody_H
38 
39 #include "rigidBody.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace RBD
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class masslessBody Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 class masslessBody
53 :
54  public rigidBody
55 {
56 
57 public:
58 
59  //- Runtime type information
60  TypeName("masslessBody");
61 
62 
63  // Constructors
64 
65  //- Construct a massless body
66  inline masslessBody();
67 
68  //- Construct a named massless body
69  inline masslessBody(const word& name);
70 
71  //- Construct from dictionary
72  inline masslessBody
73  (
74  const word& name,
75  const dictionary& dict
76  );
77 
78  //- Return clone of this masslessBody
79  virtual autoPtr<rigidBody> clone() const;
80 
81 
82  //- Destructor
83  virtual ~masslessBody();
84 
85 
86  // Member Functions
87 
88  //- Return true if this body is a massless component of a composite body
89  virtual bool massless() const;
90 
91  //- Write
92  virtual void write(Ostream&) const;
93 };
94 
95 
96 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
97 
98 } // End namespace RBD
99 } // End namespace Foam
100 
101 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
102 
103 #include "masslessBodyI.H"
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 #endif
108 
109 // ************************************************************************* //
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:63
virtual bool massless() const
Return true if this body is a massless component of a composite body.
Definition: masslessBody.C:57
virtual ~masslessBody()
Destructor.
Definition: masslessBody.C:51
virtual autoPtr< rigidBody > clone() const
Return clone of this masslessBody.
Definition: masslessBody.C:43
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A class for handling words, derived from string.
Definition: word.H:63
Namespace for OpenFOAM.
dictionary dict