1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::EulerCoordinateRotation
29 A coordinateRotation defined in the z-x-y Euler convention.
31 The 3 rotations are defined in the Euler convention
32 (around Z, around X' and around Z').
33 For reference and illustration, see
34 http://mathworld.wolfram.com/EulerAngles.html
35 Note, however, that it is the reverse transformation
36 (local->global) that is defined here.
38 - the rotation angles are in degrees, unless otherwise explictly specified:
45 rotation (0 0 3.141592654);
49 \*---------------------------------------------------------------------------*/
51 #ifndef EulerCoordinateRotation_H
52 #define EulerCoordinateRotation_H
54 #include "coordinateRotation.H"
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 /*---------------------------------------------------------------------------*\
62 Class EulerCoordinateRotation Declaration
63 \*---------------------------------------------------------------------------*/
65 class EulerCoordinateRotation
67 public coordinateRotation
69 // Private member functions
71 //- Calculate transformation tensor
74 const scalar phiAngle,
75 const scalar thetaAngle,
76 const scalar psiAngle,
77 const bool inDegrees=true
83 //- Runtime type information
84 TypeName("EulerRotation");
90 EulerCoordinateRotation();
92 //- Construct from rotation vector
93 EulerCoordinateRotation
95 const vector& phiThetaPsi,
96 const bool inDegrees=true
99 //- Construct from components of rotation vector
100 EulerCoordinateRotation
102 const scalar phiAngle,
103 const scalar thetaAngle,
104 const scalar psiAngle,
105 const bool inDegrees=true
108 //- Construct from dictionary
109 EulerCoordinateRotation(const dictionary&);
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 } // End namespace Foam
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 // ************************************************************************* //