Public Member Functions | Private Member Functions | Private Attributes

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 >
, PointerMatrixVector< 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

Definition at line 399 of file pointer_matrix.h.


Constructor & Destructor Documentation

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

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.

Definition at line 987 of file pointer_matrix.h.

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

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

Definition at line 993 of file pointer_matrix.h.

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

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.

Definition at line 999 of file pointer_matrix.h.


Member Function Documentation

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

Reset pointer and release the matrix pointed to.

Implements PointerMatrixBase< Vector< number > >.

Definition at line 1008 of file pointer_matrix.h.

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

Return whether the object is empty.

Definition at line 1025 of file pointer_matrix.h.

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

Definition at line 1016 of file pointer_matrix.h.

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 > >.

Definition at line 1034 of file pointer_matrix.h.

References Assert, StandardExceptions::ExcDimensionMismatch(), StandardExceptions::ExcNotInitialized(), 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 > >.

Definition at line 1047 of file pointer_matrix.h.

References Assert, Vector< Number >::equ(), StandardExceptions::ExcDimensionMismatch(), StandardExceptions::ExcNotInitialized(), 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 > >.

Definition at line 1060 of file pointer_matrix.h.

References Assert, StandardExceptions::ExcDimensionMismatch(), StandardExceptions::ExcNotInitialized(), 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 > >.

Definition at line 1073 of file pointer_matrix.h.

References Vector< Number >::add(), Assert, StandardExceptions::ExcDimensionMismatch(), StandardExceptions::ExcNotInitialized(), 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 > >.

Definition at line 1086 of file pointer_matrix.h.


Member Data Documentation

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

The pointer to the actual matrix.

Definition at line 517 of file pointer_matrix.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:10 by doxygen 1.7.2