Loading...
Searching...
No Matches
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-2024 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{
58/*---------------------------------------------------------------------------*\
59 Class coordinateRotations::specified Declaration
60\*---------------------------------------------------------------------------*/
61
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 coordinateRotation::Clone(*this);
93 }
94
95
96 //- Destructor
97 virtual ~specified() = default;
98
99
100 // Member Functions
101
102 //- Reset specification
103 virtual void clear();
104
105 //- Return the rotation tensor
106 virtual tensor R() const;
107
108 //- Write information
109 virtual void write(Ostream& os) const;
110
111 //- Write dictionary entry
112 virtual void writeEntry(const word& keyword, Ostream& os) const;
113};
114
115
116// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117
118} // End namespace coordinateRotations
119} // End namespace Foam
120
121// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122
123#endif
124
125// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
User specification of a coordinate rotation.
static autoPtr< coordinateRotation > Clone(const Derived &crot)
Clone a coordinate 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:133
A class for handling words, derived from Foam::string.
Definition word.H:66
OBJstream os(runTime.globalPath()/outputName)
Namespace for coordinate system rotations.
Namespace for OpenFOAM.
Tensor< scalar > tensor
Definition symmTensor.H:57
runTime write()
#define TypeNameNoDebug(TypeNameString)
Declare a ClassNameNoDebug() with extra virtual type info.
Definition typeInfo.H:61