Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
coordinateSystem Class Reference

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

Inheritance diagram for coordinateSystem:
Inheritance graph
[legend]

Public Member Functions

 TypeName ("coordinateSystem")
 Runtime type information. More...
 
 coordinateSystem ()
 Construct null. This is equivalent to an identity coordinateSystem. More...
 
 coordinateSystem (const word &name, const coordinateSystem &)
 Construct copy with a different name. 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 dictionary &)
 Construct from dictionary with default name. More...
 
 coordinateSystem (const objectRegistry &, const dictionary &)
 Construct from dictionary (default name) More...
 
 coordinateSystem (Istream &)
 Construct from Istream. More...
 
autoPtr< coordinateSystemclone () const
 Return clone. More...
 
 declareRunTimeSelectionTable (autoPtr, coordinateSystem, dictionary,( const objectRegistry &obr, const dictionary &dict ),(obr, dict))
 
virtual ~coordinateSystem ()
 Destructor. More...
 
const wordname () const
 Return name. More...
 
stringnote ()
 Return non-constant access to the optional note. More...
 
const stringnote () const
 Return the optional note. More...
 
const pointorigin () const
 Return origin. More...
 
const coordinateRotationR () const
 Return const reference to co-ordinate rotation. More...
 
coordinateRotationR ()
 Return non const reference to co-ordinate rotation. More...
 
const coordinateRotationR (const polyMesh &mesh, const labelList &cells)
 Update and return the co-ordinate roation for a list of cells. More...
 
virtual dictionary dict (bool ignoreType=false) const
 Return as dictionary of entries. More...
 
void rename (const word &newName)
 Rename. More...
 
pointorigin ()
 Edit access to origin. More...
 
virtual void clear ()
 Reset origin and rotation to an identity coordinateSystem. 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...
 

Static Public Member Functions

static autoPtr< coordinateSystemNew (const objectRegistry &obr, const dictionary &dict)
 Select constructed from dictionary and objectRegistry. More...
 
static autoPtr< coordinateSystemNew (const dictionary &dict)
 Select constructed from dictionary. More...
 
static autoPtr< coordinateSystemNew (Istream &is)
 Select constructed from Istream. 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...
 
void init (const dictionary &)
 Init from dict and obr. More...
 
void init (const dictionary &, const objectRegistry &)
 Init from dictionary. More...
 

Friends

bool operator!= (const coordinateSystem &, const coordinateSystem &)
 
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) cylindrical 4) EulerCoordinateRotation

Type of co-ordinates: 1) cartesian

See also
coordinateSystem and coordinateSystem::New
Source files

Definition at line 85 of file coordinateSystem.H.

Constructor & Destructor Documentation

Construct null. This is equivalent to an identity coordinateSystem.

Definition at line 42 of file coordinateSystem.C.

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

Here is the caller graph for this function:

coordinateSystem ( const word name,
const coordinateSystem cs 
)

Construct copy with a different name.

Definition at line 52 of file coordinateSystem.C.

References coordinateSystem::coordinateSystem().

Here is the call graph for this function:

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

Construct from origin and rotation.

Definition at line 65 of file coordinateSystem.C.

References coordinateSystem::coordinateSystem().

Here is the call graph for this function:

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

Construct from origin and 2 axes.

Definition at line 79 of file coordinateSystem.C.

References coordinateSystem::coordinateSystem().

Here is the call graph for this function:

coordinateSystem ( const word name,
const dictionary dict 
)

Construct from dictionary with a given name.

Definition at line 94 of file coordinateSystem.C.

References coordinateSystem::init().

Here is the call graph for this function:

coordinateSystem ( const dictionary dict)

Construct from dictionary with default name.

Definition at line 108 of file coordinateSystem.C.

References coordinateSystem::coordinateSystem(), and coordinateSystem::init().

Here is the call graph for this function:

coordinateSystem ( const objectRegistry obr,
const dictionary dict 
)

Construct from dictionary (default name)

With the ability to reference global coordinateSystems

Definition at line 120 of file coordinateSystem.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::Info, coordinateSystem::init(), entry::isDict(), dictionary::lookupEntryPtr(), coordinateSystems::New(), Foam::nl, and entry::stream().

Here is the call graph for this function:

Construct from Istream.

The Istream contains a word followed by a dictionary

Definition at line 171 of file coordinateSystem.C.

References coordinateSystem::dict(), and coordinateSystem::init().

Here is the call graph for this function:

~coordinateSystem ( )
virtual

Destructor.

Definition at line 185 of file coordinateSystem.C.

Referenced by coordinateSystem::clone().

Here is the caller graph for this function:

Member Function Documentation

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

Reimplemented in cylindricalCS, and cartesianCS.

Definition at line 218 of file coordinateSystem.C.

Referenced by coordinateSystem::dict(), cartesianCS::localToGlobal(), cylindricalCS::localToGlobal(), and coordinateSystem::origin().

Here is the caller graph for this function:

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

Reimplemented in cylindricalCS, and cartesianCS.

Definition at line 235 of file coordinateSystem.C.

References coordinateSystem::globalToLocal().

Here is the call graph for this function:

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

Reimplemented in cylindricalCS, and cartesianCS.

Definition at line 252 of file coordinateSystem.C.

Referenced by cartesianCS::globalToLocal(), cylindricalCS::globalToLocal(), coordinateSystem::localToGlobal(), and coordinateSystem::origin().

Here is the caller graph for this function:

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

Reimplemented in cylindricalCS, and cartesianCS.

Definition at line 269 of file coordinateSystem.C.

