coordinateSystem Class Reference

Base class for other coordinate system specifications. More...

Inheritance diagram for coordinateSystem:

Public Member Functions

 TypeName ("coordinateSystem")
 Runtime type information. More...
 
 coordinateSystem (const word &name, const point &origin)
 Construct from origin. More...
 
 coordinateSystem (const word &name, const point &origin, const coordinateRotation &)
 Construct from origin and rotation. More...
 
 coordinateSystem (const word &name, const point &origin, const vector &axis, const vector &dirn)
 Construct from origin and 2 axes. More...
 
 coordinateSystem (const word &name, const dictionary &)
 Construct from dictionary with a given name. More...
 
 coordinateSystem (const coordinateSystem &cs)
 Copy constructor. More...
 
virtual autoPtr< coordinateSystemclone () const
 Construct and return a clone. More...
 
 declareRunTimeSelectionTable (autoPtr, coordinateSystem, dictionary,(const word &name, const dictionary &dict),(name, dict))
 
virtual ~coordinateSystem ()
 Destructor. More...
 
const wordname () const
 Return name. More...
 
const wordkeyword () const
 Return keyword. More...
 
const pointorigin () const
 Return origin. More...
 
const coordinateRotationR () const
 Return const reference to co-ordinate rotation. More...
 
const coordinateRotationR (const UList< vector > &points) const
 Update and return the co-ordinate rotation for a list of points. More...
 
virtual void write (Ostream &) const
 Write. More...
 
void writeDict (Ostream &, bool subDict=true) const
 Write dictionary. More...
 
point globalPosition (const point &local) const
 Convert from position in local coordinate system to global. More...
 
tmp< pointFieldglobalPosition (const pointField &local) const
 Convert from position in local coordinate system to global. More...
 
vector globalVector (const vector &local) const
 Convert from vector components in local coordinate system to. More...
 
tmp< vectorFieldglobalVector (const vectorField &local) const
 Convert from vector components in local coordinate system to. More...
 
point localPosition (const point &global) const
 Convert from global Cartesian position to position in local. More...
 
tmp< pointFieldlocalPosition (const pointField &global) const
 Convert from global Cartesian position to position in local. More...
 
vector localVector (const vector &global) const
 Convert from global Cartesian vector to components in local. More...
 
tmp< vectorFieldlocalVector (const vectorField &global) const
 Convert from global Cartesian vector to components in local. More...
 
void operator= (const coordinateSystem &)
 Assignment operator. More...
 

Static Public Member Functions

static autoPtr< coordinateSystemNew (const objectRegistry &obr, const dictionary &dict)
 Select constructed from dictionary and objectRegistry. More...
 
static autoPtr< coordinateSystemNew (const word &name, const dictionary &dict)
 Select constructed from name and dictionary. More...
 

Protected Member Functions

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

Friends

Ostreamoperator<< (Ostream &, const coordinateSystem &)
 

Detailed Description

Base class for other coordinate system specifications.

All systems are defined by an origin point and a co-ordinate rotation.

coordinateSystem
{
    type    cartesian;
    origin  (0 0 0);
    coordinateRotation
    {
        type        cylindrical;
        e3          (0 0 1);
    }
}

Types of coordinateRotation:

  1. axesRotation
  2. STARCDRotation
  3. cylindricalCS cylindrical
  4. EulerCoordinateRotation

Type of co-ordinates:

  1. cartesian
Source files

Definition at line 84 of file coordinateSystem.H.

Constructor & Destructor Documentation

◆ coordinateSystem() [1/5]

coordinateSystem ( const word name,
const point origin 
)

Construct from origin.

Definition at line 42 of file coordinateSystem.C.

Referenced by coordinateSystem::clone(), and coordinateSystem::coordinateSystem().

Here is the caller graph for this function:

◆ coordinateSystem() [2/5]

coordinateSystem ( const word name,
const point origin,
const coordinateRotation cr 
)

Construct from origin and rotation.

Definition at line 54 of file coordinateSystem.C.

References coordinateSystem::coordinateSystem().

Here is the call graph for this function:

◆ coordinateSystem() [3/5]

coordinateSystem ( const word name,
const point origin,
const vector axis,
const vector dirn 
)

Construct from origin and 2 axes.

Definition at line 67 of file coordinateSystem.C.

References coordinateSystem::coordinateSystem().

Here is the call graph for this function:

◆ coordinateSystem() [4/5]

coordinateSystem ( const word name,
const dictionary dict 
)

Construct from dictionary with a given name.

Definition at line 81 of file coordinateSystem.C.

◆ coordinateSystem() [5/5]

Copy constructor.

Definition at line 92 of file coordinateSystem.C.

◆ ~coordinateSystem()

~coordinateSystem ( )
virtual

Destructor.

Definition at line 102 of file coordinateSystem.C.

References coordinateSystem::localToGlobal().

Referenced by coordinateSystem::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ localToGlobal() [1/2]

Foam::vector localToGlobal ( const vector local,
bool  translate 
) const
protectedvirtual

Convert from local coordinate system to the global Cartesian system.

with optional translation for the origin

Definition at line 109 of file coordinateSystem.C.

Referenced by coordinateSystem::R(), and coordinateSystem::~coordinateSystem().

Here is the caller graph for this function:

◆ localToGlobal() [2/2]

Foam::tmp< Foam::vectorField > localToGlobal ( const vectorField local,
bool  translate 
) const
protectedvirtual

Convert from local coordinate system to the global Cartesian system.

with optional translation for the origin

Definition at line 126 of file coordinateSystem.C.

