LifeV
VectorSmall< 3 > Class Template Reference

class VectorSmall<3> Partial specialization for the 3D case More...

#include <VectorSmall.hpp>

+ Collaboration diagram for VectorSmall< 3 >:

Constructors and destructors

 VectorSmall ()
 Empty constructor (all components are set to zero) More...
 
 VectorSmall (const Real value)
 Non Empty constructor. More...
 
 VectorSmall (Real const &x, Real const &y, Real const &z)
 Full constructor with all components explicitly initialized. More...
 
 VectorSmall (Real *rawVector)
 
VectorSmall< 3 > & operator= (VectorSmall< 3 > const &vector)
 Assignment operator. More...
 
 VectorSmall (VectorSmall< 3 > const &vector)
 Copy constructor. More...
 

Overloaded operators

VectorSmall< 3 > & operator+= (VectorSmall< 3 > const &vector)
 Operator +=. More...
 
VectorSmall< 3 > operator+ (VectorSmall< 3 > const &vector) const
 Operator +. More...
 
VectorSmall< 3 > & operator-= (VectorSmall< 3 > const &vector)
 Operator -=. More...
 
VectorSmall< 3 > operator- (VectorSmall< 3 > const &vector) const
 Operator -. More...
 
VectorSmall< 3 > & operator*= (Real const &factor)
 Operator *= (multiplication by scalar) More...
 
VectorSmall< 3 > operator* (Real const &factor) const
 Operator * (multiplication by scalar on the right) More...
 
VectorSmall< 3 > & operator/= (Real const &factor)
 Operator /= (division by scalar) More...
 
VectorSmall< 3 > operator/ (Real const &factor) const
 Operator / (division by scalar) More...
 
Real const & operator[] (UInt const &i) const
 Operator []. More...
 
Realoperator[] (UInt const &i)
 Operator []. More...
 
Real const & operator() (UInt const &i) const
 Operator () More...
 
Realoperator() (UInt const &i)
 Operator () More...
 

Geometric Methods

Real dot (VectorSmall< 3 > const &vector) const
 Scalar product. More...
 
VectorSmall< 3 > cross (VectorSmall< 3 > const &vector) const
 Cross product. More...
 
MatrixSmall< 3, 3 > outerProduct (VectorSmall< 3 > const &vector) const
 Outer product. More...
 
Real extract (UInt const &i) const
 Extraction of a component. More...
 
Real norm () const
 $ L^2 $ norm More...
 
void normalize ()
 Normalize vector. More...
 
VectorSmall< 3 > normalized ()
 Create the versor associated to this VectorSmall. More...
 

Tools

UInt size () const
 function to get the size of the VectorSmall ( for compatibility with Eigen) More...
 

Data

Real M_coords [3]
 Data storage. More...
 

Detailed Description

template<>
class LifeV::VectorSmall< 3 >

class VectorSmall<3> Partial specialization for the 3D case

Definition at line 369 of file VectorSmall.hpp.

Constructor & Destructor Documentation

◆ VectorSmall() [1/5]

VectorSmall ( )
inline

Empty constructor (all components are set to zero)

Definition at line 377 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ VectorSmall() [2/5]

VectorSmall ( const Real  value)
inline

Non Empty constructor.

Definition at line 383 of file VectorSmall.hpp.

◆ VectorSmall() [3/5]

VectorSmall ( Real const &  x,
Real const &  y,
Real const &  z 
)
inline

Full constructor with all components explicitly initialized.

Parameters
xx-component of the point
yy-component of the point
zz-component of the point

Definition at line 394 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ VectorSmall() [4/5]

VectorSmall ( Real rawVector)
inline

Definition at line 402 of file VectorSmall.hpp.

◆ VectorSmall() [5/5]

VectorSmall ( VectorSmall< 3 > const &  vector)
inline

Copy constructor.

Definition at line 419 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ operator=()

VectorSmall<3>& operator= ( VectorSmall< 3 > const &  vector)
inline

Assignment operator.

Definition at line 410 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator+=()

VectorSmall<3>& operator+= ( VectorSmall< 3 > const &  vector)
inline

Operator +=.

Definition at line 430 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator+()

VectorSmall<3> operator+ ( VectorSmall< 3 > const &  vector) const
inline

Operator +.

Definition at line 439 of file VectorSmall.hpp.

◆ operator-=()

VectorSmall<3>& operator-= ( VectorSmall< 3 > const &  vector)
inline

Operator -=.

Definition at line 446 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator-()

VectorSmall<3> operator- ( VectorSmall< 3 > const &  vector) const
inline

Operator -.

Definition at line 455 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator*=()

VectorSmall<3>& operator*= ( Real const &  factor)
inline

Operator *= (multiplication by scalar)

Definition at line 462 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator*()

VectorSmall<3> operator* ( Real const &  factor) const
inline

Operator * (multiplication by scalar on the right)

Definition at line 471 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator/=()

VectorSmall<3>& operator/= ( Real const &  factor)
inline

Operator /= (division by scalar)

Definition at line 478 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator/()

VectorSmall<3> operator/ ( Real const &  factor) const
inline

Operator / (division by scalar)

Definition at line 486 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator[]() [1/2]

Real const& operator[] ( UInt const &  i) const
inline

Operator [].

Definition at line 493 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator[]() [2/2]

Real& operator[] ( UInt const &  i)
inline

Operator [].

Definition at line 500 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ operator()() [1/2]

Real const& operator() ( UInt const &  i) const
inline

Operator ()

Definition at line 507 of file VectorSmall.hpp.

◆ operator()() [2/2]

Real& operator() ( UInt const &  i)
inline

Operator ()

Definition at line 514 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ dot()

Real dot ( VectorSmall< 3 > const &  vector) const
inline

Scalar product.

Parameters
vectorsecond operand
Returns
scalar product value

Definition at line 530 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ cross()

VectorSmall<3> cross ( VectorSmall< 3 > const &  vector) const
inline

Cross product.

Parameters
vectorsecond operand

Definition at line 541 of file VectorSmall.hpp.

◆ outerProduct()

MatrixSmall< 3, 3 > outerProduct ( VectorSmall< 3 > const &  vector) const

Outer product.

Parameters
vectorsecond operand

Definition at line 12 of file VectorSmall.cpp.

◆ extract()

Real extract ( UInt const &  i) const
inline

Extraction of a component.

Parameters
indexof the component to be extracted
Returns
extracted component

Definition at line 562 of file VectorSmall.hpp.

◆ norm()

Real norm ( ) const
inline

$ L^2 $ norm

Returns
norm value

Definition at line 573 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ normalize()

void normalize ( )
inline

Normalize vector.

Definition at line 579 of file VectorSmall.hpp.

+ Here is the caller graph for this function:

◆ normalized()

VectorSmall<3> normalized ( )
inline

Create the versor associated to this VectorSmall.

Returns
the versor associated to this VectorSmall

Definition at line 588 of file VectorSmall.hpp.

◆ size()

UInt size ( ) const
inline

function to get the size of the VectorSmall ( for compatibility with Eigen)

Returns
the fixed size of the VectorSmall

Definition at line 602 of file VectorSmall.hpp.

Field Documentation

◆ M_coords

Real M_coords[3]
private

Data storage.

Definition at line 615 of file VectorSmall.hpp.


The documentation for this class was generated from the following files: