16#ifndef dealii_block_sparse_matrix_h
17#define dealii_block_sparse_matrix_h
48template <
typename number>
219 template <
typename block_number>
228 template <
typename block_number,
typename nonblock_number>
237 template <
typename block_number,
typename nonblock_number>
246 template <
typename nonblock_number>
255 template <
typename block_number>
264 template <
typename block_number,
typename nonblock_number>
273 template <
typename block_number,
typename nonblock_number>
282 template <
typename nonblock_number>
299 template <
class BlockVectorType>
302 const BlockVectorType &src,
303 const number omega = 1.)
const;
310 template <
typename number2>
314 const number omega = 1.)
const;
343 const unsigned int precision = 3,
344 const bool scientific =
true,
345 const unsigned int width = 0,
346 const char * zero_string =
" ",
347 const double denominator = 1.)
const;
377template <
typename number>
383 for (
size_type r = 0; r < this->n_block_rows(); ++r)
384 for (
size_type c = 0; c < this->n_block_cols(); ++c)
385 this->block(r, c) =
d;
392template <
typename number>
393template <
typename block_number>
398 BaseClass::vmult_block_block(dst, src);
403template <
typename number>
404template <
typename block_number,
typename nonblock_number>
409 BaseClass::vmult_block_nonblock(dst, src);
414template <
typename number>
415template <
typename block_number,
typename nonblock_number>
420 BaseClass::vmult_nonblock_block(dst, src);
425template <
typename number>
426template <
typename nonblock_number>
431 BaseClass::vmult_nonblock_nonblock(dst, src);
436template <
typename number>
437template <
typename block_number>
442 BaseClass::Tvmult_block_block(dst, src);
447template <
typename number>
448template <
typename block_number,
typename nonblock_number>
453 BaseClass::Tvmult_block_nonblock(dst, src);
458template <
typename number>
459template <
typename block_number,
typename nonblock_number>
464 BaseClass::Tvmult_nonblock_block(dst, src);
469template <
typename number>
470template <
typename nonblock_number>
475 BaseClass::Tvmult_nonblock_nonblock(dst, src);
480template <
typename number>
481template <
class BlockVectorType>
484 const BlockVectorType &src,
485 const number omega)
const
488 Assert(dst.n_blocks() == this->n_block_rows(),
490 Assert(src.n_blocks() == this->n_block_cols(),
495 for (
size_type i = 0; i < this->n_block_rows(); ++i)
496 this->block(i, i).precondition_Jacobi(dst.block(i), src.block(i), omega);
501template <
typename number>
502template <
typename number2>
506 const number omega)
const
511 Assert(this->n_block_cols() == 1,
512 ExcMessage(
"This function only works if the matrix has "
514 Assert(this->n_block_rows() == 1,
515 ExcMessage(
"This function only works if the matrix has "
520 this->block(0, 0).precondition_Jacobi(dst, src, omega);
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
static ::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
#define Assert(cond, exc)
SmartPointer< const BlockSparsityPattern, BlockSparseMatrix< number > > sparsity_pattern
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcBlockDimensionMismatch()
static ::ExceptionBase & ExcNotQuadratic()
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 & ExcMessage(std::string arg1)
BlockSparseMatrix(const BlockSparsityPattern &sparsity)
typename BaseClass::value_type value_type
typename BaseClass::iterator iterator
typename BaseClass::const_pointer const_pointer
SparseMatrix< number > BlockType
BlockSparseMatrix()=default
virtual void reinit(const BlockSparsityPattern &sparsity)
size_type n_nonzero_elements() const
const value_type & const_reference
void precondition_Jacobi(Vector< number2 > &dst, const Vector< number2 > &src, const number omega=1.) const
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, true > > const_iterator
std::size_t memory_consumption() const
void vmult(BlockVector< block_number > &dst, const Vector< nonblock_number > &src) const
void Tvmult(Vector< nonblock_number > &dst, const Vector< nonblock_number > &src) const
types::global_dof_index size_type
typename BlockType::value_type value_type
virtual ~BlockSparseMatrix() override
typename BaseClass::pointer pointer
BlockSparseMatrix & operator=(const BlockSparseMatrix &)
const value_type * const_pointer
typename BaseClass::const_reference const_reference
size_type n_actually_nonzero_elements(const double threshold=0.0) const
void Tvmult(Vector< nonblock_number > &dst, const BlockVector< block_number > &src) const
typename BaseClass::size_type size_type
void vmult(Vector< nonblock_number > &dst, const BlockVector< block_number > &src) const
void vmult(Vector< nonblock_number > &dst, const Vector< nonblock_number > &src) const
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, false > > iterator
typename BaseClass::const_iterator const_iterator
void Tvmult(BlockVector< block_number > &dst, const BlockVector< block_number > &src) const
void Tvmult(BlockVector< block_number > &dst, const Vector< nonblock_number > &src) const
void vmult(BlockVector< block_number > &dst, const BlockVector< block_number > &src) const
typename BaseClass::BlockType BlockType
typename BaseClass::reference reference
size_type get_row_length(const size_type row) const
void precondition_Jacobi(BlockVectorType &dst, const BlockVectorType &src, const number omega=1.) const
BlockSparseMatrix & operator=(const double d)
const BlockSparsityPattern & get_sparsity_pattern() const
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)