PointerMatrixVector< number > Class Template Reference
[Derived matrices]

Inheritance diagram for PointerMatrixVector< number >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PointerMatrixVector (const Vector< number > *M=0)
 PointerMatrixVector (const char *name)
 PointerMatrixVector (const Vector< number > *M, const char *name)
virtual void clear ()
bool empty () const
const PointerMatrixVectoroperator= (const Vector< number > *M)
virtual void vmult (Vector< number > &dst, const Vector< number > &src) const
virtual void Tvmult (Vector< number > &dst, const Vector< number > &src) const
virtual void vmult_add (Vector< number > &dst, const Vector< number > &src) const
virtual void Tvmult_add (Vector< number > &dst, const Vector< number > &src) const

Private Member Functions

virtual const void * get () const

Private Attributes

SmartPointer< const Vector
< number > > 
m

Detailed Description

template<typename number>
class PointerMatrixVector< number >

Implement matrix multiplications for a vector using the PointerMatrixBase functionality. Objects of this class can be used in block matrices.

Implements a matrix with image dimension 1 by using the scalar product (vmult()) and scalar multiplication (Tvmult()) functions of the Vector class.

Author:
Guidl Kanschat, 2006

Constructor & Destructor Documentation

template<typename number >
PointerMatrixVector< number >::PointerMatrixVector ( const Vector< number > *  M = 0  )  [inline]

Constructor. The pointer in the argument is stored in this class. As usual, the lifetime of *M must be longer than the one of the PointerMatrix.

If M is zero, no matrix is stored.

template<typename number >
PointerMatrixVector< number >::PointerMatrixVector ( const char *  name  )  [inline]

Constructor. The name argument is used to identify the SmartPointer for this object.

template<typename number >
PointerMatrixVector< number >::PointerMatrixVector ( const Vector< number > *  M,
const char *  name 
) [inline]

Constructor. M points to a matrix which must live longer than the PointerMatrix. The name argument is used to identify the SmartPointer for this object.


Member Function Documentation

template<typename number >
void PointerMatrixVector< number >::clear (  )  [inline, virtual]

Reset pointer and release the matrix pointed to.

Implements PointerMatrixBase< Vector< number > >.

References PointerMatrixVector< number >::m.

template<typename number >
bool PointerMatrixVector< number >::empty (  )  const [inline]

Return whether the object is empty.

References PointerMatrixVector< number >::m.

template<typename number >
const PointerMatrixVector< number > & PointerMatrixVector< number >::operator= ( const Vector< number > *  M  )  [inline]

Assign a new matrix pointer. Deletes the old pointer and releases its matrix.

See also:
SmartPointer

References PointerMatrixVector< number >::m.

template<typename number >
void PointerMatrixVector< number >::vmult ( Vector< number > &  dst,
const Vector< number > &  src 
) const [inline, virtual]

Matrix-vector product, actually the scalar product of src and the vector representing this matrix.

The dimension of dst is 1, while that of src is the size of the vector representing this matrix.

Implements PointerMatrixBase< Vector< number > >.

References Assert, PointerMatrixVector< number >::m, and Vector< Number >::size().

template<typename number >
void PointerMatrixVector< number >::Tvmult ( Vector< number > &  dst,
const Vector< number > &  src 
) const [inline, virtual]

Tranposed matrix-vector product, actually the multiplication of the vector representing this matrix with src(0).

The dimension of drc is 1, while that of dst is the size of the vector representing this matrix.

Implements PointerMatrixBase< Vector< number > >.

References Assert, Vector< Number >::equ(), PointerMatrixVector< number >::m, and Vector< Number >::size().

template<typename number >
void PointerMatrixVector< number >::vmult_add ( Vector< number > &  dst,
const Vector< number > &  src 
) const [inline, virtual]

Matrix-vector product, adding to dst.

The dimension of dst is 1, while that of src is the size of the vector representing this matrix.

Implements PointerMatrixBase< Vector< number > >.

References Assert, PointerMatrixVector< number >::m, and Vector< Number >::size().

template<typename number >
void PointerMatrixVector< number >::Tvmult_add ( Vector< number > &  dst,
const Vector< number > &  src 
) const [inline, virtual]

Tranposed matrix-vector product, adding to dst.

The dimension of src is 1, while that of dst is the size of the vector representing this matrix.

Implements PointerMatrixBase< Vector< number > >.

References Vector< Number >::add(), Assert, PointerMatrixVector< number >::m, and Vector< Number >::size().

template<typename number >
const void * PointerMatrixVector< number >::get (  )  const [inline, private, virtual]

Return the address of the matrix for comparison.

Implements PointerMatrixBase< Vector< number > >.

References PointerMatrixVector< number >::m.


Member Data Documentation

template<typename number >
SmartPointer<const Vector<number> > PointerMatrixVector< number >::m [private]

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

deal.II documentation generated on Mon Nov 23 22:57:59 2009 by doxygen 1.6.1