Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Public Member Functions | Private Attributes | Related Functions | List of all members
PointerMatrixAux< MatrixType, VectorType > Class Template Reference

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

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

Public Member Functions

 PointerMatrixAux (VectorMemory< VectorType > *mem=0, const MatrixType *M=0)
 
 PointerMatrixAux (VectorMemory< VectorType > *mem, const char *name)
 
 PointerMatrixAux (VectorMemory< VectorType > *mem, const MatrixType *M, const char *name)
 
virtual void clear () override
 
bool empty () const
 
void set_memory (VectorMemory< VectorType > *mem)
 
const PointerMatrixAuxoperator= (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 (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
template<typename StreamType >
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

GrowingVectorMemory< VectorType > my_memory
 
SmartPointer< VectorMemory< VectorType >, PointerMatrixAux< MatrixType, VectorType > > mem
 
SmartPointer< const MatrixType, PointerMatrixAux< MatrixType, VectorType > > m
 

Related Functions

(Note that these are not member functions.)

template<typename VectorType , typename MatrixType >
PointerMatrixBase< VectorType > * new_pointer_matrix_base (MatrixType &matrix, const VectorType &, const char *name="PointerMatrixAux")
 

Additional Inherited Members

- Public Types inherited from PointerMatrixBase< VectorType >
using value_type = typename VectorType::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 MatrixType, typename VectorType>
class PointerMatrixAux< 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.

This class differs form PointerMatrix by its additional VectorMemory object and by the fact that it implements the functions vmult_add() and Tvmult_add() only using vmult() and Tvmult() of the MatrixType.

Deprecated:
Use LinearOperator instead
Author
Guido Kanschat 2006

Definition at line 232 of file pointer_matrix.h.

Constructor & Destructor Documentation

◆ PointerMatrixAux() [1/3]

template<typename MatrixType , typename VectorType >
PointerMatrixAux< MatrixType, VectorType >::PointerMatrixAux ( VectorMemory< VectorType > *  mem = 0,
const MatrixType *  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 PointerMatrixAux.

If M is zero, no matrix is stored.

If mem is zero, then GrowingVectorMemory is used.

Definition at line 722 of file pointer_matrix.h.

◆ PointerMatrixAux() [2/3]

template<typename MatrixType , typename VectorType >
PointerMatrixAux< MatrixType, VectorType >::PointerMatrixAux ( VectorMemory< VectorType > *  mem,
const char *  name 
)

Constructor not using a matrix.

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

◆ PointerMatrixAux() [3/3]

template<typename MatrixType , typename VectorType >
PointerMatrixAux< MatrixType, VectorType >::PointerMatrixAux ( VectorMemory< VectorType > *  mem,
const MatrixType *  M,
const char *  name 
)

Constructor. M points to a matrix which must live longer than the PointerMatrixAux.

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

Member Function Documentation

◆ clear()

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

Reset the object to its original state.

Implements PointerMatrixBase< VectorType >.

Definition at line 760 of file pointer_matrix.h.

◆ empty()

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

Return whether the object is empty.

Definition at line 788 of file pointer_matrix.h.

◆ set_memory()

template<typename MatrixType , typename VectorType >
void PointerMatrixAux< MatrixType, VectorType >::set_memory ( VectorMemory< VectorType > *  mem)
inline

Assign a new VectorMemory object for getting auxiliary vectors.

Definition at line 777 of file pointer_matrix.h.

◆ operator=()

template<typename MatrixType , typename VectorType >
const PointerMatrixAux< MatrixType, VectorType > & PointerMatrixAux< 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 768 of file pointer_matrix.h.

◆ vmult()

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

Matrix-vector product.

Implements PointerMatrixBase< VectorType >.

Definition at line 797 of file pointer_matrix.h.

◆ Tvmult()

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

Transposed matrix-vector product.

Implements PointerMatrixBase< VectorType >.

Definition at line 810 of file pointer_matrix.h.

◆ vmult_add()

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

Matrix-vector product, adding to dst.

Implements PointerMatrixBase< VectorType >.

Definition at line 823 of file pointer_matrix.h.

◆ Tvmult_add()

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

Transposed matrix-vector product, adding to dst.

Implements PointerMatrixBase< VectorType >.

Definition at line 840 of file pointer_matrix.h.

Member Data Documentation

◆ my_memory

template<typename MatrixType, typename VectorType>
GrowingVectorMemory<VectorType> PointerMatrixAux< MatrixType, VectorType >::my_memory
mutableprivate

The backup memory if none was provided.

Definition at line 325 of file pointer_matrix.h.

◆ mem

template<typename MatrixType, typename VectorType>
SmartPointer<VectorMemory<VectorType>, PointerMatrixAux<MatrixType, VectorType> > PointerMatrixAux< MatrixType, VectorType >::mem
mutableprivate

Object for getting the auxiliary vector.

Definition at line 332 of file pointer_matrix.h.

◆ m

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

The pointer to the actual matrix.

Definition at line 337 of file pointer_matrix.h.


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