euler Class Reference

A coordinateRotation defined in the z-x-z (intrinsic) Euler convention. More...

Inheritance diagram for euler:
[legend]
Collaboration diagram for euler:
[legend]

Public Types

using eulerOrder = quaternion::eulerOrder
 Euler-angle rotation order. More...
 

Public Member Functions

 TypeNameNoDebug ("euler")
 Runtime type information. More...
 
 euler ()
 Default construct - an identity transform. More...
 
 euler (const euler &crot)
 Copy construct. More...
 
 euler (const vector &angles, bool degrees)
 Construct from Euler intrinsic rotation angles (z-x-z) More...
 
 euler (scalar angle1, scalar angle2, scalar angle3, bool degrees)
 Construct from Euler intrinsic rotation angles (z-x-z) More...
 
 euler (const dictionary &dict)
 Construct from dictionary. More...
 
autoPtr< coordinateRotationclone () const
 Return clone. More...
 
virtual ~euler ()=default
 Destructor. More...
 
virtual void clear ()
 Reset specification. More...
 
virtual tensor R () const
 The rotation tensor calculated for the specified Euler angles. More...
 
virtual void write (Ostream &os) const
 Write information. More...
 
virtual void writeEntry (const word &keyword, Ostream &os) const
 Write dictionary entry. More...
 
- Public Member Functions inherited from coordinateRotation
 TypeNameNoDebug ("coordinateRotation")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, coordinateRotation, dictionary,(const dictionary &dict),(dict))
 
virtual ~coordinateRotation ()=default
 Destructor. More...
 

Static Public Member Functions

static tensor rotation (const vector &angles, bool degrees=false)
 
static tensor rotation (const eulerOrder order, const vector &angles, bool degrees=false)
 The rotation tensor calculated for given angles and order. More...
 
- Static Public Member Functions inherited from coordinateRotation
static autoPtr< coordinateRotationNew (const dictionary &dict)
 Select constructed from dictionary. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from coordinateRotation
static vector findOrthogonal (const vector &axis)
 Determine best-guess for an orthogonal axis. More...
 

Detailed Description

A coordinateRotation defined in the z-x-z (intrinsic) Euler convention.

The 3 rotations are defined in the Euler intrinsic convention (around Z, around X' and around Z''). The order of the parameter arguments matches this rotation order.

For reference and illustration, see https://en.wikipedia.org/wiki/Euler_angles

rotation
{
    type    euler;
    angles  (0 0 180);
}


Dictionary entries

Property Description Required Default
type Type name: euler (or EulerRotation) yes
angles The z-x-z rotation angles yes
degrees Angles are in degrees no true
Source files

Definition at line 97 of file EulerCoordinateRotation.H.

Member Typedef Documentation

◆ eulerOrder

Euler-angle rotation order.

Definition at line 106 of file EulerCoordinateRotation.H.

Constructor & Destructor Documentation

◆ euler() [1/5]

euler ( )

Default construct - an identity transform.

Definition at line 250 of file EulerCoordinateRotation.C.

◆ euler() [2/5]

euler ( const euler crot)

Copy construct.

Definition at line 259 of file EulerCoordinateRotation.C.

◆ euler() [3/5]

euler ( const vector angles,
bool  degrees 
)

Construct from Euler intrinsic rotation angles (z-x-z)

Definition at line 269 of file EulerCoordinateRotation.C.

◆ euler() [4/5]

euler ( scalar  angle1,
scalar  angle2,
scalar  angle3,
bool  degrees 
)

Construct from Euler intrinsic rotation angles (z-x-z)

Definition at line 282 of file EulerCoordinateRotation.C.

◆ euler() [5/5]

euler ( const dictionary dict)
explicit

Construct from dictionary.

Definition at line 296 of file EulerCoordinateRotation.C.

◆ ~euler()

virtual ~euler ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeNameNoDebug()

TypeNameNoDebug ( "euler"  )

Runtime type information.

◆ clone()

autoPtr<coordinateRotation> clone ( ) const
inlinevirtual

Return clone.

Implements coordinateRotation.

Definition at line 147 of file EulerCoordinateRotation.H.

◆ rotation() [1/2]

Foam::tensor rotation ( const vector angles,
bool  degrees = false 
)
static

The rotation tensor calculated for the intrinsic Euler angles in z-x-z order

Definition at line 239 of file EulerCoordinateRotation.C.

Referenced by euler::R().

Here is the caller graph for this function:

◆ rotation() [2/2]

Foam::tensor rotation ( const eulerOrder  order,
const vector angles,
bool  degrees = false 
)
static

The rotation tensor calculated for given angles and order.

Definition at line 65 of file EulerCoordinateRotation.C.

References Foam::abort(), Foam::constant::physicoChemical::c1, Foam::constant::physicoChemical::c2, VectorSpace< Form, Cmpt, Ncmpts >::component(), Foam::cos(), Foam::degToRad(), Foam::FatalError, FatalErrorInFunction, Foam::I, Foam::sin(), and Y.

Here is the call graph for this function:

◆ clear()

void clear ( )
virtual

Reset specification.

Implements coordinateRotation.

Definition at line 315 of file EulerCoordinateRotation.C.

References Foam::Zero.

◆ R()

Foam::tensor R ( ) const
virtual

The rotation tensor calculated for the specified Euler angles.

Implements coordinateRotation.

Definition at line 322 of file EulerCoordinateRotation.C.

References euler::rotation().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write information.

Implements coordinateRotation.

Definition at line 328 of file EulerCoordinateRotation.C.

References os().

Here is the call graph for this function:

◆ writeEntry()

void writeEntry ( const word keyword,
Ostream os 
) const
virtual

Write dictionary entry.

Implements coordinateRotation.

Definition at line 335 of file EulerCoordinateRotation.C.

References quaternion::eulerOrderNames, os(), and Foam::type().

Here is the call graph for this function:

The documentation for this class was generated from the following files: