Spherical coordinate system. More...
#include <meshTools/sphericalCS.H>
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. | |
![]() | |
TypeName ("coordinateSystem") | |
Runtime type information. | |
coordinateSystem () | |
Construct null. This is equivalent to an identity coordinateSystem. | |
coordinateSystem (const word &name, const coordinateSystem &) | |
Construct copy with a different name. | |
coordinateSystem (const word &name, const point &origin, const coordinateRotation &) | |
Construct from origin and rotation. | |
coordinateSystem (const word &name, const point &origin, const vector &axis, const vector &dirn) | |
Construct from origin and 2 axes. | |
coordinateSystem (const word &name, const dictionary &) | |
Construct from dictionary with a given name. | |
coordinateSystem (const dictionary &) | |
Construct from dictionary with default name. | |
coordinateSystem (const dictionary &, const objectRegistry &) | |
Construct from dictionary (default name) | |
coordinateSystem (Istream &) | |
Construct from Istream. | |
autoPtr< coordinateSystem > | clone () const |
Return clone. | |
declareRunTimeSelectionTable (autoPtr, coordinateSystem, dictionary,(const word &name, const dictionary &dict),(name, dict)) | |
declareRunTimeSelectionTable (autoPtr, coordinateSystem, origRotation,(const word &name, const point &origin, const coordinateRotation &cr),(name, origin, cr)) | |
virtual | ~coordinateSystem () |
const word & | name () const |
Return name. | |
string & | note () |
Return non-constant access to the optional note. | |
const string & | note () const |
Return the optional note. | |
const point & | origin () const |
Return origin. | |
const coordinateRotation & | rotation () const |
Return coordinate rotation. | |
const tensor & | R () 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. | |
const vector | axis () const |
Return axis (e3: local Cartesian z-axis) | |
const vector | direction () const |
Return direction (e1: local Cartesian x-axis) | |
virtual dictionary | dict (bool ignoreType=false) const |
Return as dictionary of entries. | |
virtual void | rename (const word &newName) |
Rename. | |
point & | origin () |
Edit access to origin. | |
virtual void | write (Ostream &) const |
Write. | |
virtual void | writeDict (Ostream &, bool subDict=true) const |
Write dictionary. | |
point | globalPosition (const point &local) const |
Convert from position in local coordinate system to global Cartesian position. | |
tmp< pointField > | globalPosition (const pointField &local) const |
Convert from position in local coordinate system to global Cartesian position. | |
vector | globalVector (const vector &local) const |
Convert from vector components in local coordinate system to global Cartesian vector. | |
tmp< vectorField > | globalVector (const vectorField &local) const |
Convert from vector components in local coordinate system to global Cartesian vector. | |
point | localPosition (const point &global) const |
Convert from global Cartesian position to position in local coordinate system. | |
tmp< pointField > | localPosition (const pointField &global) const |
Convert from global Cartesian position to position in local coordinate system. | |
vector | localVector (const vector &global) const |
Convert from global Cartesian vector to components in local coordinate system. | |
tmp< vectorField > | localVector (const vectorField &global) const |
Convert from global Cartesian vector to components in local coordinate system. | |
void | operator= (const dictionary &) |
assign from dictionary |
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. |
Additional Inherited Members | |
![]() | |
static autoPtr< coordinateSystem > | New (const word &name, const dictionary &) |
Select constructed from dictionary. | |
static autoPtr< coordinateSystem > | New (const word &coordType, const word &name, const point &origin, const coordinateRotation &) |
Select constructed from origin and rotation. | |
static autoPtr< coordinateSystem > | New (Istream &is) |
Select constructed from Istream. |
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.
|
protectedvirtual |
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().
|
protectedvirtual |
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< scalar >::X, Vector< scalar >::Y, and Vector< scalar >::Z.
|
protectedvirtual |
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().
|
protectedvirtual |
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< scalar >::X, Vector< scalar >::Y, and Vector< scalar >::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.