void init ( const dictionary rhs)
protected

Init from dict and obr.

Definition at line 329 of file coordinateSystem.C.

References dictionary::lookup(), coordinateRotation::New(), dictionary::readIfPresent(), and dictionary::subDict().

Referenced by coordinateSystem::coordinateSystem().

Here is the call graph for this function:

Here is the caller graph for this function:

void init ( const dictionary rhs,
const objectRegistry obr 
)
protected
TypeName ( "coordinateSystem"  )

Runtime type information.

autoPtr<coordinateSystem> clone ( ) const
inline
declareRunTimeSelectionTable ( autoPtr  ,
coordinateSystem  ,
dictionary  ,
( const objectRegistry &obr, const dictionary &dict ,
(obr, dict  
)

Referenced by coordinateSystem::clone().

Here is the caller graph for this function:

Foam::autoPtr< Foam::coordinateSystem > New ( const objectRegistry obr,
const dictionary dict 
)
static

Select constructed from dictionary and objectRegistry.

Definition at line 32 of file coordinateSystemNew.C.

References Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, dictionary::lookup(), Foam::nl, and dictionary::subDict().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Select constructed from dictionary.

Definition at line 61 of file coordinateSystemNew.C.

References coordinateSystem::New(), and dictionary::subDict().

Here is the call graph for this function:

Foam::autoPtr< Foam::coordinateSystem > New ( Istream is)
static

Select constructed from Istream.

Definition at line 72 of file coordinateSystemNew.C.

References dict, and Foam::name().

Here is the call graph for this function:

const word& name ( ) const
inline

Return name.

Definition at line 236 of file coordinateSystem.H.

Referenced by coordinateSystems::toc().

Here is the caller graph for this function:

string& note ( )
inline

Return non-constant access to the optional note.

Definition at line 242 of file coordinateSystem.H.

const string& note ( ) const
inline

Return the optional note.

Definition at line 248 of file coordinateSystem.H.

const point& origin ( ) const
inline

Return origin.

Definition at line 254 of file coordinateSystem.H.

Referenced by coordinateSystem::init(), and coordinateSystem::write().

Here is the caller graph for this function:

const coordinateRotation& R ( ) const
inline

Return const reference to co-ordinate rotation.

Definition at line 260 of file coordinateSystem.H.

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

Here is the caller graph for this function:

coordinateRotation& R ( )
inline

Return non const reference to co-ordinate rotation.

Definition at line 266 of file coordinateSystem.H.

References coordinateSystem::R().

Here is the call graph for this function:

const coordinateRotation& R ( const polyMesh mesh,
const labelList cells 
)
inline

Update and return the co-ordinate roation for a list of cells.

Definition at line 273 of file coordinateSystem.H.

References coordinateSystem::dict().

Here is the call graph for this function:

Foam::dictionary dict ( bool  ignoreType = false) const
virtual

Return as dictionary of entries.

Parameters
[in]ignoreTypedrop type (cartesian, cylindrical, etc) when generating the dictionary

Definition at line 191 of file coordinateSystem.C.

References dictionary::add(), coordinateSystem::localToGlobal(), and Foam::type().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void rename ( const word newName)
inline

Rename.

Definition at line 291 of file coordinateSystem.H.

point& origin ( )
inline
void clear ( )
virtual

Reset origin and rotation to an identity coordinateSystem.

Also resets the note

Definition at line 285 of file coordinateSystem.C.

References Vector< scalar >::zero.

Referenced by coordinateSystem::origin().

Here is the caller graph for this function:

void write ( Ostream os) const
virtual

Write.

Definition at line 293 of file coordinateSystem.C.

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

Referenced by coordinateSystem::init(), and coordinateSystem::origin().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Write dictionary.

Definition at line 300 of file coordinateSystem.C.

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

Referenced by coordinateSystem::origin(), coordinateSystems::writeData(), and engineValve::writeDict().

Here is the call graph for this function:

Here is the caller graph for this function:

point globalPosition ( const point local) const
inline

Convert from position in local coordinate system to global.

Cartesian position

Definition at line 320 of file coordinateSystem.H.

Referenced by coordinateSystem::origin(), and arcEdge::position().

Here is the caller graph for this function:

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

Convert from position in local coordinate system to global.

Cartesian position

Definition at line 327 of file coordinateSystem.H.

vector globalVector ( const vector local) const
inline

Convert from vector components in local coordinate system to.

global Cartesian vector

Definition at line 334 of file coordinateSystem.H.

Referenced by coordinateSystem::origin().

Here is the caller graph for this function:

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

Convert from vector components in local coordinate system to.

global Cartesian vector

Definition at line 341 of file coordinateSystem.H.

point localPosition ( const point global) const
inline

Convert from global Cartesian position to position in local.

coordinate system

Definition at line 348 of file coordinateSystem.H.

Referenced by coordinateSystem::origin().

Here is the caller graph for this function:

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

Convert from global Cartesian position to position in local.

coordinate system

Definition at line 355 of file coordinateSystem.H.

vector localVector ( const vector global) const
inline

Convert from global Cartesian vector to components in local.

coordinate system

Definition at line 362 of file coordinateSystem.H.

Referenced by coordinateSystem::origin().

Here is the caller graph for this function:

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

Convert from global Cartesian vector to components in local.

coordinate system

Definition at line 369 of file coordinateSystem.H.

Friends And Related Function Documentation

bool operator!= ( const coordinateSystem ,
const coordinateSystem  
)
friend
Ostream& operator<< ( Ostream ,
const coordinateSystem  
)
friend

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