The open source CFD toolbox

Representation of a 3D Cartesian coordinate system as a Vector of row vectors. More...

[legend]
[legend]

## Public Member Functions

Default construct. More...

triad (const Vector< vector > &vv)
Construct from components. More...

triad (const vector &x, const vector &y, const vector &z)
Construct from coordinate axes (row vectors) More...

Construct from a tensor. More...

Construct from a primary axis with the other two unset. More...

Construct from a quaternion. More...

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 ()
Inplace orthogonalise 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...

Sort the axes such that they are closest to the x, y and z axes. More...

operator quaternion () const
Convert to a quaternion. More...

Return transpose. More...

vector cx () const
Extract vector for column 0. More...

vector cy () const
Extract vector for column 1. More...

vector cz () const
Extract vector for column 2. More...

void operator= (const Vector< vector > &vv)

void operator= (const tensor &t)

void orthogonalize ()
Same as orthogonalise. More...

void normalize ()
Same as normalise. More...

Public Member Functions inherited from Vector< vector >
Vector ()=default
Default construct. More...

Vector (const Vector &)=default
Copy construct. More...

Vector (const Foam::zero)
Construct initialized to zero. More...

Vector (const VectorSpace< Vector< Cmpt2 >, Cmpt2, 3 > &vs)
Copy construct from VectorSpace of the same rank. More...

Vector (const vector &vx, const vector &vy, const vector &vz)
Construct from three components. More...

Vector (Istream &is)
Construct from Istream. More...

Vectoroperator= (const Vector &)=default
Copy assignment. More...

const vectorx () const

vectorx ()

const vectory () const

vectory ()

const vectorz () const

vectorz ()

Vector< vector > & normalise (const scalar tol=ROOTVSMALL)
Inplace normalise the vector by its magnitude. More...

Vector< vector > & removeCollinear (const Vector< vector > &unitVec)

const Vector< vector > & centre (const Foam::UList< Vector< vector > > &) const
Return *this (used for point which is a typedef to Vector<scalar>. More...

Public Member Functions inherited from VectorSpace< Form, Cmpt, Ncmpts >
VectorSpace ()=default
Default construct. More...

VectorSpace (const Foam::zero)
Construct initialized to zero. More...

VectorSpace (const VectorSpace< Form, Cmpt, Ncmpts > &vs)
Copy construct. More...

template<class Form2 , class Cmpt2 >
VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &)
Copy construct of a VectorSpace with the same size. More...

VectorSpace (Istream &is)
Construct from Istream. 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 * cdata () const noexcept
Return const pointer to the first data element. More...

Cmpt * data () noexcept
Return pointer to the first data element. More...

template<class SubVector , direction BStart>
const ConstBlock< SubVector, BStart > block () const

const Cmpt & operator[] (const direction) const

Cmpt & operator[] (const direction)

void operator= (const VectorSpace< Form, Cmpt, Ncmpts > &)

void operator+= (const VectorSpace< Form, Cmpt, Ncmpts > &)

void operator-= (const VectorSpace< Form, Cmpt, Ncmpts > &)

void operator= (const Foam::zero)

void operator*= (const scalar)

void operator/= (const scalar)

iterator begin () noexcept
Return an iterator to begin of VectorSpace. More...

iterator end () noexcept
Return an iterator to end of VectorSpace. More...

const_iterator cbegin () const noexcept
Return const_iterator to begin of VectorSpace. More...

const_iterator cend () const noexcept
Return const_iterator to end of VectorSpace. More...

const_iterator begin () const noexcept
Return const_iterator to begin of VectorSpace. More...

const_iterator end () const noexcept
Return const_iterator to end of VectorSpace. More...

template<class SubVector , Foam::direction BStart>
const Foam::VectorSpace< Form, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const

## 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< Form, Cmpt, Ncmpts >
static constexpr direction size () noexcept
The number of elements in the VectorSpace = Ncmpts. More...

static Form uniform (const Cmpt &s)
Return a VectorSpace with all elements = s. More...

## Static Public Attributes

Static Public Attributes inherited from Vector< vector >
static constexpr direction rank
Rank of Vector is 1. More...

Static Public Attributes inherited from VectorSpace< Form, Cmpt, Ncmpts >
static constexpr direction dim = 3
Dimensionality of space. More...

static constexpr direction nComponents = Ncmpts
Number of components in this vector space. More...

static constexpr direction mRows = Ncmpts

static constexpr direction nCols = 1

static const char *const typeName = "diagTensor"

static const char *const componentNames []

static const Form zero

static const Form one

static const Form max

static const Form min

static const Form rootMax

static const Form rootMin

## Friends

Ostreamoperator<< (Ostream &, const triad &)

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< Form, Cmpt, Ncmpts >
typedef VectorSpace< Form, Cmpt, Ncmpts > vsType
VectorSpace type. More...

typedef Cmpt cmptType
Component type. More...

