Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Public Types | Public Member Functions | List of all members
MatrixBlockVector< MATRIX > Class Template Reference

#include <matrix_block.h>

Inheritance diagram for MatrixBlockVector< MATRIX >:
[legend]

Public Types

typedef types::global_dof_index size_type
 
typedef MatrixBlock< MATRIXvalue_type
 

Public Member Functions

void add (size_type row, size_type column, const std::string &name)
 
void reinit (const BlockSparsityPattern &sparsity)
 
void clear (bool really_clean=false)
 
std::size_t memory_consumption () const
 
const value_typeblock (size_type i) const
 
value_typeblock (size_type i)
 
MATRIXmatrix (size_type i)
 

Additional Inherited Members

- Private Member Functions inherited from NamedData< std_cxx1x::shared_ptr< MatrixBlock< MATRIX > > >
 NamedData ()
 
NamedData
< std_cxx1x::shared_ptr
< MatrixBlock< MATRIX > > > & 
operator= (const NamedData< DATA2 > &other)
 
 DeclException2 (ExcNameMismatch, int, std::string,<< "Name at position "<< arg1<< " is not equal to "<< arg2)
 
 DeclException0 (ExcConstantObject)
 
void add (std_cxx1x::shared_ptr< MatrixBlock< MATRIX > > &v, const std::string &name)
 
void add (const std_cxx1x::shared_ptr< MatrixBlock< MATRIX > > &v, const std::string &name)
 
void merge (NamedData< DATA2 > &)
 
void merge (const NamedData< DATA2 > &)
 
unsigned int size () const
 Number of stored data objects.
 
std_cxx1x::shared_ptr
< MatrixBlock< MATRIX > > & 
operator() (unsigned int i)
 Access to stored data object by index. More...
 
const std_cxx1x::shared_ptr
< MatrixBlock< MATRIX > > & 
operator() (unsigned int i) const
 Read-only access to stored data object by index.
 
const std_cxx1x::shared_ptr
< MatrixBlock< MATRIX > > & 
read (unsigned int i) const
 Read only access for a non-const object.
 
const std::string & name (unsigned int i) const
 Name of object at index.
 
unsigned int find (const std::string &name) const
 Find index of a named object.
 
bool is_const () const
 Returns true if this object contains constant data.
 
void print (OUT &o) const
 List names of stored objects.
 
- Private Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
 DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects.\n"<< "(Additional information: "<< arg3<< ")\n"<< "Note the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "more information on what this error means.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<< arg1)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Detailed Description

template<class MATRIX>
class MatrixBlockVector< MATRIX >

A vector of MatrixBlock, which is implemented using shared pointers, in order to allow for copying and rearranging. Each matrix block can be identified by name.

Author
Baerbel Janssen, Guido Kanschat, 2010

Definition at line 405 of file matrix_block.h.

Member Typedef Documentation

template<class MATRIX>
typedef types::global_dof_index MatrixBlockVector< MATRIX >::size_type

Declare type for container size.

Definition at line 413 of file matrix_block.h.

template<class MATRIX>
typedef MatrixBlock<MATRIX> MatrixBlockVector< MATRIX >::value_type

The type of object stored.

Definition at line 418 of file matrix_block.h.

Member Function Documentation

template<class MATRIX >
void MatrixBlockVector< MATRIX >::add ( size_type  row,
size_type  column,
const std::string &  name 
)
inline

Add a new matrix block at the position (row,column) in the block system.

Definition at line 942 of file matrix_block.h.

template<class MATRIX >
void MatrixBlockVector< MATRIX >::reinit ( const BlockSparsityPattern sparsity)
inline

For matrices using a SparsityPattern, this function reinitializes each matrix in the vector with the correct pattern from the block system.

Definition at line 953 of file matrix_block.h.

template<class MATRIX >
void MatrixBlockVector< MATRIX >::clear ( bool  really_clean = false)
inline

Clears the object.

Since often only clearing of the individual matrices is desired, but not removing the blocks themselves, there is an optional argument. If the argument is missing or false, all matrices will be mepty, but the size of this object and the block positions will not change. If really_clean is true, then the object will contain no blocks at the end.

Definition at line 964 of file matrix_block.h.

template<class MATRIX>
std::size_t MatrixBlockVector< MATRIX >::memory_consumption ( ) const

The memory used by this object.

template<class MATRIX >
const MatrixBlock< MATRIX > & MatrixBlockVector< MATRIX >::block ( size_type  i) const
inline

Access a constant reference to the block at position i.

Definition at line 981 of file matrix_block.h.

template<class MATRIX >
MatrixBlock< MATRIX > & MatrixBlockVector< MATRIX >::block ( size_type  i)
inline

Access a reference to the block at position i.

Definition at line 989 of file matrix_block.h.

template<class MATRIX >
MATRIX & MatrixBlockVector< MATRIX >::matrix ( size_type  i)
inline

Access the matrix at position i for read and write access.

Definition at line 997 of file matrix_block.h.


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