References coordinateSystem::globalToLocal().

Here is the call graph for this function:

◆ globalToLocal() [1/2]

Foam::vector globalToLocal ( const vector global,
bool  translate 
) const
protectedvirtual

Convert from global Cartesian system to the local coordinate system.

with optional translation for the origin

Definition at line 143 of file coordinateSystem.C.

Referenced by coordinateSystem::localToGlobal(), and coordinateSystem::R().

Here is the caller graph for this function:

◆ globalToLocal() [2/2]

Foam::tmp< Foam::vectorField > globalToLocal ( const vectorField global,
bool  translate 
) const
protectedvirtual

Convert from global Cartesian system to the local coordinate system.

with optional translation for the origin

Definition at line 160 of file coordinateSystem.C.

◆ TypeName()

TypeName ( "coordinateSystem"  )

Runtime type information.

◆ clone()

virtual autoPtr<coordinateSystem> clone ( ) const
inlinevirtual

Construct and return a clone.

Reimplemented in cylindrical, and cartesian.

Definition at line 166 of file coordinateSystem.H.

References coordinateSystem::coordinateSystem(), coordinateSystem::declareRunTimeSelectionTable(), dict, coordinateSystem::New(), and coordinateSystem::~coordinateSystem().

Here is the call graph for this function:

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
coordinateSystem  ,
dictionary  ,
(const word &name, const dictionary &dict ,
(name, dict  
)

Referenced by coordinateSystem::clone().

Here is the caller graph for this function:

◆ New() [1/2]

◆ New() [2/2]

Foam::autoPtr< Foam::coordinateSystem > New ( const word name,
const dictionary dict 
)
static

Select constructed from name and dictionary.

Definition at line 92 of file coordinateSystemNew.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::lookup(), Foam::name(), and Foam::nl.

Here is the call graph for this function:

◆ name()

const word& name ( ) const
inline

Return name.

Definition at line 212 of file coordinateSystem.H.

◆ keyword()

const word& keyword ( ) const
inline

Return keyword.

Definition at line 218 of file coordinateSystem.H.

◆ origin()

const point& origin ( ) const
inline

Return origin.

Definition at line 224 of file coordinateSystem.H.

Referenced by coordinateSystem::write().

Here is the caller graph for this function:

◆ R() [1/2]

const coordinateRotation& R ( ) const
inline

Return const reference to co-ordinate rotation.

Definition at line 230 of file coordinateSystem.H.

Referenced by heSolidThermo< BasicSolidThermo, MixtureType >::Kappa(), and heSolidThermo< BasicSolidThermo, MixtureType >::KappaLocal().

Here is the caller graph for this function:

◆ R() [2/2]

◆ write()

void write ( Ostream os) const
virtual

Write.

Definition at line 176 of file coordinateSystem.C.

References Foam::nl, coordinateSystem::origin(), and Foam::type().

Referenced by coordinateSystem::R().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeDict()

void writeDict ( Ostream os,
bool  subDict = true 
) const

Write dictionary.

Definition at line 183 of file coordinateSystem.C.

References token::BEGIN_BLOCK, Foam::decrIndent(), token::END_BLOCK, Foam::endl(), Foam::incrIndent(), Foam::indent(), Foam::nl, Foam::type(), and Foam::writeEntry().

Referenced by Foam::operator<<(), coordinateSystem::R(), and engineValve::writeDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ globalPosition() [1/2]

point globalPosition ( const point local) const
inline

Convert from position in local coordinate system to global.

Cartesian position

Definition at line 256 of file coordinateSystem.H.

Referenced by coordinateSystem::R().

Here is the caller graph for this function:

◆ globalPosition() [2/2]

tmp<pointField> globalPosition ( const pointField local) const
inline

Convert from position in local coordinate system to global.

Cartesian position

Definition at line 263 of file coordinateSystem.H.

◆ globalVector() [1/2]

vector globalVector ( const vector local) const
inline

Convert from vector components in local coordinate system to.

global Cartesian vector

Definition at line 270 of file coordinateSystem.H.

Referenced by coordinateSystem::R().

Here is the caller graph for this function:

◆ globalVector() [2/2]

tmp<vectorField> globalVector ( const vectorField local) const
inline

Convert from vector components in local coordinate system to.

global Cartesian vector

Definition at line 277 of file coordinateSystem.H.

◆ localPosition() [1/2]

point localPosition ( const point global) const
inline

Convert from global Cartesian position to position in local.

coordinate system

Definition at line 284 of file coordinateSystem.H.

Referenced by coordinateSystem::R().

Here is the caller graph for this function:

◆ localPosition() [2/2]

tmp<pointField> localPosition ( const pointField global) const
inline

Convert from global Cartesian position to position in local.

coordinate system

Definition at line 291 of file coordinateSystem.H.

◆ localVector() [1/2]

vector localVector ( const vector global) const
inline

Convert from global Cartesian vector to components in local.

coordinate system

Definition at line 298 of file coordinateSystem.H.

Referenced by coordinateSystem::R().

Here is the caller graph for this function:

◆ localVector() [2/2]

tmp<vectorField> localVector ( const vectorField global) const
inline

Convert from global Cartesian vector to components in local.

coordinate system

Definition at line 305 of file coordinateSystem.H.

◆ operator=()

void operator= ( const coordinateSystem cs)

Assignment operator.

Definition at line 209 of file coordinateSystem.C.

Referenced by coordinateSystem::R().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream ,
const coordinateSystem  
)
friend

Referenced by coordinateSystem::R().


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