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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Namespace
27  Foam::solidBodyMotionFunctions
28 
29 Description
30  Namespace for solid-body motions
31 
32 
33 Class
34  Foam::solidBodyMotionFunction
35 
36 Description
37  Base class for defining solid-body motions
38 
39 SourceFiles
40  solidBodyMotionFunction.C
41  dynamicFvMeshNew.C
42 
43 \*---------------------------------------------------------------------------*/
44 
45 #ifndef solidBodyMotionFunction_H
46 #define solidBodyMotionFunction_H
47 
48 #include "Time.H"
49 #include "dictionary.H"
50 #include "septernion.H"
51 #include "autoPtr.H"
52 #include "runTimeSelectionTables.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 
59 /*---------------------------------------------------------------------------*\
60  s Class solidBodyMotionFunction Declaration
61 \*---------------------------------------------------------------------------*/
62 
64 {
65 protected:
66 
67  // Protected data
68 
70  const Time& time_;
71 
72 
73 private:
74 
75  // Private Member Functions
76 
77  //- No copy construct
79 
80  //- No copy assignment
81  void operator=(const solidBodyMotionFunction&) = delete;
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("solidBodyMotionFunction");
88 
89 
90  // Declare run-time constructor selection table
91 
93  (
94  autoPtr,
96  dictionary,
97  (const dictionary& SBMFCoeffs, const Time& runTime),
98  (SBMFCoeffs, runTime)
99  );
100 
101 
102  // Constructors
103 
104  //- Construct from the SBMFCoeffs dictionary and Time
106  (
107  const dictionary& SBMFCoeffs,
108  const Time& runTime
109  );
110 
111  //- Construct and return a clone
112  virtual autoPtr<solidBodyMotionFunction> clone() const = 0;
113 
114 
115  // Selectors
116 
117  //- Select constructed from the SBMFCoeffs dictionary and Time
119  (
120  const dictionary& SBMFCoeffs,
121  const Time& runTime
122  );
123 
124 
125  //- Destructor
126  virtual ~solidBodyMotionFunction();
127 
128 
129  // Member Functions
130 
131  //- Return the solid-body motion transformation septernion
132  virtual septernion transformation() const = 0;
133 
134  //- Update properties from given dictionary
135  virtual bool read(const dictionary& SBMFCoeffs) = 0;
136 
137  //- Write in dictionary format
138  virtual void writeData(Ostream&) const;
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::solidBodyMotionFunction::transformation
virtual septernion transformation() const =0
Return the solid-body motion transformation septernion.
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::solidBodyMotionFunction::New
static autoPtr< solidBodyMotionFunction > New(const dictionary &SBMFCoeffs, const Time &runTime)
Select constructed from the SBMFCoeffs dictionary and Time.
Definition: solidBodyMotionFunctionNew.C:34
Foam::septernion
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:66
Foam::solidBodyMotionFunction::~solidBodyMotionFunction
virtual ~solidBodyMotionFunction()
Destructor.
Definition: solidBodyMotionFunction.C:60
Foam::solidBodyMotionFunction::TypeName
TypeName("solidBodyMotionFunction")
Runtime type information.
Foam::solidBodyMotionFunction::clone
virtual autoPtr< solidBodyMotionFunction > clone() const =0
Construct and return a clone.
septernion.H
Foam::solidBodyMotionFunction::SBMFCoeffs_
dictionary SBMFCoeffs_
Definition: solidBodyMotionFunction.H:68
Foam::solidBodyMotionFunction::writeData
virtual void writeData(Ostream &) const
Write in dictionary format.
Definition: solidBodyMotionFunction.C:74
Foam::solidBodyMotionFunction
Base class for defining solid-body motions.
Definition: solidBodyMotionFunction.H:62
Foam::solidBodyMotionFunction::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, solidBodyMotionFunction, dictionary,(const dictionary &SBMFCoeffs, const Time &runTime),(SBMFCoeffs, runTime))
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::solidBodyMotionFunction::read
virtual bool read(const dictionary &SBMFCoeffs)=0
Update properties from given dictionary.
Definition: solidBodyMotionFunction.C:66
Time.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
dictionary.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::solidBodyMotionFunction::time_
const Time & time_
Definition: solidBodyMotionFunction.H:69
autoPtr.H