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 | orthogonalise () |
Orthogonalise this triad so that it is ortho-normal. More... | |
void | normalise () |
Normalise 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... | |
Public Member Functions inherited from Vector< vector > | |
Vector () | |
Construct null. More... | |
Vector (const Foam::zero) | |
Construct initialised to zero. 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... | |
Public Member Functions inherited from VectorSpace< Vector< vector >, vector, 3 > | |
VectorSpace () | |
Construct null. More... | |
VectorSpace (const Foam::zero) | |
Construct initialised to zero. More... | |
VectorSpace (Istream &) | |
Construct from Istream. More... | |
VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &) | |
Construct as copy of a VectorSpace with the same size. More... | |
const vector & | component (const direction) const |
vector & | component (const direction) |
void | component (vector &, const direction) const |
void | replace (const direction, const vector &) |
const ConstBlock< SubVector, BStart > | block () const |
const VectorSpace< Vector< vector >, vector, Ncmpts >::template ConstBlock< SubVector, BStart > | block () const |
const vector & | operator[] (const direction) const |
vector & | operator[] (const direction) |
void | operator+= (const VectorSpace< Vector< vector >, vector, Ncmpts > &) |
void | operator-= (const VectorSpace< Vector< vector >, vector, Ncmpts > &) |
void | operator= (const Foam::zero) |
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 Member Functions inherited from VectorSpace< Vector< vector >, vector, 3 > | |
static direction | size () |
Return the number of elements in the VectorSpace = Ncmpts. More... | |
static Vector< vector > | uniform (const vector &s) |
Return a VectorSpace with all elements = s. More... | |
Static Public Attributes | |
static const triad | I |
static const triad | unset |
Static Public Attributes inherited from Vector< vector > | |
static const direction | rank |
Rank of Vector is 1. More... | |
Static Public Attributes inherited from VectorSpace< Vector< vector >, vector, 3 > | |
static const direction | dim |
Dimensionality of space. More... | |
static const direction | nComponents |
Number of components in this vector space. More... | |
static const direction | mRows |
static const direction | nCols |
static const char *const | typeName |
static const char *const | componentNames [] |
static const Vector< vector > | zero |
static const Vector< vector > | one |
static const Vector< vector > | max |
static const Vector< vector > | min |
static const Vector< vector > | rootMax |
static const Vector< vector > | rootMin |
Friends | |
Istream & | operator>> (Istream &, triad &) |
Ostream & | operator<< (Ostream &, const triad &) |
Additional Inherited Members | |
Public Types inherited from Vector< vector > | |
enum | components |
Component labeling enumeration. More... | |
typedef Vector< label > | labelType |
Equivalent type of labels used for valid component indexing. More... | |
Public Types inherited from VectorSpace< Vector< vector >, vector, 3 > | |
typedef VectorSpace< Vector< vector >, vector, Ncmpts > | vsType |
VectorSpace type. More... | |
typedef vector | cmptType |
Component type. More... | |
Public Attributes inherited from VectorSpace< Vector< vector >, vector, 3 > | |
vector | v_ [Ncmpts] |
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::operator=(), VectorSpace< Vector< vector >, vector, 3 >::operator[](), triad::primaryDirection(), and triad::unset.
triad | ( | const quaternion & | q | ) |
Construct from a quaternion.
Definition at line 89 of file triad.C.
References quaternion::R(), Tensor< Cmpt >::T(), Vector< Cmpt >::x(), Vector< vector >::x(), Vector< vector >::y(), Vector< Cmpt >::y(), Vector< Cmpt >::z(), and Vector< vector >::z().
Construct from a tensor.
Definition at line 98 of file triad.C.
References Vector< vector >::x(), Tensor< Cmpt >::x(), Vector< vector >::y(), Tensor< Cmpt >::y(), Vector< vector >::z(), and Tensor< Cmpt >::z().
Is the vector in the direction d set.
Definition at line 61 of file triadI.H.
References VectorSpace< Vector< vector >, vector, 3 >::operator[]().
Referenced by triSurface::curvature(), 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(), triad::orthogonal(), Vector< vector >::X, Vector< Cmpt >::x(), Vector< vector >::Y, Vector< Cmpt >::y(), Vector< vector >::Z, and Vector< Cmpt >::z().
Referenced by triad::triad().
|
inlinestatic |
Return the vector orthogonal to the two provided.
Definition at line 91 of file triadI.H.
References Foam::mag(), and triad::unset.
Referenced by triad::orthogonalise(), and triad::primaryDirection().
void orthogonalise | ( | ) |
Orthogonalise this triad so that it is ortho-normal.
Definition at line 108 of file triad.C.
References Foam::mag(), VectorSpace< Vector< vector >, vector, 3 >::operator[](), and triad::orthogonal().
|
inline |
Normalise each set axis vector to have a unit magnitude.
Definition at line 111 of file triadI.H.
References Foam::mag(), and VectorSpace< Vector< vector >, vector, 3 >::operator[]().
Referenced by triSurface::curvature().
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 255 of file triad.C.
References Foam::mag(), VectorSpace< Vector< vector >, vector, 3 >::operator[](), 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 300 of file triad.C.
References Foam::mag(), VectorSpace< Vector< vector >, vector, 3 >::operator, VectorSpace< Vector< vector >, vector, 3 >::operator[](), R, Vector< vector >::x(), Vector< Cmpt >::x(), Tensor< Cmpt >::xx(), Tensor< Cmpt >::xy(), Tensor< Cmpt >::xz(), Vector< vector >::y(), Vector< Cmpt >::y(), Tensor< Cmpt >::yx(), Tensor< Cmpt >::yy(), Tensor< Cmpt >::yz(), Vector< Cmpt >::z(), Vector< vector >::z(), Tensor< Cmpt >::zx(), Tensor< Cmpt >::zy(), and Tensor< Cmpt >::zz().
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=().
Referenced by triad::triad().
Definition at line 393 of file triad.C.
References Vector< vector >::x(), Tensor< Cmpt >::x(), Vector< vector >::y(), Tensor< Cmpt >::y(), Vector< vector >::z(), and Tensor< Cmpt >::z().
Add the triad t2 to this triad.
without normalising or orthogonalising
Definition at line 192 of file triad.C.
References k, Foam::mag(), VectorSpace< Vector< vector >, vector, 3 >::operator[](), triad::set(), and Foam::sign().
|
static |
|
static |
Definition at line 99 of file triad.H.
Referenced by triad::orthogonal(), triad::triad(), and triSurface::triSurfInstance().