solidBodyMotionFunction.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-2014 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 Namespace
25  Foam::solidBodyMotionFunctions
26 
27 Description
28  Namespace for solid-body motions
29 
30 
31 Class
32  Foam::solidBodyMotionFunction
33 
34 Description
35  Base class for defining solid-body motions
36 
37 SourceFiles
38  solidBodyMotionFunction.C
39  dynamicFvMeshNew.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef solidBodyMotionFunction_H
44 #define solidBodyMotionFunction_H
45 
46 #include "Time.H"
47 #include "dictionary.H"
48 #include "septernion.H"
49 #include "autoPtr.H"
50 #include "runTimeSelectionTables.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 /*---------------------------------------------------------------------------*\
58  s Class solidBodyMotionFunction Declaration
59 \*---------------------------------------------------------------------------*/
60 
62 {
63 protected:
64 
65  // Protected data
66 
68  const Time& time_;
69 
70 
71 private:
72 
73  // Private Member Functions
74 
75  //- Disallow default bitwise copy construct
77 
78  //- Disallow default bitwise assignment
79  void operator=(const solidBodyMotionFunction&);
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("solidBodyMotionFunction");
86 
87 
88  // Declare run-time constructor selection table
89 
91  (
92  autoPtr,
94  dictionary,
95  (const dictionary& SBMFCoeffs, const Time& runTime),
96  (SBMFCoeffs, runTime)
97  );
98 
99 
100  // Constructors
101 
102  //- Construct from the SBMFCoeffs dictionary and Time
104  (
105  const dictionary& SBMFCoeffs,
106  const Time& runTime
107  );
108 
109  //- Construct and return a clone
110  virtual autoPtr<solidBodyMotionFunction> clone() const = 0;
111 
112 
113  // Selectors
114 
115  //- Select constructed from the SBMFCoeffs dictionary and Time
117  (
118  const dictionary& SBMFCoeffs,
119  const Time& runTime
120  );
121 
122 
123  //- Destructor
124  virtual ~solidBodyMotionFunction();
125 
126 
127  // Member Functions
128 
129  //- Return the solid-body motion transformation septernion
130  virtual septernion transformation() const = 0;
131 
132  //- Update properties from given dictionary
133  virtual bool read(const dictionary& SBMFCoeffs) = 0;
134 
135  //- Write in dictionary format
136  virtual void writeData(Ostream&) const;
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
virtual void writeData(Ostream &) const
Write in dictionary format.
declareRunTimeSelectionTable(autoPtr, solidBodyMotionFunction, dictionary,(const dictionary &SBMFCoeffs, const Time &runTime),(SBMFCoeffs, runTime))
virtual ~solidBodyMotionFunction()
Destructor.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual autoPtr< solidBodyMotionFunction > clone() const =0
Construct and return a clone.
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:65
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
TypeName("solidBodyMotionFunction")
Runtime type information.
Base class for defining solid-body motions.
static autoPtr< solidBodyMotionFunction > New(const dictionary &SBMFCoeffs, const Time &runTime)
Select constructed from the SBMFCoeffs dictionary and Time.
virtual bool read(const dictionary &SBMFCoeffs)=0
Update properties from given dictionary.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
virtual septernion transformation() const =0
Return the solid-body motion transformation septernion.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
Macros to ease declaration of run-time selection tables.
Namespace for OpenFOAM.