Representation of a 3D Cartesian coordinate system as a Vector of vectors. More...
Public Member Functions | |
triad () | |
Construct null. More... | |
triad (const Vector< vector > &vv) | |
Construct from components. More... | |
triad (const vector &x, const vector &y, const vector &z) | |
Construct from coordinate axes. More... | |
triad (const vector &pa) | |
Construct from a primary axis with the other two unset. More... | |
triad (const quaternion &q) | |
Construct from a quaternion. More... | |
triad (const tensor &t) | |
Construct from a tensor. More... | |
triad (Istream &) | |
Construct from Istream. More... | |
bool | set (const direction d) const |
Is the vector in the direction d set. More... | |
bool | set () const |
Are all the vector set. More... | |
void | orthogonalize () |
Orthogonalize this triad so that it is ortho-normal. More... | |
void | normalize () |
Normalize each set axis vector to have a unit magnitude. More... | |
void | align (const vector &v) |
Align this triad with the given vector v. More... | |
triad | sortxyz () const |
Sort the axes such that they are closest to the x, y and z axes. More... | |
operator quaternion () const | |
Convert to a quaternion. More... | |
void | operator= (const Vector< vector > &) |
void | operator= (const tensor &t) |
void | operator+= (const triad &t2) |
Add the triad t2 to this triad. More... | |
![]() | |
Vector () | |
Construct null. More... | |
Vector (const VectorSpace< Vector< Cmpt2 >, Cmpt2, 3 > &) | |
Construct given VectorSpace of the same rank. More... | |
Vector (const vector &vx, const vector &vy, const vector &vz) | |
Construct given three components. More... | |
Vector (Istream &) | |
Construct from Istream. More... | |
const vector & | x () const |
vector & | x () |
const vector & | y () const |
vector & | y () |
const vector & | z () const |
vector & | z () |
const Vector< vector > & | centre (const Foam::List< Vector< vector > > &) const |
Return *this (used for point which is a typedef to Vector<scalar>. More... | |
![]() | |
VectorSpace () | |
Construct null. More... | |
VectorSpace (Istream &) | |
Construct from Istream. More... | |
VectorSpace (const VectorSpace< Form, Cmpt, nCmpt > &) | |
Construct as copy. More... | |
VectorSpace (const VectorSpace< Form2, Cmpt2, nCmpt > &) | |
Construct as copy of another VectorSpace type of the same rank. More... | |
label | size () const |
Return the number of elements in the VectorSpace = nCmpt. More... | |
const Cmpt & | component (const direction) const |
Cmpt & | component (const direction) |
void | component (Cmpt &, const direction) const |
void | replace (const direction, const Cmpt &) |
const Cmpt & | operator[] (const direction) const |
Cmpt & | operator[] (const direction) |
void | operator= (const VectorSpace< Form, Cmpt, nCmpt > &) |
void | operator+= (const VectorSpace< Form, Cmpt, nCmpt > &) |
void | operator-= (const VectorSpace< Form, Cmpt, nCmpt > &) |
void | operator*= (const scalar) |
void | operator/= (const scalar) |
Static Public Member Functions | |
static direction | primaryDirection (const vector &v) |
Return the primary direction of the vector v. More... | |
static vector | orthogonal (const vector &v1, const vector &v2) |
Return the vector orthogonal to the two provided. More... | |
Static Public Attributes | |
static const triad | zero |
static const triad | one |
static const triad | max |
static const triad | min |
static const triad | rootMax |
static const triad | rootMin |
static const triad | I |
static const triad | unset |
![]() | |
static const char *const | typeName |
static const char * | componentNames [] |
static const Vector | zero |
static const Vector | one |
static const Vector | max |
static const Vector | min |
static const Vector | rootMax |
static const Vector | rootMin |
Friends | |
Istream & | operator>> (Istream &, triad &) |
Ostream & | operator<< (Ostream &, const triad &) |
Additional Inherited Members | |
![]() | |
enum | |
enum | components |
Component labeling enumeration. More... | |
typedef Vector< label > | labelType |
Equivalent type of labels used for valid component indexing. More... | |
![]() | |
enum | |
typedef Cmpt | cmptType |
Component type. More... | |
![]() | |
Cmpt | v_ [nCmpt] |
The components of this vector space. More... | |
Representation of a 3D Cartesian coordinate system as a Vector of vectors.
Construct from a primary axis with the other two unset.
Definition at line 46 of file triadI.H.
References triad::unset.
triad | ( | const quaternion & | q | ) |
Construct from a quaternion.
Definition at line 102 of file triad.C.
References quaternion::R(), Tensor::T(), Vector< vector >::x(), Tensor::x(), Vector< vector >::y(), Tensor::y(), Vector< vector >::z(), and Tensor::z().
Construct from a tensor.
Definition at line 111 of file triad.C.
References x, Tensor::x(), y, Tensor::y(), and Tensor::z().
|
inline |
Is the vector in the direction d set.
Definition at line 61 of file triadI.H.
Referenced by calcCurvature(), Foam::diff(), and triad::operator+=().
|
inlinestatic |
Return the primary direction of the vector v.
Definition at line 73 of file triadI.H.
References Foam::mag(), Vector< vector >::X, Vector< Cmpt >::x(), Vector< vector >::Y, Vector< Cmpt >::y(), Vector< vector >::Z, and Vector< Cmpt >::z().
|
inlinestatic |
Return the vector orthogonal to the two provided.
Definition at line 91 of file triadI.H.
References Foam::mag(), and triad::unset.
void orthogonalize | ( | ) |
Orthogonalize this triad so that it is ortho-normal.
Definition at line 121 of file triad.C.
References Foam::mag().
|
inline |
Normalize each set axis vector to have a unit magnitude.
Definition at line 111 of file triadI.H.
References Foam::mag().
Referenced by calcCurvature().
void align | ( | const vector & | v | ) |
Align this triad with the given vector v.
by rotating the most aligned axis to be coincident with v
Definition at line 259 of file triad.C.
References Foam::mag(), R, Foam::rotationTensor(), Foam::transform(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Foam::triad sortxyz | ( | ) | const |
Sort the axes such that they are closest to the x, y and z axes.
Definition at line 304 of file triad.C.
References Foam::mag(), x, and y.
Referenced by Foam::diff().
operator quaternion | ( | ) | const |
Convert to a quaternion.
Definition at line 121 of file triadI.H.
References VectorSpace< Vector< Cmpt >, Cmpt, 3 >::operator=().
Definition at line 397 of file triad.C.
References x, Tensor::x(), y, Tensor::y(), and Tensor::z().
Add the triad t2 to this triad.
without normalizing or orthogonalizing
Definition at line 196 of file triad.C.
References k, Foam::mag(), triad::set(), and Foam::sign().
|
static |
Definition at line 105 of file triad.H.
Referenced by calcVertexCoordSys(), triad::orthogonal(), and triad::triad().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.