FreeFOAM The Cross-Platform CFD Toolkit
coordinateRotation Class Reference

A coordinate rotation specified per local axes and the base class for other rotation specifications. More...

#include <meshTools/coordinateRotation.H>


Detailed Description

A coordinate rotation specified per local axes and the base class for other rotation specifications.

The rotation is defined by a combination of local vectors (e1/e2), (e2/e3) or (e3/e1). Any nonorthogonality will be absorbed into the second vector.

For convenience, the dictionary constructor forms allow a few shortcuts:

  • if the type is not otherwise specified, the type axes is implicit
  • if an axes specification (eg, e3/e1) is used, the coordinateRotation sub-dictionary can be dropped.

Specifying the rotation by an EulerCoordinateRotation (type "EulerRotation") or by a STARCDCoordinateRotation (type "STARCDRotation") requires the coordinateRotation sub-dictionary.

coordinateRotation
{
typeSTARCDRotation
rotation(0 0 90);
}
  • the rotation angles are in degrees, unless otherwise explictly specified:

    coordinateRotation
    {
    typeSTARCDRotation
    degrees false;
    rotation(0 0 3.141592654);
    }
    
Deprecated:
Specifying the local vectors as an axis (corresponding to e3) and a direction (corresponding to e1), is allowed for backwards compatibility, but this terminology is generally a bit confusing.

Definition at line 87 of file coordinateRotation.H.

+ Inheritance diagram for coordinateRotation:
+ Collaboration diagram for coordinateRotation:

List of all members.

Public Member Functions

 TypeName ("coordinateRotation")
 Runtime type information.
 coordinateRotation ()
 Construct null.
 coordinateRotation (const vector &axis, const vector &dir)
 Construct from 2 axes.
 coordinateRotation (const dictionary &)
 Construct from dictionary.
autoPtr< coordinateRotationclone () const
 Return clone.
 declareRunTimeSelectionTable (autoPtr, coordinateRotation, dictionary,(const dictionary &dict),(dict))
virtual ~coordinateRotation ()
const tensorR () const
 Return local-to-global transformation tensor.
const vector e1 () const
 Return local Cartesian x-axis.
const vector e2 () const
 Return local Cartesian y-axis.
const vector e3 () const
 Return local Cartesian z-axis.
void operator= (const dictionary &)
 assign from dictionary
- Public Member Functions inherited from Tensor< Cmpt >
 Tensor ()
 Construct null.
 Tensor (const VectorSpace< Tensor< Cmpt >, Cmpt, 9 > &)
 Construct given VectorSpace.
 Tensor (const SphericalTensor< Cmpt > &)
 Construct given SphericalTensor.
 Tensor (const SymmTensor< Cmpt > &)
 Construct given SymmTensor.
 Tensor (const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
 Construct given the three vectors.
 Tensor (const Cmpt txx, const Cmpt txy, const Cmpt txz, const Cmpt tyx, const Cmpt tyy, const Cmpt tyz, const Cmpt tzx, const Cmpt tzy, const Cmpt tzz)
 Construct given the nine components.
 Tensor (Istream &)
 Construct from Istream.
const Cmpt & xx () const
const Cmpt & xy () const
const Cmpt & xz () const
const Cmpt & yx () const
const Cmpt & yy () const
const Cmpt & yz () const
const Cmpt & zx () const
const Cmpt & zy () const
const Cmpt & zz () const
Cmpt & xx ()
Cmpt & xy ()
Cmpt & xz ()
Cmpt & yx ()
Cmpt & yy ()
Cmpt & yz ()
Cmpt & zx ()
Cmpt & zy ()
Cmpt & zz ()
const Vector< Cmpt > x () const
const Vector< Cmpt > y () const
const Vector< Cmpt > z () const
Tensor< Cmpt > T () const
 Transpose.
void operator= (const SphericalTensor< Cmpt > &)
 Assign to a SphericalTensor.
void operator= (const SymmTensor< Cmpt > &)
 Assign to a SymmTensor.
- Public Member Functions inherited from VectorSpace< Tensor< Cmpt >, Cmpt, 9 >
 VectorSpace ()
 Construct null.
 VectorSpace (Istream &)
 Construct from Istream.
 VectorSpace (const VectorSpace< Tensor< Cmpt >, Cmpt, nCmpt > &)
 Construct as copy.
label size () const
 Return the number of elements in the VectorSpace = nCmpt.
const Cmpt & component (const direction) const
Cmpt & component (const direction)
void component (Cmpt &, const direction) const
void replace (const direction, const Cmpt &)
const Cmpt & operator[] (const direction) const
Cmpt & operator[] (const direction)
void operator= (const VectorSpace< Tensor< Cmpt >, Cmpt, nCmpt > &)
void operator+= (const VectorSpace< Tensor< Cmpt >, Cmpt, nCmpt > &)
void operator-= (const VectorSpace< Tensor< Cmpt >, Cmpt, nCmpt > &)
void operator*= (const scalar)
void operator/= (const scalar)

Static Public Member Functions

static autoPtr
< coordinateRotation
New (const dictionary &dict)
 Select constructed from Istream.

Additional Inherited Members

- Public Types inherited from Tensor< Cmpt >
enum  { rank = 2 }
enum  components {
  XX, XY, XZ, YX,
  YY, YZ, ZX, ZY,
  ZZ
}
 Component labeling enumeration. More...
typedef Tensor< label > labelType
 Equivalent type of labels used for valid component indexing.
- Public Types inherited from VectorSpace< Tensor< Cmpt >, Cmpt, 9 >
enum  
typedef Cmpt cmptType
 Component type.
- Static Public Attributes inherited from Tensor< Cmpt >
static const char *const typeName = "labelTensor"
static const char * componentNames []
static const Tensor zero
static const Tensor one
static const Tensor max
static const Tensor min

Constructor & Destructor Documentation

Construct null.

Definition at line 96 of file coordinateRotation.C.

Referenced by coordinateRotation::clone().

coordinateRotation ( const vector axis,
const vector dir 
)

Construct from 2 axes.

Definition at line 103 of file coordinateRotation.C.

coordinateRotation ( const dictionary dict)

Construct from dictionary.

Definition at line 115 of file coordinateRotation.C.

virtual ~coordinateRotation ( )
inlinevirtual

Definition at line 162 of file coordinateRotation.H.


Member Function Documentation

TypeName ( "coordinateRotation"  )

Runtime type information.

autoPtr<coordinateRotation> clone ( ) const
inline

Return clone.

Definition at line 132 of file coordinateRotation.H.

References coordinateRotation::coordinateRotation().

declareRunTimeSelectionTable ( autoPtr  ,
coordinateRotation  ,
dictionary  ,
(const dictionary &dict)  ,
(dict)   
)
const tensor& R ( ) const
inline

Return local-to-global transformation tensor.

Definition at line 169 of file coordinateRotation.H.

const vector e1 ( ) const
inline

Return local Cartesian x-axis.

Definition at line 175 of file coordinateRotation.H.

References Tensor< Cmpt >::T().

const vector e2 ( ) const
inline

Return local Cartesian y-axis.

Definition at line 181 of file coordinateRotation.H.

References Tensor< Cmpt >::T().

const vector e3 ( ) const
inline

Return local Cartesian z-axis.

Definition at line 187 of file coordinateRotation.H.

References Tensor< Cmpt >::T().


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