Base class for other coordinate system specifications. More...
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... | |
virtual autoPtr< coordinateSystem > | clone () const |
Construct and return a clone. More... | |
declareRunTimeSelectionTable (autoPtr, coordinateSystem, dictionary,(const word &name, const dictionary &dict),(name, dict)) | |
virtual | ~coordinateSystem () |
Destructor. More... | |
const word & | name () const |
Return name. More... | |
const word & | keyword () const |
Return keyword. More... | |
const point & | origin () const |
Return origin. More... | |
const coordinateRotation & | R () const |
Return const reference to co-ordinate rotation. More... | |
const coordinateRotation & | R (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< 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 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< 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... | |
Friends | |
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 84 of file coordinateSystem.H.
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().
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().
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().
coordinateSystem | ( | const word & | name, |
const dictionary & | dict | ||
) |
Construct from dictionary with a given name.
Definition at line 81 of file coordinateSystem.C.
|
virtual |
Destructor.
Definition at line 94 of file coordinateSystem.C.
References coordinateSystem::localToGlobal().
Referenced by coordinateSystem::clone().
|
protectedvirtual |
Convert from local coordinate system to the global Cartesian system.
with optional translation for the origin
Definition at line 101 of file coordinateSystem.C.
Referenced by coordinateSystem::R(), and coordinateSystem::~coordinateSystem().
|
protectedvirtual |
Convert from local coordinate system to the global Cartesian system.
with optional translation for the origin
Definition at line 118 of file coordinateSystem.C.
References coordinateSystem::globalToLocal().
|
protectedvirtual |
Convert from global Cartesian system to the local coordinate system.
with optional translation for the origin
Definition at line 135 of file coordinateSystem.C.
Referenced by coordinateSystem::localToGlobal(), and coordinateSystem::R().
|
protectedvirtual |
Convert from global Cartesian system to the local coordinate system.
with optional translation for the origin
Definition at line 152 of file coordinateSystem.C.
TypeName | ( | "coordinateSystem" | ) |
Runtime type information.
|
inlinevirtual |
Construct and return a clone.
Reimplemented in cylindrical, and cartesian.
Definition at line 163 of file coordinateSystem.H.
References coordinateSystem::coordinateSystem(), coordinateSystem::declareRunTimeSelectionTable(), dict, coordinateSystem::New(), and coordinateSystem::~coordinateSystem().
declareRunTimeSelectionTable | ( | autoPtr | , |
coordinateSystem | , | ||
dictionary | , | ||
(const word &name, const dictionary &dict) | , | ||
(name, dict) | |||
) |
|
static |
Select constructed from dictionary and objectRegistry.
Definition at line 31 of file coordinateSystemNew.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::FatalIOError, FatalIOErrorInFunction, InfoInFunction, entry::isDict(), dictionary::lookup(), dictionary::lookupEntryPtr(), Foam::name(), Foam::compressible::New(), Foam::nl, entry::stream(), and dictionary::subDict().
Referenced by coordinateSystem::clone(), plane::plane(), regionSizeDistribution::read(), coordinateSystems::readData(), and searchableSurfaceCollection::searchableSurfaceCollection().
|
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.
|
inline |
Return name.
Definition at line 209 of file coordinateSystem.H.
|
inline |
Return keyword.
Definition at line 215 of file coordinateSystem.H.
|
inline |
Return origin.
Definition at line 221 of file coordinateSystem.H.
|
inline |
Return const reference to co-ordinate rotation.
Definition at line 227 of file coordinateSystem.H.
Referenced by heSolidThermo< BasicSolidThermo, MixtureType >::Kappa(), and heSolidThermo< BasicSolidThermo, MixtureType >::KappaLocal().
|
inline |
Update and return the co-ordinate rotation for a list of points.
Definition at line 233 of file coordinateSystem.H.
References coordinateSystem::globalPosition(), coordinateSystem::globalToLocal(), coordinateSystem::globalVector(), coordinateSystem::localPosition(), coordinateSystem::localToGlobal(), coordinateSystem::localVector(), coordinateSystem::operator<<, coordinateSystem::write(), and coordinateSystem::writeDict().
|
virtual |
Write.
Definition at line 168 of file coordinateSystem.C.
References Foam::nl, and Foam::type().
Referenced by Foam::operator<<(), and coordinateSystem::R().
void writeDict | ( | Ostream & | os, |
bool | subDict = true |
||
) | const |
Write dictionary.
Definition at line 175 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::R(), and engineValve::writeDict().
Convert from position in local coordinate system to global.
Cartesian position
Definition at line 253 of file coordinateSystem.H.
Referenced by coordinateSystem::R().
|
inline |
Convert from position in local coordinate system to global.
Cartesian position
Definition at line 260 of file coordinateSystem.H.
Convert from vector components in local coordinate system to.
global Cartesian vector
Definition at line 267 of file coordinateSystem.H.
Referenced by coordinateSystem::R().
|
inline |
Convert from vector components in local coordinate system to.
global Cartesian vector
Definition at line 274 of file coordinateSystem.H.
Convert from global Cartesian position to position in local.
coordinate system
Definition at line 281 of file coordinateSystem.H.
Referenced by coordinateSystem::R().
|
inline |
Convert from global Cartesian position to position in local.
coordinate system
Definition at line 288 of file coordinateSystem.H.
Convert from global Cartesian vector to components in local.
coordinate system
Definition at line 295 of file coordinateSystem.H.
Referenced by coordinateSystem::R().
|
inline |
Convert from global Cartesian vector to components in local.
coordinate system
Definition at line 302 of file coordinateSystem.H.
|
friend |
Referenced by coordinateSystem::R().