OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

Vector< Cmpt > Class Template Reference

Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross product operators. More...

Inheritance diagram for Vector< Cmpt >:
Collaboration diagram for Vector< Cmpt >:

List of all members.


Public Types

enum  { rank = 1 }
enum  components { X, Y, Z }
 Component labeling enumeration. More...
typedef Vector< labellabelType
 Equivalent type of labels used for valid component indexing.

Public Member Functions

 Vector ()
 Construct null.
 Vector (const VectorSpace< Vector< Cmpt >, Cmpt, 3 > &)
 Construct given VectorSpace.
 Vector (const Cmpt &vx, const Cmpt &vy, const Cmpt &vz)
 Construct given three components.
 Vector (Istream &)
 Construct from Istream.
const Cmpt & x () const
const Cmpt & y () const
const Cmpt & z () const
Cmpt & x ()
Cmpt & y ()
Cmpt & z ()
const Vector< Cmpt > & centre (const Foam::List< Vector< Cmpt > > &) const
 Return *this (used for point which is a typedef to Vector<scalar>.

Static Public Attributes

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

Detailed Description

template<class Cmpt>
class Foam::Vector< Cmpt >

Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross product operators.

A centre() member function which returns the Vector for which it is called is defined so that point which is a typedef to Vector<scalar> behaves as other shapes in the shape hierachy.

Source files

Definition at line 53 of file Vector.H.


Member Typedef Documentation

Equivalent type of labels used for valid component indexing.

Definition at line 61 of file Vector.H.


Member Enumeration Documentation

anonymous enum

Enumerator:
rank 

Definition at line 66 of file Vector.H.

enum components

Component labeling enumeration.

Enumerator:
X 
Y 
Z 

Definition at line 83 of file Vector.H.


Constructor & Destructor Documentation

Vector (  )  [inline]

Construct null.

Definition at line 27 of file VectorI.H.

Vector ( const VectorSpace< Vector< Cmpt >, Cmpt, 3 > &  vs  )  [inline]

Construct given VectorSpace.

Definition at line 33 of file VectorI.H.

Vector ( const Cmpt &  vx,
const Cmpt &  vy,
const Cmpt &  vz 
) [inline]

Construct given three components.

Definition at line 41 of file VectorI.H.

Vector ( Istream is  )  [inline]


Member Function Documentation

const Cmpt & x (  )  const [inline]

Definition at line 60 of file VectorI.H.

Referenced by geomDecomp::geomDecomp(), Foam::inv(), Foam::operator^(), and Foam::tr().

Here is the caller graph for this function:

const Cmpt & y (  )  const [inline]

Definition at line 66 of file VectorI.H.

References VectorSpace< Vector< Cmpt >, Cmpt, 3 >::v_, and Vector< Cmpt >::X.

Referenced by geomDecomp::geomDecomp(), Foam::inv(), Foam::operator^(), and Foam::tr().

Here is the caller graph for this function:

const Cmpt & z (  )  const [inline]

Definition at line 72 of file VectorI.H.

Referenced by geomDecomp::geomDecomp(), Foam::inv(), Foam::operator^(), and Foam::tr().

Here is the caller graph for this function:

Cmpt & x (  )  [inline]

Definition at line 79 of file VectorI.H.

References VectorSpace< Vector< Cmpt >, Cmpt, 3 >::v_, and Vector< Cmpt >::Z.

Cmpt & y (  )  [inline]

Definition at line 85 of file VectorI.H.

References VectorSpace< Vector< Cmpt >, Cmpt, 3 >::v_, and Vector< Cmpt >::X.

Cmpt & z (  )  [inline]

Definition at line 91 of file VectorI.H.

const Vector< Cmpt > & centre ( const Foam::List< Vector< Cmpt > > &   )  const [inline]

Return *this (used for point which is a typedef to Vector<scalar>.

Definition at line 101 of file VectorI.H.

References VectorSpace< Vector< Cmpt >, Cmpt, 3 >::v_, and Vector< Cmpt >::Z.


Member Data Documentation

const char* const typeName [static]

Definition at line 74 of file Vector.H.

const char* componentNames[] [static]

Definition at line 75 of file Vector.H.

const Vector zero [static]

Definition at line 76 of file Vector.H.

const Vector one [static]

Definition at line 77 of file Vector.H.

const Vector max [static]

Definition at line 78 of file Vector.H.

const Vector min [static]

Definition at line 79 of file Vector.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd