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-2021 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 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef solidBodyMotionFunction_H
43 #define solidBodyMotionFunction_H
44 
45 #include "Time.H"
46 #include "dictionary.H"
47 #include "septernion.H"
48 #include "autoPtr.H"
49 #include "runTimeSelectionTables.H"
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  s Class solidBodyMotionFunction Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 {
62 protected:
63 
64  // Protected data
65 
67  const Time& time_;
68 
69 
70 public:
71 
72  //- Runtime type information
73  TypeName("solidBodyMotionFunction");
74 
75 
76  // Declare run-time constructor selection table
77 
79  (
80  autoPtr,
82  dictionary,
83  (const dictionary& SBMFCoeffs, const Time& runTime),
84  (SBMFCoeffs, runTime)
85  );
86 
87 
88  // Constructors
89 
90  //- Construct from the SBMFCoeffs dictionary and Time
92  (
93  const dictionary& SBMFCoeffs,
94  const Time& runTime
95  );
96 
97  //- Disallow default bitwise copy construction
99 
100  //- Construct and return a clone
101  virtual autoPtr<solidBodyMotionFunction> clone() const = 0;
102 
103 
104  // Selectors
105 
106  //- Select constructed from the SBMFCoeffs dictionary and Time
108  (
109  const dictionary& SBMFCoeffs,
110  const Time& runTime
111  );
112 
113 
114  //- Destructor
115  virtual ~solidBodyMotionFunction();
116 
117 
118  // Member Functions
119 
120  //- Return the solid-body motion transformation septernion
121  virtual septernion transformation() const = 0;
122 
123  //- Update properties from given dictionary
124  virtual bool read(const dictionary& SBMFCoeffs) = 0;
125 
126  //- Write in dictionary format
127  virtual void writeData(Ostream&) const;
128 
129 
130  // Member Operators
131 
132  //- Disallow default bitwise assignment
133  void operator=(const solidBodyMotionFunction&) = delete;
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
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:160
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:66
Base class for defining solid-body motions.
virtual autoPtr< solidBodyMotionFunction > clone() const =0
Construct and return a clone.
declareRunTimeSelectionTable(autoPtr, solidBodyMotionFunction, dictionary,(const dictionary &SBMFCoeffs, const Time &runTime),(SBMFCoeffs, runTime))
static autoPtr< solidBodyMotionFunction > New(const dictionary &SBMFCoeffs, const Time &runTime)
Select constructed from the SBMFCoeffs dictionary and Time.
TypeName("solidBodyMotionFunction")
Runtime type information.
virtual ~solidBodyMotionFunction()
Destructor.
solidBodyMotionFunction(const dictionary &SBMFCoeffs, const Time &runTime)
Construct from the SBMFCoeffs dictionary and Time.
virtual septernion transformation() const =0
Return the solid-body motion transformation septernion.
void operator=(const solidBodyMotionFunction &)=delete
Disallow default bitwise assignment.
virtual void writeData(Ostream &) const
Write in dictionary format.
virtual bool read(const dictionary &SBMFCoeffs)=0
Update properties from given dictionary.
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.