Reference documentation for deal.II version Git 2ec7f2a 2018-07-19 19:43:15 -0400
Public Member Functions | Private Attributes | Related Functions | List of all members
PointerMatrix< MatrixType, VectorType > Class Template Reference

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

Inheritance diagram for PointerMatrix< MatrixType, VectorType >:
[legend]

Public Member Functions

 PointerMatrix (const MatrixType *M=nullptr)
 
 PointerMatrix (const char *name)
 
 PointerMatrix (const MatrixType *M, const char *name)
 
virtual void clear () override
 
bool empty () const
 
const PointerMatrixoperator= (const MatrixType *M)
 
virtual void vmult (VectorType &dst, const VectorType &src) const override
 
virtual void Tvmult (VectorType &dst, const VectorType &src) const override
 
virtual void vmult_add (VectorType &dst, const VectorType &src) const override
 
virtual void Tvmult_add (VectorType &dst, const VectorType &src) const override
 
- Public Member Functions inherited from PointerMatrixBase< VectorType >
virtual ~PointerMatrixBase () override=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 MatrixType, PointerMatrix< MatrixType, VectorType > > m
 

Related Functions

(Note that these are not member functions.)

template<typename numberv >
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base (const IdentityMatrix &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
 
template<typename numberv , typename numberm >
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base (const FullMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
 
template<typename numberv , typename numberm >
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base (const LAPACKFullMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
 
template<typename numberv , typename numberm >
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base (const SparseMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
 
template<typename VectorType , typename numberm >
PointerMatrixBase< VectorType > * new_pointer_matrix_base (const BlockSparseMatrix< numberm > &matrix, const VectorType &, const char *name="PointerMatrix")
 
template<typename numberv , typename numberm >
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base (const SparseMatrixEZ< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
 
template<typename VectorType , typename numberm >
PointerMatrixBase< VectorType > * new_pointer_matrix_base (const BlockSparseMatrixEZ< numberm > &matrix, const VectorType &, const char *name="PointerMatrix")
 
template<typename numberv , typename numberm , typename BLOCK_VectorType >
PointerMatrixBase< BLOCK_VectorType > * new_pointer_matrix_base (const BlockMatrixArray< numberm, BLOCK_VectorType > &matrix, const BLOCK_VectorType &, const char *name="PointerMatrix")
 
template<typename numberv , typename numberm >
PointerMatrixBase< Vector< numberv > > * new_pointer_matrix_base (const TridiagonalMatrix< numberm > &matrix, const Vector< numberv > &, const char *name="PointerMatrix")
 

Additional Inherited Members

- Public Types inherited from PointerMatrixBase< VectorType >
using value_type = typename VectorType::value_type
 
- Static Public Member Functions inherited from Subscriptor
static::ExceptionBase & ExcInUse (int arg1, std::string arg2, std::string arg3)
 
static::ExceptionBase & ExcNoSubscriber (std::string arg1, std::string arg2)
 

Detailed Description

template<typename MatrixType, typename VectorType>
class PointerMatrix< MatrixType, VectorType >

A pointer to be used as a matrix. This class stores a pointer to a matrix and can be used as a matrix itself in iterative methods.

The main purpose for the existence of this class is its base class, which only has a vector as template argument. Therefore, this interface provides an abstract base class for matrices.

Deprecated:
Use LinearOperator instead
Author
Guido Kanschat 2000, 2001, 2002

Definition at line 128 of file pointer_matrix.h.

Constructor & Destructor Documentation

template<typename MatrixType , typename VectorType >
PointerMatrix< MatrixType, VectorType >::PointerMatrix ( const MatrixType *  M = nullptr)

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

template<typename MatrixType , typename VectorType >
PointerMatrix< MatrixType, VectorType >::PointerMatrix ( 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 639 of file pointer_matrix.h.

template<typename MatrixType , typename VectorType >
PointerMatrix< MatrixType, VectorType >::PointerMatrix ( const MatrixType *  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 645 of file pointer_matrix.h.

Member Function Documentation

template<typename MatrixType , typename VectorType >
void PointerMatrix< MatrixType, VectorType >::clear ( )
inlineoverridevirtual

Reset the object to its original state.

Implements PointerMatrixBase< VectorType >.

Definition at line 653 of file pointer_matrix.h.

template<typename MatrixType , typename VectorType >
bool PointerMatrix< MatrixType, VectorType >::empty ( ) const
inline

Return whether the object is empty.

Definition at line 670 of file pointer_matrix.h.

template<typename MatrixType , typename VectorType >
const PointerMatrix< MatrixType, VectorType > & PointerMatrix< MatrixType, VectorType >::operator= ( const MatrixType *  M)
inline

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

See also
SmartPointer

Definition at line 661 of file pointer_matrix.h.

template<typename MatrixType , typename VectorType >
void PointerMatrix< MatrixType, VectorType >::vmult ( VectorType &  dst,
const VectorType &  src 
) const
inlineoverridevirtual

Matrix-vector product.

Implements PointerMatrixBase< VectorType >.

Definition at line 679 of file pointer_matrix.h.

template<typename MatrixType , typename VectorType >
void PointerMatrix< MatrixType, VectorType >::Tvmult ( VectorType &  dst,
const VectorType &  src 
) const
inlineoverridevirtual

Transposed matrix-vector product.

Implements PointerMatrixBase< VectorType >.

Definition at line 689 of file pointer_matrix.h.

template<typename MatrixType , typename VectorType >
void PointerMatrix< MatrixType, VectorType >::vmult_add ( VectorType &  dst,
const VectorType &  src 
) const
inlineoverridevirtual

Matrix-vector product, adding to dst.

Implements PointerMatrixBase< VectorType >.

Definition at line 699 of file pointer_matrix.h.

template<typename MatrixType , typename VectorType >
void PointerMatrix< MatrixType, VectorType >::Tvmult_add ( VectorType &  dst,
const VectorType &  src 
) const
inlineoverridevirtual

Transposed matrix-vector product, adding to dst.

Implements PointerMatrixBase< VectorType >.

Definition at line 709 of file pointer_matrix.h.

Member Data Documentation

template<typename MatrixType, typename VectorType>
SmartPointer<const MatrixType, PointerMatrix<MatrixType, VectorType> > PointerMatrix< MatrixType, VectorType >::m
private

The pointer to the actual matrix.

Definition at line 211 of file pointer_matrix.h.


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