functionDot.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) 2018-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::joints::functionDot
26 
27 Description
28  Joint in which the position is a function of the parent joint's velocity
29 
30  Reference:
31  \verbatim
32  Featherstone, R. (2008).
33  Rigid body dynamics algorithms.
34  Springer.
35  Chapter 4.
36  \endverbatim
37 
38 SourceFiles
39  functionDot.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef RBD_joints_functionDot_H
44 #define RBD_joints_functionDot_H
45 
46 #include "joint.H"
47 #include "Function1.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace RBD
54 {
55 namespace joints
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class functionDot Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class functionDot
63 :
64  public joint
65 {
66  // Private Data
67 
68  //- Function
70 
71  //- Difference used to calculate the gradient of the function
72  const scalar delta_;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("functionDot");
79 
80 
81  // Constructors
82 
83  //- Construct for given model from dictionary
84  functionDot(const rigidBodyModel& model, const dictionary& dict);
85 
86  //- Clone this joint
87  virtual autoPtr<joint> clone() const;
88 
89 
90  //- Destructor
91  virtual ~functionDot();
92 
93 
94  // Member Functions
95 
96  //- Update the model state for this joint
97  virtual void jcalc
98  (
99  joint::XSvc& J,
100  const rigidBodyModelState& state
101  ) const;
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 } // End namespace joints
108 } // End namespace RBD
109 } // End namespace Foam
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 #endif
114 
115 // ************************************************************************* //
Joint state returned by jcalc.
Definition: joint.H:124
Abstract base-class for all rigid-body joints.
Definition: joint.H:81
Joint in which the position is a function of the parent joint's velocity.
Definition: functionDot.H:64
functionDot(const rigidBodyModel &model, const dictionary &dict)
Construct for given model from dictionary.
Definition: functionDot.C:54
virtual ~functionDot()
Destructor.
Definition: functionDot.C:73
virtual autoPtr< joint > clone() const
Clone this joint.
Definition: functionDot.C:65
virtual void jcalc(joint::XSvc &J, const rigidBodyModelState &state) const
Update the model state for this joint.
Definition: functionDot.C:80
TypeName("functionDot")
Runtime type information.
Holds the motion state of rigid-body model.
Basic rigid-body model representing a system of rigid-bodies connected by 1-6 DoF joints.
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
Namespace for OpenFOAM.
dictionary dict