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 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... | |
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... | |
Private Attributes | |
word | name_ |
Name of coordinate system. More... | |
string | note_ |
Optional note. More... | |
point | origin_ |
Origin. More... | |
autoPtr< coordinateRotation > | R_ |
Local-to-Global transformation tensor. 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: 1) axesRotation 2) STARCDRotation 3) cylindrical 4) EulerCoordinateRotation
Type of co-ordinates: 1) cartesian
Definition at line 85 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().
coordinateSystem | ( | const word & | name, |
const coordinateSystem & | cs | ||
) |
Construct copy with a different name.
Definition at line 52 of file coordinateSystem.C.
coordinateSystem | ( | const word & | name, |
const point & | origin, | ||
const coordinateRotation & | cr | ||
) |
Construct from origin and rotation.
Definition at line 65 of file coordinateSystem.C.
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.
coordinateSystem | ( | const word & | name, |
const dictionary & | dict | ||
) |
Construct from dictionary with a given name.
Definition at line 94 of file coordinateSystem.C.
References dict.
coordinateSystem | ( | const dictionary & | dict | ) |
Construct from dictionary with default name.
Definition at line 108 of file coordinateSystem.C.
References coordinateSystem::dict(), 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 dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, coordinateSystems::findIndex(), Foam::Info, entry::isDict(), dictionary::lookupEntryPtr(), coordinateSystems::New(), Foam::nl, entry::stream(), and coordinateSystems::toc().
coordinateSystem | ( | Istream & | is | ) |
Construct from Istream.
The Istream contains a word followed by a dictionary
Definition at line 168 of file coordinateSystem.C.
References coordinateSystem::dict(), and coordinateSystem::init().
|
virtual |
Destructor.
Definition at line 182 of file coordinateSystem.C.
|
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 215 of file coordinateSystem.C.
Referenced by cartesianCS::localToGlobal(), and cylindricalCS::localToGlobal().
|
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 232 of file coordinateSystem.C.
|
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 249 of file coordinateSystem.C.
Referenced by cartesianCS::globalToLocal(), and cylindricalCS::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 266 of file coordinateSystem.C.
|
protected |
Init from dict and obr.
Definition at line 326 of file coordinateSystem.C.
References List::clear(), dictionary::lookup(), coordinateRotation::New(), dictionary::readIfPresent(), and dictionary::subDict().
Referenced by coordinateSystem::coordinateSystem().
|
protected |
Init from dictionary.
Definition at line 336 of file coordinateSystem.C.
References List::clear(), Foam::endl(), dictionary::lookup(), coordinateRotation::New(), Foam::Pout, dictionary::readIfPresent(), and dictionary::subDict().
TypeName | ( | "coordinateSystem" | ) |
Runtime type information.
|
inline |
Return clone.
Definition at line 188 of file coordinateSystem.H.
References 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 dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::lookup(), and Foam::nl.
|
static |
Select constructed from dictionary.
Definition at line 60 of file coordinateSystemNew.C.
References dict.
|
static |
Select constructed from Istream.
Definition at line 71 of file coordinateSystemNew.C.
References dict, and Foam::name().
|
inline |
|
inline |
Return non-constant access to the optional note.
Definition at line 242 of file coordinateSystem.H.
References coordinateSystem::note_.
|
inline |
Return the optional note.
Definition at line 248 of file coordinateSystem.H.
References coordinateSystem::note_.
|
inline |
Return origin.
Definition at line 254 of file coordinateSystem.H.
References coordinateSystem::origin_.
|
inline |
Return const reference to co-ordinate rotation.
Definition at line 260 of file coordinateSystem.H.
References coordinateSystem::R_.
|
inline |
Return non const reference to co-ordinate rotation.
Definition at line 266 of file coordinateSystem.H.
References coordinateSystem::R_.
|
inline |
Update and return the co-ordinate roation for a list of cells.
Definition at line 273 of file coordinateSystem.H.
References cells, mesh, and coordinateSystem::R_.
|
virtual |
Return as dictionary of entries.
[in] | ignoreType | drop type (cartesian, cylindrical, etc) when generating the dictionary |
Definition at line 188 of file coordinateSystem.C.
References dictionary::add(), dict, and Foam::type().
Referenced by coordinateSystem::coordinateSystem().
|
inline |
|
inline |
Edit access to origin.
Definition at line 297 of file coordinateSystem.H.
References coordinateSystem::origin_.
|
virtual |
Reset origin and rotation to an identity coordinateSystem.
Also resets the note
Definition at line 282 of file coordinateSystem.C.
References Vector< scalar >::zero.
|
virtual |
Write.
Definition at line 290 of file coordinateSystem.C.
References Foam::nl, and Foam::type().
void writeDict | ( | Ostream & | os, |
bool | subDict = true |
||
) | const |
Write dictionary.
Definition at line 297 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().
Convert from position in local coordinate system to global.
Cartesian position
Definition at line 320 of file coordinateSystem.H.
Referenced by sampledPlane::sampledPlane().
|
inline |
Convert from position in local coordinate system to global.
Cartesian position
Definition at line 327 of file coordinateSystem.H.
Convert from vector components in local coordinate system to.
global Cartesian vector
Definition at line 334 of file coordinateSystem.H.
Referenced by sampledPlane::sampledPlane().
|
inline |
Convert from vector components in local coordinate system to.
global Cartesian vector
Definition at line 341 of file coordinateSystem.H.
Convert from global Cartesian position to position in local.
coordinate system
Definition at line 348 of file coordinateSystem.H.
|
inline |
Convert from global Cartesian position to position in local.
coordinate system
Definition at line 355 of file coordinateSystem.H.
Convert from global Cartesian vector to components in local.
coordinate system
Definition at line 362 of file coordinateSystem.H.
|
inline |
Convert from global Cartesian vector to components in local.
coordinate system
Definition at line 369 of file coordinateSystem.H.
|
friend |
|
friend |
|
private |
Name of coordinate system.
Definition at line 90 of file coordinateSystem.H.
Referenced by coordinateSystem::name(), and coordinateSystem::rename().
|
private |
Optional note.
Definition at line 93 of file coordinateSystem.H.
Referenced by coordinateSystem::note().
|
private |
|
private |
Local-to-Global transformation tensor.
Definition at line 99 of file coordinateSystem.H.
Referenced by coordinateSystem::R().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.