typedef Cmpt magType
Magnitude type. More...

typedef Cmpt * iterator
Random access iterator for traversing VectorSpace. More...

typedef const Cmpt * const_iterator
Random access iterator for traversing VectorSpace. More...

Public Attributes inherited from VectorSpace< Form, Cmpt, Ncmpts >
Cmpt v_ [Ncmpts]
The components of this vector space. More...

## Detailed Description

Representation of a 3D Cartesian coordinate system as a Vector of row vectors.

Foam::quaternion
Source files

Definition at line 64 of file triad.H.

## Constructor & Destructor Documentation

inline

Default construct.

Definition at line 31 of file triadI.H.

 triad ( const Vector< vector > & vv )
inline

Construct from components.

Definition at line 37 of file triadI.H.

 triad ( const vector & x, const vector & y, const vector & z )
inline

Construct from coordinate axes (row vectors)

Definition at line 43 of file triadI.H.

 triad ( const tensor & t )
inline

Construct from a tensor.

Definition at line 49 of file triadI.H.

 triad ( const vector & pa )
inline

Construct from a primary axis with the other two unset.

Definition at line 55 of file triadI.H.

 triad ( const quaternion & q )

Construct from a quaternion.

Definition at line 91 of file triad.C.

Here is the call graph for this function:

 triad ( Istream & is )
inline

Construct from Istream.

Definition at line 62 of file triadI.H.

## ◆ set() [1/2]

 bool set ( const direction d ) const
inline

Is the vector in the direction d set.

Definition at line 70 of file triadI.H.

Referenced by triSurfaceTools::curvatures(), Foam::diff(), and triad::operator+=().

Here is the caller graph for this function:

## ◆ set() [2/2]

 bool set ( ) const
inline

Are all the vector set.

Definition at line 76 of file triadI.H.

Here is the caller graph for this function:

## ◆ primaryDirection()

 Foam::direction primaryDirection ( const vector & v )
inlinestatic

Return the primary direction of the vector v.

Definition at line 82 of file triadI.H.

Here is the call graph for this function:

## ◆ orthogonal()

 Foam::vector orthogonal ( const vector & v1, const vector & v2 )
inlinestatic

Return the vector orthogonal to the two provided.

Definition at line 99 of file triadI.H.

Here is the call graph for this function:

## ◆ orthogonalise()

 void orthogonalise ( )

Inplace orthogonalise so that it is ortho-normal.

Definition at line 102 of file triad.C.

References Foam::mag().

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ normalise()

 void normalise ( )
inline

Normalise each set axis vector to have a unit magnitude.

Uses vector::normalise with handling of small magnitudes.

Definition at line 120 of file triadI.H.

Here is the caller graph for this function:

## ◆ align()

 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 240 of file triad.C.

Here is the call graph for this function:

## ◆ sortxyz()

Sort the axes such that they are closest to the x, y and z axes.

Definition at line 285 of file triad.C.

References Foam::mag(), x, and y.

Here is the call graph for this function:

## ◆ operator quaternion()

 operator quaternion ( ) const

Convert to a quaternion.

## ◆ T()

inline

Return transpose.

Definition at line 146 of file triadI.H.

## ◆ cx()

 Foam::vector cx ( ) const
inline

Extract vector for column 0.

Definition at line 128 of file triadI.H.

References x, and y.

## ◆ cy()

 Foam::vector cy ( ) const
inline

Extract vector for column 1.

Definition at line 134 of file triadI.H.

References x, and y.

## ◆ cz()

 Foam::vector cz ( ) const
inline

Extract vector for column 2.

Definition at line 140 of file triadI.H.

References x, and y.

## ◆ operator=() [1/2]

 void operator= ( const Vector< vector > & vv )
inline

Definition at line 154 of file triadI.H.

References Vector< Cmpt >::operator=().

Here is the call graph for this function:

## ◆ operator=() [2/2]

 void operator= ( const tensor & t )
inline

Definition at line 160 of file triadI.H.

References x, Tensor< Cmpt >::x(), y, Tensor< Cmpt >::y(), and Tensor< Cmpt >::z().

Here is the call graph for this function:

## ◆ operator+=()

 void operator+= ( const triad & t2 )

without normalising or orthogonalising

Definition at line 177 of file triad.C.

References k, Foam::mag(), triad::set(), and Foam::sign().

Here is the call graph for this function:

## ◆ orthogonalize()

 void orthogonalize ( )
inline

Same as orthogonalise.

Definition at line 167 of file triad.H.

Here is the call graph for this function:

## ◆ normalize()

 void normalize ( )
inline

Same as normalise.

Definition at line 170 of file triad.H.

Referenced by triSurfaceTools::curvatures().

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ operator>>

 Istream & operator>> ( Istream & , triad & )
friend

## ◆ operator<<

 Ostream & operator<< ( Ostream & , const triad & )
friend

## ◆ I

static

Definition at line 96 of file triad.H.