Base class for other coordinate system specifications. More...
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< coordinateSystem > | clone () const |
Return clone. More... | |
declareRunTimeSelectionTable (autoPtr, coordinateSystem, dictionary,(const objectRegistry &obr, const dictionary &dict),(obr, dict)) | |
virtual | ~coordinateSystem () |
Destructor. More... | |
const word & | name () const |
Return name. More... | |
string & | note () |
Return non-constant access to the optional note. More... | |
const string & | note () const |
Return the optional note. More... | |
const point & | origin () const |
Return origin. More... | |
const coordinateRotation & | R () const |
Return const reference to co-ordinate rotation. More... | |
coordinateRotation & | R () |
Return non const reference to co-ordinate rotation. More... | |
const coordinateRotation & | R (const polyMesh &mesh, const labelList &cells) |
Update and return the co-ordinate rotation 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... | |
point & | origin () |
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< pointField > | globalPosition (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< vectorField > | globalVector (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< pointField > | localPosition (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< vectorField > | localVector (const vectorField &global) const |
Convert from global Cartesian vector to components in local. More... | |
Static Public Member Functions | |
static autoPtr< coordinateSystem > | New (const objectRegistry &obr, const dictionary &dict) |
Select constructed from dictionary and objectRegistry. More... | |
static autoPtr< coordinateSystem > | New (const dictionary &dict) |
Select constructed from dictionary. More... | |
static autoPtr< coordinateSystem > | New (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< vectorField > | localToGlobal (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< vectorField > | globalToLocal (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 &) |
Ostream & | operator<< (Ostream &, const coordinateSystem &) |
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:
Type of co-ordinates:
Definition at line 90 of file coordinateSystem.H.
coordinateSystem | ( | ) |
Construct null. This is equivalent to an identity coordinateSystem.
Definition at line 42 of file coordinateSystem.C.
Referenced by coordinateSystem::clone(), and coordinateSystem::coordinateSystem().
coordinateSystem | ( | const word & | name, |
const coordinateSystem & | cs | ||
) |
Construct copy with a different name.
Definition at line 52 of file coordinateSystem.C.
References coordinateSystem::coordinateSystem().
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().
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().
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().
coordinateSystem | ( | const dictionary & | dict | ) |
Construct from dictionary with default name.
Definition at line 108 of file coordinateSystem.C.
References coordinateSystem::coordinateSystem(), and coordinateSystem::init().
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, FatalErrorInFunction, InfoInFunction, coordinateSystem::init(), entry::isDict(), dictionary::lookupEntryPtr(), coordinateSystems::New(), Foam::nl, and entry::stream().
coordinateSystem | ( | Istream & | is | ) |
Construct from Istream.
The Istream contains a word followed by a dictionary
Definition at line 167 of file coordinateSystem.C.
References coordinateSystem::dict(), and coordinateSystem::init().
|
virtual |
Destructor.
Definition at line 181 of file coordinateSystem.C.
Referenced by coordinateSystem::clone().
|
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 214 of file coordinateSystem.C.
Referenced by coordinateSystem::dict(), cartesianCS::localToGlobal(), cylindricalCS::localToGlobal(), and coordinateSystem::origin().
|
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 231 of file coordinateSystem.C.
References coordinateSystem::globalToLocal().
|
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 248 of file coordinateSystem.C.
Referenced by cartesianCS::globalToLocal(), cylindricalCS::globalToLocal(), coordinateSystem::localToGlobal(), and coordinateSystem::origin().
|
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 265 of file coordinateSystem.C.
|
protected |
Init from dict and obr.
Definition at line 325 of file coordinateSystem.C.
References dictionary::lookup(), coordinateRotation::New(), dictionary::readIfPresent(), and dictionary::subDict().
Referenced by coordinateSystem::coordinateSystem().
|
protected |
Init from dictionary.
Definition at line 335 of file coordinateSystem.C.
References Foam::endl(), dictionary::lookup(), coordinateRotation::New(), Foam::Pout, dictionary::readIfPresent(), and dictionary::subDict().
TypeName | ( | "coordinateSystem" | ) |
Runtime type information.
|
inline |
Return clone.
Definition at line 193 of file coordinateSystem.H.
References coordinateSystem::coordinateSystem(), coordinateSystem::declareRunTimeSelectionTable(), coordinateSystem::dict(), coordinateSystem::New(), and coordinateSystem::~coordinateSystem().
declareRunTimeSelectionTable | ( | autoPtr | , |
coordinateSystem | , | ||
dictionary | , | ||
(const objectRegistry &obr, const dictionary &dict) | , | ||
(obr, dict) | |||
) |
|
static |
Select constructed from dictionary and objectRegistry.
Definition at line 32 of file coordinateSystemNew.C.
References Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::lookup(), Foam::nl, and dictionary::subDict().
Referenced by coordinateSystem::clone(), coordinateSystem::New(), and searchableSurfaceCollection::searchableSurfaceCollection().
|
static |
Select constructed from dictionary.
Definition at line 60 of file coordinateSystemNew.C.
References coordinateSystem::New(), and dictionary::subDict().
|
static |
Select constructed from Istream.
Definition at line 71 of file coordinateSystemNew.C.
References dict, and Foam::name().
|
inline |
Return name.
Definition at line 241 of file coordinateSystem.H.
|
inline |
Return non-constant access to the optional note.
Definition at line 247 of file coordinateSystem.H.
|
inline |
Return the optional note.
Definition at line 253 of file coordinateSystem.H.
|
inline |
Return origin.
Definition at line 259 of file coordinateSystem.H.
Referenced by Foam::operator!=(), and coordinateSystem::write().
|
inline |
Return const reference to co-ordinate rotation.
Definition at line 265 of file coordinateSystem.H.
Referenced by Foam::operator!=(), and coordinateSystem::R().
|
inline |
Return non const reference to co-ordinate rotation.
Definition at line 271 of file coordinateSystem.H.
References coordinateSystem::R().
|
inline |
Update and return the co-ordinate rotation for a list of cells.
Definition at line 278 of file coordinateSystem.H.
References coordinateSystem::dict().
|
virtual |
Return as dictionary of entries.
[in] | ignoreType | drop type (cartesian, cylindrical, etc) when generating the dictionary |
Definition at line 187 of file coordinateSystem.C.
References dictionary::add(), coordinateSystem::localToGlobal(), and Foam::type().
Referenced by coordinateSystem::clone(), coordinateSystem::coordinateSystem(), and coordinateSystem::R().
|
inline |
Rename.
Definition at line 296 of file coordinateSystem.H.
|
inline |
Edit access to origin.
Definition at line 302 of file coordinateSystem.H.
References coordinateSystem::clear(), coordinateSystem::globalPosition(), coordinateSystem::globalToLocal(), coordinateSystem::globalVector(), coordinateSystem::localPosition(), coordinateSystem::localToGlobal(), coordinateSystem::localVector(), coordinateSystem::operator<<, coordinateSystem::write(), and coordinateSystem::writeDict().
|
virtual |
Reset origin and rotation to an identity coordinateSystem.
Also resets the note
Definition at line 281 of file coordinateSystem.C.
References Foam::Zero.
Referenced by coordinateSystem::origin().
|
virtual |
Write.
Definition at line 289 of file coordinateSystem.C.
References Foam::nl, coordinateSystem::origin(), and Foam::type().
Referenced by Foam::operator<<(), and coordinateSystem::origin().
void writeDict | ( | Ostream & | os, |
bool | subDict = true |
||
) | const |
Write dictionary.
Definition at line 296 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 coordinateSystem::origin(), and engineValve::writeDict().
Convert from position in local coordinate system to global.
Cartesian position
Definition at line 325 of file coordinateSystem.H.
Referenced by coordinateSystem::origin().
|
inline |
Convert from position in local coordinate system to global.
Cartesian position
Definition at line 332 of file coordinateSystem.H.
Convert from vector components in local coordinate system to.
global Cartesian vector
Definition at line 339 of file coordinateSystem.H.
Referenced by coordinateSystem::origin().
|
inline |
Convert from vector components in local coordinate system to.
global Cartesian vector
Definition at line 346 of file coordinateSystem.H.
Convert from global Cartesian position to position in local.
coordinate system
Definition at line 353 of file coordinateSystem.H.
Referenced by coordinateSystem::origin().
|
inline |
Convert from global Cartesian position to position in local.
coordinate system
Definition at line 360 of file coordinateSystem.H.
Convert from global Cartesian vector to components in local.
coordinate system
Definition at line 367 of file coordinateSystem.H.
Referenced by coordinateSystem::origin().
|
inline |
Convert from global Cartesian vector to components in local.
coordinate system
Definition at line 374 of file coordinateSystem.H.
|
friend |
|
friend |
Referenced by coordinateSystem::origin().