 |
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_block_sparse_matrix_h
17 #define dealii_block_sparse_matrix_h
49 template <
typename number>
220 template <
typename block_number>
229 template <
typename block_number,
typename nonblock_number>
232 const Vector<nonblock_number> &src)
const;
238 template <
typename block_number,
typename nonblock_number>
240 vmult(Vector<nonblock_number> & dst,
247 template <
typename nonblock_number>
249 vmult(Vector<nonblock_number> &dst,
const Vector<nonblock_number> &src)
const;
256 template <
typename block_number>
265 template <
typename block_number,
typename nonblock_number>
268 const Vector<nonblock_number> &src)
const;
274 template <
typename block_number,
typename nonblock_number>
283 template <
typename nonblock_number>
286 const Vector<nonblock_number> &src)
const;
300 template <
class BlockVectorType>
303 const BlockVectorType &src,
304 const number omega = 1.)
const;
311 template <
typename number2>
314 const Vector<number2> &src,
315 const number omega = 1.)
const;
344 const unsigned int precision = 3,
345 const bool scientific =
true,
346 const unsigned int width = 0,
347 const char * zero_string =
" ",
348 const double denominator = 1.)
const;
378 template <
typename number>
384 for (
size_type r = 0; r < this->n_block_rows(); ++r)
385 for (
size_type c = 0; c < this->n_block_cols(); ++c)
386 this->block(r, c) =
d;
393 template <
typename number>
394 template <
typename block_number>
399 BaseClass::vmult_block_block(dst, src);
404 template <
typename number>
405 template <
typename block_number,
typename nonblock_number>
410 BaseClass::vmult_block_nonblock(dst, src);
415 template <
typename number>
416 template <
typename block_number,
typename nonblock_number>
421 BaseClass::vmult_nonblock_block(dst, src);
426 template <
typename number>
427 template <
typename nonblock_number>
432 BaseClass::vmult_nonblock_nonblock(dst, src);
437 template <
typename number>
438 template <
typename block_number>
443 BaseClass::Tvmult_block_block(dst, src);
448 template <
typename number>
449 template <
typename block_number,
typename nonblock_number>
454 BaseClass::Tvmult_block_nonblock(dst, src);
459 template <
typename number>
460 template <
typename block_number,
typename nonblock_number>
465 BaseClass::Tvmult_nonblock_block(dst, src);
470 template <
typename number>
471 template <
typename nonblock_number>
476 BaseClass::Tvmult_nonblock_nonblock(dst, src);
481 template <
typename number>
482 template <
class BlockVectorType>
485 const BlockVectorType &src,
486 const number omega)
const
489 Assert(dst.n_blocks() == this->n_block_rows(),
491 Assert(src.n_blocks() == this->n_block_cols(),
496 for (
size_type i = 0; i < this->n_block_rows(); ++i)
497 this->block(i, i).precondition_Jacobi(dst.block(i), src.block(i), omega);
502 template <
typename number>
503 template <
typename number2>
507 const number omega)
const
512 Assert(this->n_block_cols() == 1,
513 ExcMessage(
"This function only works if the matrix has "
515 Assert(this->n_block_rows() == 1,
516 ExcMessage(
"This function only works if the matrix has "
521 this->block(0, 0).precondition_Jacobi(dst, src, omega);
527 #endif // dealii_block_sparse_matrix_h
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, true > > const_iterator
SmartPointer< const BlockSparsityPattern, BlockSparseMatrix< number > > sparsity_pattern
void Tvmult(BlockVector< block_number > &dst, const BlockVector< block_number > &src) const
types::global_dof_index size_type
BlockSparseMatrix()=default
void vmult(Vector< nonblock_number > &dst, const Vector< nonblock_number > &src) const
size_type n_nonzero_elements() const
void vmult(BlockVector< block_number > &dst, const Vector< nonblock_number > &src) const
size_type n_actually_nonzero_elements(const double threshold=0.0) const
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
static ::ExceptionBase & ExcNotQuadratic()
void precondition_Jacobi(BlockVectorType &dst, const BlockVectorType &src, const number omega=1.) const
void Tvmult(BlockVector< block_number > &dst, const Vector< nonblock_number > &src) const
typename BlockType::value_type value_type
typename BaseClass::size_type size_type
const value_type & const_reference
static ::ExceptionBase & ExcMessage(std::string arg1)
void precondition_Jacobi(Vector< number2 > &dst, const Vector< number2 > &src, const number omega=1.) const
BlockSparseMatrix & operator=(const double d)
#define DEAL_II_NAMESPACE_OPEN
void Tvmult(Vector< nonblock_number > &dst, const BlockVector< block_number > &src) const
size_type get_row_length(const size_type row) const
const BlockSparsityPattern & get_sparsity_pattern() const
BlockSparseMatrix(const BlockSparsityPattern &sparsity)
virtual ~BlockSparseMatrix() override
const value_type * const_pointer
virtual void reinit(const BlockSparsityPattern &sparsity)
#define Assert(cond, exc)
SparseMatrix< number > BlockType
#define DeclException0(Exception0)
void vmult(Vector< nonblock_number > &dst, const BlockVector< block_number > &src) const
void print_formatted(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const unsigned int width=0, const char *zero_string=" ", const double denominator=1.) const
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, false > > iterator
static ::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
#define DEAL_II_NAMESPACE_CLOSE
void vmult(BlockVector< block_number > &dst, const BlockVector< block_number > &src) const
static ::ExceptionBase & ExcBlockDimensionMismatch()
void Tvmult(Vector< nonblock_number > &dst, const Vector< nonblock_number > &src) const
std::size_t memory_consumption() const
BlockSparseMatrix & operator=(const BlockSparseMatrix &)