FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

sphericalCS Class Reference

Spherical coordinate system. More...

#include <meshTools/sphericalCS.H>


Detailed Description

Spherical coordinate system.

Source files

Definition at line 49 of file sphericalCS.H.

Inheritance diagram for sphericalCS:
Collaboration diagram for sphericalCS:

List of all members.

Public Member Functions

 TypeName ("spherical")
 Runtime type information.
 sphericalCS (const bool inDegrees=true)
 Construct null.
 sphericalCS (const coordinateSystem &, const bool inDegrees=true)
 Construct copy.
 sphericalCS (const word &name, const coordinateSystem &, const bool inDegrees=true)
 Construct copy with a different name.
 sphericalCS (const word &name, const point &origin, const coordinateRotation &, const bool inDegrees=true)
 Construct from origin and rotation.
 sphericalCS (const word &name, const point &origin, const vector &axis, const vector &dirn, const bool inDegrees=true)
 Construct from origin and 2 axes.
 sphericalCS (const word &name, const dictionary &)
 Construct from dictionary.
bool  inDegrees () const
 Are angles in degrees?
bool &  inDegrees ()
 Non-const access to inDegrees.

Protected Member Functions

virtual vector  localToGlobal (const vector &, bool translate) const
 Convert from local coordinate system to the global Cartesian system.
virtual tmp< vectorField >  localToGlobal (const vectorField &, bool translate) const
 Convert from local coordinate system to the global Cartesian system.
virtual vector  globalToLocal (const vector &, bool translate) const
 Convert from global Cartesian system to the local coordinate system.
virtual tmp< vectorField >  globalToLocal (const vectorField &, bool translate) const
 Convert from global Cartesian system to the local coordinate system.

Constructor & Destructor Documentation

sphericalCS ( const bool   inDegrees = true  )

Construct null.

Definition at line 45 of file sphericalCS.C.

sphericalCS ( const coordinateSystem &   cs,
const bool   inDegrees = true  
)

Construct copy.

Definition at line 53 of file sphericalCS.C.

sphericalCS ( const word &   name,
const coordinateSystem &   cs,
const bool   inDegrees = true  
)

Construct copy with a different name.

Definition at line 64 of file sphericalCS.C.

sphericalCS ( const word &   name,
const point &   origin,
const coordinateRotation &   cr,
const bool   inDegrees = true  
)

Construct from origin and rotation.

Definition at line 76 of file sphericalCS.C.

sphericalCS ( const word &   name,
const point &   origin,
const vector &   axis,
const vector &   dirn,
const bool   inDegrees = true  
)

Construct from origin and 2 axes.

Definition at line 89 of file sphericalCS.C.

sphericalCS ( const word &   name,
const dictionary &   dict  
)

Construct from dictionary.

Definition at line 103 of file sphericalCS.C.


Member Function Documentation

Foam::vector localToGlobal ( const vector &   local,
bool   translate  
) const [protected, virtual]

Convert from local coordinate system to the global Cartesian system.

with optional translation for the origin

Reimplemented from coordinateSystem.

Definition at line 128 of file sphericalCS.C.

References Foam::cos(), coordinateSystem::localToGlobal(), phi, Foam::mathematicalConstant::pi(), Foam::sin(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Foam::tmp< Foam::vectorField > localToGlobal ( const vectorField &   local,
bool   translate  
) const [protected, virtual]

Convert from local coordinate system to the global Cartesian system.

with optional translation for the origin

Reimplemented from coordinateSystem.

Definition at line 154 of file sphericalCS.C.

References Field< Type >::component(), Foam::cos(), coordinateSystem::localToGlobal(), phi, Foam::mathematicalConstant::pi(), Field< Type >::replace(), Foam::sin(), List< T >::size(), Vector< Cmpt >::X, Vector< Cmpt >::Y, and Vector< Cmpt >::Z.

Foam::vector globalToLocal ( const vector &   global,
bool   translate  
) const [protected, virtual]

Convert from global Cartesian system to the local coordinate system.

with optional translation for the origin

Reimplemented from coordinateSystem.

Definition at line 181 of file sphericalCS.C.

References Foam::acos(), Foam::atan2(), coordinateSystem::globalToLocal(), Foam::mag(), Foam::mathematicalConstant::pi(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Foam::tmp< Foam::vectorField > globalToLocal ( const vectorField &   global,
bool   translate  
) const [protected, virtual]

Convert from global Cartesian system to the local coordinate system.

with optional translation for the origin

Reimplemented from coordinateSystem.

Definition at line 205 of file sphericalCS.C.

References Foam::acos(), Foam::atan2(), Field< Type >::component(), coordinateSystem::globalToLocal(), Foam::mag(), Foam::mathematicalConstant::pi(), Field< Type >::replace(), List< T >::size(), Vector< Cmpt >::X, Vector< Cmpt >::Y, and Vector< Cmpt >::Z.

TypeName ( "spherical"    )

Runtime type information.

bool inDegrees (  ) const

Are angles in degrees?

Definition at line 115 of file sphericalCS.C.

bool & inDegrees (  )

Non-const access to inDegrees.

Definition at line 121 of file sphericalCS.C.


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