sixDoFRigidBodyMotionOrientationConstraint.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) 2011-2018 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::sixDoFRigidBodyMotionConstraints::orientation
26 
27 Description
28  Orientation constraint:
29  fixed in global space.
30 
31 SourceFiles
32  sixDoFRigidBodyMotionOrientationConstraint.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef sixDoFRigidBodyMotionOrientationConstraint_H
37 #define sixDoFRigidBodyMotionOrientationConstraint_H
38 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 namespace sixDoFRigidBodyMotionConstraints
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class orientation Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class orientation
54 :
56 {
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("orientation");
62 
63 
64  // Constructors
65 
66  //- Construct from components
68  (
69  const word& name,
70  const dictionary& sDoFRBMCDict,
71  const sixDoFRigidBodyMotion& motion
72  );
73 
74  //- Construct and return a clone
76  {
78  (
79  new orientation(*this)
80  );
81  }
82 
83 
84  //- Destructor
85  virtual ~orientation();
86 
87 
88  // Member Functions
89 
90  //- Apply and accumulate translational constraints
91  virtual void constrainTranslation(pointConstraint&) const;
92 
93  //- Apply and accumulate rotational constraints
94  virtual void constrainRotation(pointConstraint&) const;
95 
96  //- Update properties from given dictionary
97  virtual bool read(const dictionary& sDoFRBMCCoeff);
98 
99  //- Write
100  virtual void write(Ostream&) const;
101 };
102 
103 
104 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 
106 } // End namespace solidBodyMotionFunctions
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
Six degree of freedom motion for a rigid body.
virtual autoPtr< sixDoFRigidBodyMotionConstraint > clone() const
Construct and return a clone.
const word & name() const
Return the name.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual void constrainTranslation(pointConstraint &) const
Apply and accumulate translational constraints.
Base class for defining constraints for sixDoF motions.
virtual bool read(const dictionary &sDoFRBMCCoeff)
Update properties from given dictionary.
TypeName("orientation")
Runtime type information.
A class for handling words, derived from string.
Definition: word.H:59
Accumulates point constraints through successive applications of the applyConstraint function...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual void constrainRotation(pointConstraint &) const
Apply and accumulate rotational constraints.
orientation(const word &name, const dictionary &sDoFRBMCDict, const sixDoFRigidBodyMotion &motion)
Construct from components.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Namespace for OpenFOAM.