Public Member Functions | Private Types | Private Member Functions | Private Attributes
axesRotation Class Reference

A coordinate rotation specified using global axis. More...

Inheritance diagram for axesRotation:
Inheritance graph
[legend]
Collaboration diagram for axesRotation:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("axesRotation")
 Runtime type information. More...
 
 axesRotation ()
 Construct null. More...
 
 axesRotation (const vector &axis, const vector &dir)
 Construct from 2 axes. More...
 
 axesRotation (const dictionary &)
 Construct from dictionary. More...
 
 axesRotation (const tensor &R)
 Construct from components. More...
 
 axesRotation (const dictionary &, const objectRegistry &)
 Construct from dictionary and mesh. More...
 
 axesRotation (const axesRotation &)
 Construct as copy. More...
 
autoPtr< coordinateRotationclone () const
 Return clone. More...
 
virtual ~axesRotation ()
 Destructor. More...
 
virtual void clear ()
 Reset rotation to an identity rotation. More...
 
virtual void updateCells (const polyMesh &, const labelList &)
 Update the rotation for a list of cells. More...
 
virtual const tensorR () const
 Return local-to-global transformation tensor. More...
 
virtual const tensorRtr () const
 Return global-to-local transformation tensor. More...
 
virtual const vector e1 () const
 Return local Cartesian x-axis. More...
 
virtual const vector e2 () const
 Return local Cartesian y-axis. More...
 
virtual const vector e3 () const
 Return local Cartesian z-axis. More...
 
virtual const tensorFieldTr () const
 Return transformation tensor field. More...
 
virtual tmp< vectorFieldtransform (const vectorField &st) const
 Transform vectorField using transformation tensor field. More...
 
virtual vector transform (const vector &st) const
 Transform vector using transformation tensor. More...
 
virtual tmp< vectorFieldinvTransform (const vectorField &st) const
 Inverse transform vectorField using transformation tensor field. More...
 
virtual vector invTransform (const vector &st) const
 Inverse transform vector using transformation tensor. More...
 
virtual tmp< tensorFieldtransformTensor (const tensorField &st) const
 Transform tensor field using transformation tensorField. More...
 
virtual tensor transformTensor (const tensor &st) const
 Transform tensor using transformation tensorField. More...
 
virtual tmp< tensorFieldtransformTensor (const tensorField &st, const labelList &cellMap) const
 Transform tensor sub-field using transformation tensorField. More...
 
virtual tmp< symmTensorFieldtransformVector (const vectorField &st) const
 Transform vectorField using transformation tensorField and return. More...
 
virtual symmTensor transformVector (const vector &st) const
 Transform vector using transformation tensor and return. More...
 
void operator= (const dictionary &)
 Assign from dictionary. More...
 
virtual void write (Ostream &) const
 Write. More...
 
- Public Member Functions inherited from coordinateRotation
 TypeName ("coordinateRotation")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, coordinateRotation, objectRegistry,(const dictionary &dict, const objectRegistry &obr),(dict, obr))
 
 declareRunTimeSelectionTable (autoPtr, coordinateRotation, dictionary,(const dictionary &dict),(dict))
 
virtual ~coordinateRotation ()
 Destructor. More...
 
virtual bool uniform () const
 Return true if the rotation tensor is uniform. More...
 

Private Types

enum  axisOrder { e1e2, e2e3, e3e1 }
 The combination of local axes to be used. More...
 

Private Member Functions

void calcTransform (const vector &axis1, const vector &axis2, const axisOrder &order=e3e1)
 Calculate transformation tensor. More...
 

Private Attributes

tensor R_
 Local-to-Global transformation tensor. More...
 
tensor Rtr_
 Global-to-Local transformation tensor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from coordinateRotation
static autoPtr< coordinateRotationNew (const dictionary &dict, const objectRegistry &obr)
 Select constructed from dictionary and objectRegistry. More...
 
static autoPtr< coordinateRotationNew (const dictionary &dict)
 Select constructed from dictionary. More...
 
- Protected Member Functions inherited from coordinateRotation
symmTensor transformPrincipal (const tensor &, const vector &) const
 Transform principal. More...
 

Detailed Description

A coordinate rotation specified using global axis.

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

    axesRotation
    {
        type        axesRotation;
        e1          (1 0 0);
        e2          (0 1 0);
    }

Definition at line 60 of file axesRotation.H.

Member Enumeration Documentation

◆ axisOrder

enum axisOrder
private

The combination of local axes to be used.

Enumerator
e1e2 
e2e3 
e3e1 

Definition at line 73 of file axesRotation.H.

Constructor & Destructor Documentation

◆ axesRotation() [1/6]

Construct null.

Definition at line 108 of file axesRotation.C.

Referenced by axesRotation::clone().

Here is the caller graph for this function:

◆ axesRotation() [2/6]

axesRotation ( const vector axis,
const vector dir 
)

Construct from 2 axes.

Definition at line 116 of file axesRotation.C.

◆ axesRotation() [3/6]

axesRotation ( const dictionary dict)

Construct from dictionary.

Definition at line 129 of file axesRotation.C.

References dict.

◆ axesRotation() [4/6]

axesRotation ( const tensor R)

Construct from components.

Definition at line 153 of file axesRotation.C.

◆ axesRotation() [5/6]

axesRotation ( const dictionary dict,
const objectRegistry obr 
)

Construct from dictionary and mesh.

Definition at line 141 of file axesRotation.C.

References dict.

◆ axesRotation() [6/6]

axesRotation ( const axesRotation r)

Construct as copy.

Definition at line 160 of file axesRotation.C.

◆ ~axesRotation()

virtual ~axesRotation ( )
inlinevirtual

Destructor.

Definition at line 124 of file axesRotation.H.

Member Function Documentation

◆ calcTransform()

void calcTransform ( const vector axis1,
const vector axis2,
const axisOrder order = e3e1 
)
private

Calculate transformation tensor.

Definition at line 47 of file axesRotation.C.

References Foam::abort(), Foam::constant::physicoChemical::b, Foam::constant::universal::c, Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), and Tensor::T().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "axesRotation"  )

Runtime type information.

◆ clone()

autoPtr<coordinateRotation> clone ( ) const
inlinevirtual

Return clone.

Implements coordinateRotation.

Definition at line 117 of file axesRotation.H.

References axesRotation::axesRotation().

Here is the call graph for this function:

◆ clear()

virtual void clear ( )
inlinevirtual

Reset rotation to an identity rotation.

Implements coordinateRotation.

Definition at line 131 of file axesRotation.H.

References SphericalTensor< Cmpt >::I, axesRotation::R_, and axesRotation::Rtr_.

◆ updateCells()

virtual void updateCells ( const polyMesh ,
const labelList  
)
inlinevirtual

Update the rotation for a list of cells.

Implements coordinateRotation.

Definition at line 138 of file axesRotation.H.

◆ R()

virtual const tensor& R ( ) const
inlinevirtual

Return local-to-global transformation tensor.

Implements coordinateRotation.

Definition at line 144 of file axesRotation.H.

References axesRotation::R_.

Referenced by cylindrical::init(), and cylindrical::updateCells().

Here is the caller graph for this function:

◆ Rtr()

virtual const tensor& Rtr ( ) const
inlinevirtual

Return global-to-local transformation tensor.

Implements coordinateRotation.

Definition at line 150 of file axesRotation.H.

References axesRotation::Rtr_.

◆ e1()

virtual const vector e1 ( ) const
inlinevirtual

Return local Cartesian x-axis.

Implements coordinateRotation.

Definition at line 156 of file axesRotation.H.

References axesRotation::R_, and Tensor::x().

Here is the call graph for this function:

◆ e2()

virtual const vector e2 ( ) const
inlinevirtual

Return local Cartesian y-axis.

Implements coordinateRotation.

Definition at line 162 of file axesRotation.H.

References axesRotation::R_, and Tensor::y().

Here is the call graph for this function:

◆ e3()

virtual const vector e3 ( ) const
inlinevirtual

Return local Cartesian z-axis.

Implements coordinateRotation.

Definition at line 168 of file axesRotation.H.

References axesRotation::R_, and Tensor::z().

Here is the call graph for this function:

◆ Tr()

const Foam::tensorField & Tr ( ) const
virtual

Return transformation tensor field.

Implements coordinateRotation.

Definition at line 170 of file axesRotation.C.

References NotImplemented.

◆ transform() [1/2]

Foam::tmp< Foam::vectorField > transform ( const vectorField st) const
virtual

Transform vectorField using transformation tensor field.

Implements coordinateRotation.

Definition at line 178 of file axesRotation.C.

◆ transform() [2/2]

Foam::vector transform ( const vector st) const
virtual

Transform vector using transformation tensor.

Implements coordinateRotation.

Definition at line 186 of file axesRotation.C.

◆ invTransform() [1/2]

Foam::tmp< Foam::vectorField > invTransform ( const vectorField st) const
virtual

Inverse transform vectorField using transformation tensor field.

Implements coordinateRotation.

Definition at line 193 of file axesRotation.C.

◆ invTransform() [2/2]

Foam::vector invTransform ( const vector st) const
virtual

Inverse transform vector using transformation tensor.

Implements coordinateRotation.

Definition at line 201 of file axesRotation.C.

◆ transformTensor() [1/3]

Foam::tmp< Foam::tensorField > transformTensor ( const tensorField st) const
virtual

Transform tensor field using transformation tensorField.

Implements coordinateRotation.

Definition at line 208 of file axesRotation.C.

References NotImplemented.

◆ transformTensor() [2/3]

Foam::tensor transformTensor ( const tensor st) const
virtual

Transform tensor using transformation tensorField.

Implements coordinateRotation.

Definition at line 218 of file axesRotation.C.

◆ transformTensor() [3/3]

Foam::tmp< Foam::tensorField > transformTensor ( const tensorField st,
const labelList cellMap 
) const
virtual

Transform tensor sub-field using transformation tensorField.

Implements coordinateRotation.

Definition at line 227 of file axesRotation.C.

References NotImplemented.

◆ transformVector() [1/2]

Foam::tmp< Foam::symmTensorField > transformVector ( const vectorField st) const
virtual

Transform vectorField using transformation tensorField and return.

symmetric tensorField

Implements coordinateRotation.

Definition at line 238 of file axesRotation.C.

References fld(), and forAll.

Here is the call graph for this function:

◆ transformVector() [2/2]

Foam::symmTensor transformVector ( const vector st) const
virtual

Transform vector using transformation tensor and return.

symmetric tensor

Implements coordinateRotation.

Definition at line 254 of file axesRotation.C.

◆ operator=()

void operator= ( const dictionary dict)

Assign from dictionary.

Definition at line 264 of file axesRotation.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, dictionary::found(), dictionary::lookup(), Foam::Pout, and dictionary::readIfPresent().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Write.

Implements coordinateRotation.

Definition at line 307 of file axesRotation.C.

References token::END_STATEMENT, Foam::nl, and Ostream::writeKeyword().

Here is the call graph for this function:

Field Documentation

◆ R_

tensor R_
private

Local-to-Global transformation tensor.

Definition at line 67 of file axesRotation.H.

Referenced by axesRotation::clear(), axesRotation::e1(), axesRotation::e2(), axesRotation::e3(), and axesRotation::R().

◆ Rtr_

tensor Rtr_
private

Global-to-Local transformation tensor.

Definition at line 70 of file axesRotation.H.

Referenced by axesRotation::clear(), and axesRotation::Rtr().


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