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

Vector2D< Cmpt > Class Template Reference

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

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

List of all members.


Public Types

enum  { rank = 1 }
enum  components { X, Y }
 Component labeling enumeration. More...

Public Member Functions

 Vector2D ()
 Construct null.
 Vector2D (const VectorSpace< Vector2D< Cmpt >, Cmpt, 2 > &)
 Construct given VectorSpace.
 Vector2D (const Cmpt &vx, const Cmpt &vy)
 Construct given two components.
 Vector2D (Istream &)
 Construct from Istream.
const Cmpt & x () const
const Cmpt & y () const
Cmpt & x ()
Cmpt & y ()
scalar perp (const Vector2D< Cmpt > &b) const
 perp dot product (dot product with perpendicular vector)

Static Public Attributes

static const char *const typeName
static const char * componentNames []
static const Vector2D zero
static const Vector2D one
static const Vector2D max
static const Vector2D min

Detailed Description

template<class Cmpt>
class Foam::Vector2D< Cmpt >

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

Source files

Definition at line 47 of file Vector2D.H.


Member Enumeration Documentation

anonymous enum

Enumerator:
rank 

Definition at line 56 of file Vector2D.H.

enum components

Component labeling enumeration.

Enumerator:
X 
Y 

Definition at line 73 of file Vector2D.H.


Constructor & Destructor Documentation

Vector2D (  )  [inline]

Construct null.

Definition at line 27 of file Vector2DI.H.

Vector2D ( const VectorSpace< Vector2D< Cmpt >, Cmpt, 2 > &  vs  )  [inline]

Construct given VectorSpace.

Definition at line 33 of file Vector2DI.H.

Vector2D ( const Cmpt &  vx,
const Cmpt &  vy 
) [inline]

Construct given two components.

Definition at line 41 of file Vector2DI.H.

Vector2D ( Istream &  is  )  [inline]

Construct from Istream.

Definition at line 50 of file Vector2DI.H.

References VectorSpace< Vector2D< Cmpt >, Cmpt, 2 >::v_, Vector2D< Cmpt >::X, and Vector2D< Cmpt >::Y.


Member Function Documentation

const Cmpt & x (  )  const [inline]

Definition at line 59 of file Vector2DI.H.

Referenced by Vector2D< Cmpt >::perp().

Here is the caller graph for this function:

const Cmpt & y (  )  const [inline]

Definition at line 65 of file Vector2DI.H.

References VectorSpace< Vector2D< Cmpt >, Cmpt, 2 >::v_, and Vector2D< Cmpt >::X.

Referenced by Vector2D< Cmpt >::perp().

Here is the caller graph for this function:

Cmpt & x (  )  [inline]

Cmpt & y (  )  [inline]

scalar perp ( const Vector2D< Cmpt > &  b  )  const [inline]

perp dot product (dot product with perpendicular vector)

Definition at line 95 of file Vector2DI.H.

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

Here is the call graph for this function:


Member Data Documentation

const char* const typeName [static]

Definition at line 64 of file Vector2D.H.

const char* componentNames[] [static]

Definition at line 65 of file Vector2D.H.

const Vector2D zero [static]

Definition at line 66 of file Vector2D.H.

const Vector2D one [static]

Definition at line 67 of file Vector2D.H.

const Vector2D max [static]

Definition at line 68 of file Vector2D.H.

const Vector2D min [static]

Definition at line 69 of file Vector2D.H.


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