solidBodyMotionFunction.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-2019 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 public:
72 
73  //- Runtime type information
74  TypeName("solidBodyMotionFunction");
75 
76 
77  // Declare run-time constructor selection table
78 
80  (
81  autoPtr,
83  dictionary,
84  (const dictionary& SBMFCoeffs, const Time& runTime),
85  (SBMFCoeffs, runTime)
86  );
87 
88 
89  // Constructors
90 
91  //- Construct from the SBMFCoeffs dictionary and Time
93  (
94  const dictionary& SBMFCoeffs,
95  const Time& runTime
96  );
97 
98  //- Disallow default bitwise copy construction
100 
101  //- Construct and return a clone
102  virtual autoPtr<solidBodyMotionFunction> clone() const = 0;
103 
104 
105  // Selectors
106 
107  //- Select constructed from the SBMFCoeffs dictionary and Time
109  (
110  const dictionary& SBMFCoeffs,
111  const Time& runTime
112  );
113 
114 
115  //- Destructor
116  virtual ~solidBodyMotionFunction();
117 
118 
119  // Member Functions
120 
121  //- Return the solid-body motion transformation septernion
122  virtual septernion transformation() const = 0;
123 
124  //- Update properties from given dictionary
125  virtual bool read(const dictionary& SBMFCoeffs) = 0;
126 
127  //- Write in dictionary format
128  virtual void writeData(Ostream&) const;
129 
130 
131  // Member Operators
132 
133  //- Disallow default bitwise assignment
134  void operator=(const solidBodyMotionFunction&) = delete;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
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:158
virtual void writeData(Ostream &) const
Write in dictionary format.
engineTime & runTime
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:52
Macros to ease declaration of run-time selection tables.
solidBodyMotionFunction(const dictionary &SBMFCoeffs, const Time &runTime)
Construct from the SBMFCoeffs dictionary and Time.
void operator=(const solidBodyMotionFunction &)=delete
Disallow default bitwise assignment.
Namespace for OpenFOAM.