linearMotion.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 | Copyright (C) 2011-2013 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::solidBodyMotionFunctions::linearMotion
26 
27 Description
28  SolidBodyMotionFvMesh 6DoF motion function. Constant velocity displacement.
29 
30 SourceFiles
31  linearMotion.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef linearMotion_H
36 #define linearMotion_H
37 
39 #include "primitiveFields.H"
40 #include "point.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace solidBodyMotionFunctions
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class linearMotion Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class linearMotion
54 :
56 {
57  // Private data
58 
59  //- Linear velocity
60  vector velocity_;
61 
62 
63  // Private Member Functions
64 
65  //- Disallow copy construct
66  linearMotion(const linearMotion&);
67 
68  //- Disallow default bitwise assignment
69  void operator=(const linearMotion&);
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("linearMotion");
76 
77 
78  // Constructors
79 
80  //- Construct from components
82  (
83  const dictionary& SBMFCoeffs,
84  const Time& runTime
85  );
86 
87  //- Construct and return a clone
89  {
91  (
92  new linearMotion
93  (
95  time_
96  )
97  );
98  }
99 
100 
101  //- Destructor
102  virtual ~linearMotion();
103 
104 
105  // Member Functions
106 
107  //- Return the solid-body motion transformation septernion
108  virtual septernion transformation() const;
109 
110  //- Update properties from given dictionary
111  virtual bool read(const dictionary& SBMFCoeffs);
112 };
113 
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 } // End namespace solidBodyMotionFunctions
118 } // End namespace Foam
119 
120 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
121 
122 #endif
123 
124 // ************************************************************************* //
virtual autoPtr< solidBodyMotionFunction > clone() const
Construct and return a clone.
Definition: linearMotion.H:87
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:65
virtual bool read(const dictionary &SBMFCoeffs)
Update properties from given dictionary.
Definition: linearMotion.C:86
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Base class for defining solid-body motions.
virtual septernion transformation() const
Return the solid-body motion transformation septernion.
Definition: linearMotion.C:69
Specialisations of Field<T> for scalar, vector and tensor.
SolidBodyMotionFvMesh 6DoF motion function. Constant velocity displacement.
Definition: linearMotion.H:52
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
TypeName("linearMotion")
Runtime type information.
Namespace for OpenFOAM.