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 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Namespace
28 Foam::solidBodyMotionFunctions
29
30Description
31 Namespace for solid-body motions
32
33
34Class
35 Foam::solidBodyMotionFunction
36
37Description
38 Base class for defining solid-body motions
39
40SourceFiles
41 solidBodyMotionFunction.C
42 dynamicFvMeshNew.C
43
44\*---------------------------------------------------------------------------*/
45
46#ifndef solidBodyMotionFunction_H
47#define solidBodyMotionFunction_H
48
49#include "Time.H"
50#include "dictionary.H"
51#include "septernion.H"
52#include "autoPtr.H"
54
55// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56
57namespace Foam
58{
59
60/*---------------------------------------------------------------------------*\
61 Class solidBodyMotionFunction Declaration
62\*---------------------------------------------------------------------------*/
65{
66protected:
67
68 // Protected Data
72 const Time& time_;
73
74
75 // Protected Member Functions
76
77 //- No copy construct
79
80 //- No copy assignment
81 void operator=(const solidBodyMotionFunction&) = delete;
82
83
84public:
85
86 //- Runtime type information
87 TypeName("solidBodyMotionFunction");
88
89
90 // Declare run-time constructor selection table
93 (
94 autoPtr,
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() = default;
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// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Septernion class used to perform translations and rotations in 3D space.
Definition: septernion.H:67
Base class for defining solid-body motions.
virtual ~solidBodyMotionFunction()=default
Destructor.
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 septernion transformation() const =0
Return the solid-body motion transformation septernion.
void operator=(const solidBodyMotionFunction &)=delete
No copy assignment.
virtual void writeData(Ostream &) const
Write in dictionary format.
virtual bool read(const dictionary &SBMFCoeffs)=0
Update properties from given dictionary.
solidBodyMotionFunction(const solidBodyMotionFunction &)=delete
No copy construct.
engineTime & runTime
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73