specifiedRotation.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) 2021 OpenCFD Ltd.
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::coordinateRotations::specified
28
29Description
30 An user-specified coordinateRotation, primarily to be used internally
31 within coding when the rotation matrix is already known but
32 needs to be wrapped as a coordinateRotation for use in a coordinate
33 system.
34
35Note
36 Currently no runtime selection mechanism, since specifying a
37 rotation matrix via a dictionary can be fragile due to rounding
38 factors and uncertainty if a forward or reverse rotation matrix
39 is intended.
40
41SourceFiles
42 specifiedRotation.C
43
44\*---------------------------------------------------------------------------*/
45
46#ifndef Foam_coordinateRotations_specified_H
47#define Foam_coordinateRotations_specified_H
48
49#include "coordinateRotation.H"
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55namespace coordinateRotations
56{
57
58/*---------------------------------------------------------------------------*\
59 Class coordinateRotations::specified Declaration
60\*---------------------------------------------------------------------------*/
62class specified
63:
65{
66 // Private Data
67
68 //- The rotation matrix
69 tensor Rmatrix_;
70
71
72public:
73
74 //- Runtime type information
75 TypeNameNoDebug("specified");
76
77
78 // Constructors
79
80 //- Default construct - an identity matrix
81 specified();
82
83 //- Construct from transformation matrix
84 explicit specified(const tensor& rot);
85
86 //- Construct from dictionary
87 explicit specified(const dictionary& unused);
88
89 //- Return clone
91 {
92 return
95 }
96
97
98 //- Destructor
99 virtual ~specified() = default;
100
101
102 // Member Functions
103
104 //- Reset specification
105 virtual void clear();
106
107 //- Return the rotation tensor
108 virtual tensor R() const;
109
110 //- Write information
111 virtual void write(Ostream& os) const;
112
113 //- Write dictionary entry
114 virtual void writeEntry(const word& keyword, Ostream& os) const;
115};
116
117
118// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120} // End namespace coordinateRotations
121} // End namespace Foam
122
123// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124
125#endif
126
127// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
User specification of a coordinate rotation.
An user-specified coordinateRotation, primarily to be used internally within coding when the rotation...
specified()
Default construct - an identity matrix.
virtual tensor R() const
Return the rotation tensor.
TypeNameNoDebug("specified")
Runtime type information.
virtual void writeEntry(const word &keyword, Ostream &os) const
Write dictionary entry.
virtual void clear()
Reset specification.
autoPtr< coordinateRotation > clone() const
Return clone.
virtual ~specified()=default
Destructor.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling words, derived from Foam::string.
Definition: word.H:68
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()
#define TypeNameNoDebug(TypeNameString)
Declare a ClassNameNoDebug() with extra virtual type info.
Definition: typeInfo.H:68