sixDoFRigidBodyState.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) 2017 OpenFOAM Foundation
9 Copyright (C) 2018-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
27Class
28 Foam::functionObjects::sixDoFRigidBodyState
29
30Group
31 grpSixDoFRigidBodyFunctionObjects
32
33Description
34 Writes the 6-DoF motion state.
35
36 Example of function object specification:
37 \verbatim
38 sixDoFRigidBodyState
39 {
40 type sixDoFRigidBodyState;
41 libs (sixDoFRigidBodyState);
42 angleFormat degrees;
43 }
44 \endverbatim
45
46Usage
47 \table
48 Property | Description | Required | Default value
49 type | type name: sixDoFRigidBodyState | yes |
50 angleFormat | degrees or radians | no | radian
51 \endtable
52
53See also
54 Foam::functionObjects::fvMeshFunctionObject
55 Foam::functionObjects::writeFile
56
57SourceFiles
58 sixDoFRigidBodyState.C
59
60\*---------------------------------------------------------------------------*/
61
62#ifndef sixDoFRigidBodyState_H
63#define sixDoFRigidBodyState_H
64
66#include "writeFile.H"
67#include "Enum.H"
68
69// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70
71namespace Foam
72{
73namespace functionObjects
74{
75
76/*---------------------------------------------------------------------------*\
77 Class sixDoFRigidBodyState Declaration
78\*---------------------------------------------------------------------------*/
79
80class sixDoFRigidBodyState
81:
82 public fvMeshFunctionObject,
83 public writeFile
84{
85 // Private data
86
87 enum class angleTypes
88 {
89 RADIANS,
90 DEGREES
91 };
92
93 //- Angle type names
94 static const Enum<angleTypes> angleTypeNames_;
95
96 //- Angle format
97 angleTypes angleFormat_;
98
99
100 // Private Member Functions
101
102 //- No copy construct
104
105 //- No copy assignment
106 void operator=(const sixDoFRigidBodyState&) = delete;
107
108
109protected:
110
111 // Protected Member Functions
112
113 //- Overloaded writeFileHeader from writeFile
114 virtual void writeFileHeader(Ostream& os);
115
116
117public:
118
119 //- Runtime type information
120 TypeName("sixDoFRigidBodyState");
121
122
123 // Constructors
124
125 //- Construct from Time and dictionary
127 (
128 const word& name,
129 const Time& runTime,
130 const dictionary& dict
131 );
132
133
134 //- Destructor
135 virtual ~sixDoFRigidBodyState() = default;
136
137
138 // Member Functions
139
140 //- Read the sixDoFRigidBodyState data
141 virtual bool read(const dictionary&);
142
143 //- Execute, currently does nothing
144 virtual bool execute();
145
146 //- Write the sixDoFRigidBodyState
147 virtual bool write();
148};
150
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153} // End namespace functionObjects
154} // End namespace Foam
155
156// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157
158#endif
159
160// ************************************************************************* //
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: Enum.H:61
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
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
TypeName("sixDoFRigidBodyState")
Runtime type information.
virtual ~sixDoFRigidBodyState()=default
Destructor.
virtual void writeFileHeader(Ostream &os)
Overloaded writeFileHeader from writeFile.
virtual bool execute()
Execute, currently does nothing.
virtual bool write()
Write the sixDoFRigidBodyState.
virtual bool read(const dictionary &)
Read the sixDoFRigidBodyState data.
Base class for writing single files from the function objects.
Definition: writeFile.H:120
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73