Reference documentation for deal.II version 9.0.0
Public Member Functions | Private Attributes | List of all members
PointerMatrixVector< number > Class Template Reference

#include <deal.II/lac/pointer_matrix.h>

Inheritance diagram for PointerMatrixVector< number >:
[legend]

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
 
- Public Member Functions inherited from PointerMatrixBase< Vector< number > >
virtual ~PointerMatrixBase ()=default
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void subscribe (const char *identifier=nullptr) const
 
void unsubscribe (const char *identifier=nullptr) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

SmartPointer< const Vector< number >, PointerMatrixVector< number > > m
 

Additional Inherited Members

- Public Types inherited from PointerMatrixBase< Vector< number > >
typedef Vector< number > ::value_type value_type
 
- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

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.

Deprecated:
Use LinearOperator instead
Author
Guido Kanschat, 2006

Definition at line 338 of file pointer_matrix.h.

Constructor & Destructor Documentation

◆ PointerMatrixVector() [1/3]

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 805 of file pointer_matrix.h.

◆ PointerMatrixVector() [2/3]

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

Constructor.

This class internally stores a pointer to a matrix via a SmartPointer object. The SmartPointer class allows to associate a name with the object pointed to that identifies the object that has the pointer, in order to identify objects that still refer to the object pointed to. The name argument to this function is used to this end, i.e., you can in essence assign a name to the current PointerMatrix object.

Definition at line 811 of file pointer_matrix.h.

◆ PointerMatrixVector() [3/3]

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.

This class internally stores a pointer to a matrix via a SmartPointer object. The SmartPointer class allows to associate a name with the object pointed to that identifies the object that has the pointer, in order to identify objects that still refer to the object pointed to. The name argument to this function is used to this end, i.e., you can in essence assign a name to the current PointerMatrix object.

Definition at line 817 of file pointer_matrix.h.

Member Function Documentation

◆ clear()

template<typename number >
void PointerMatrixVector< number >::clear ( )
inlinevirtual

Reset the object to its original state.

Implements PointerMatrixBase< Vector< number > >.

Definition at line 825 of file pointer_matrix.h.

◆ empty()

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

Return whether the object is empty.

Definition at line 842 of file pointer_matrix.h.

◆ operator=()

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 833 of file pointer_matrix.h.

◆ vmult()

template<typename number >
void PointerMatrixVector< number >::vmult ( Vector< number > &  dst,
const Vector< number > &  src 
) const
inlinevirtual

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 851 of file pointer_matrix.h.

◆ Tvmult()

template<typename number >
void PointerMatrixVector< number >::Tvmult ( Vector< number > &  dst,
const Vector< number > &  src 
) const
inlinevirtual

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

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 863 of file pointer_matrix.h.

◆ vmult_add()

template<typename number >
void PointerMatrixVector< number >::vmult_add ( Vector< number > &  dst,
const Vector< number > &  src 
) const
inlinevirtual

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 875 of file pointer_matrix.h.

◆ Tvmult_add()

template<typename number >
void PointerMatrixVector< number >::Tvmult_add ( Vector< number > &  dst,
const Vector< number > &  src 
) const
inlinevirtual

Transposed 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 887 of file pointer_matrix.h.

Member Data Documentation

◆ m

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

The pointer to the actual matrix.

Definition at line 433 of file pointer_matrix.h.


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