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>
238 template <
typename block_number,
typename nonblock_number>
247 template <
typename nonblock_number>
256 template <
typename block_number>
265 template <
typename block_number,
typename nonblock_number>
274 template <
typename block_number,
typename nonblock_number>
283 template <
typename nonblock_number>
300 template <
typename BlockVectorType>
303 const BlockVectorType &src,
304 const number omega = 1.)
const;
311 template <
typename number2>
315 const number omega = 1.)
const;
346 const unsigned int precision = 3,
347 const bool scientific =
true,
348 const unsigned int width = 0,
349 const char *zero_string =
" ",
350 const double denominator = 1.,
351 const char *separator =
" ")
const;
381 template <
typename number>
387 for (
size_type r = 0; r < this->n_block_rows(); ++r)
388 for (
size_type c = 0; c < this->n_block_cols(); ++c)
389 this->block(r, c) =
d;
396 template <
typename number>
397 template <
typename block_number>
402 BaseClass::vmult_block_block(dst, src);
407 template <
typename number>
408 template <
typename block_number,
typename nonblock_number>
413 BaseClass::vmult_block_nonblock(dst, src);
418 template <
typename number>
419 template <
typename block_number,
typename nonblock_number>
424 BaseClass::vmult_nonblock_block(dst, src);
429 template <
typename number>
430 template <
typename nonblock_number>
435 BaseClass::vmult_nonblock_nonblock(dst, src);
440 template <
typename number>
441 template <
typename block_number>
446 BaseClass::Tvmult_block_block(dst, src);
451 template <
typename number>
452 template <
typename block_number,
typename nonblock_number>
457 BaseClass::Tvmult_block_nonblock(dst, src);
462 template <
typename number>
463 template <
typename block_number,
typename nonblock_number>
468 BaseClass::Tvmult_nonblock_block(dst, src);
473 template <
typename number>
474 template <
typename nonblock_number>
479 BaseClass::Tvmult_nonblock_nonblock(dst, src);
484 template <
typename number>
485 template <
typename BlockVectorType>
488 const BlockVectorType &src,
489 const number omega)
const
492 Assert(dst.n_blocks() == this->n_block_rows(),
494 Assert(src.n_blocks() == this->n_block_cols(),
499 for (
size_type i = 0; i < this->n_block_rows(); ++i)
500 this->block(i, i).precondition_Jacobi(dst.block(i), src.block(i), omega);
505 template <
typename number>
506 template <
typename number2>
510 const number omega)
const
515 Assert(this->n_block_cols() == 1,
516 ExcMessage(
"This function only works if the matrix has "
518 Assert(this->n_block_rows() == 1,
519 ExcMessage(
"This function only works if the matrix has "
524 this->block(0, 0).precondition_Jacobi(dst, src, omega);
SparseMatrix< number > BlockType
const value_type & const_reference
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, true > > const_iterator
types::global_dof_index size_type
typename BlockType::value_type value_type
const value_type * const_pointer
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, false > > iterator
BlockSparseMatrix(const BlockSparsityPattern &sparsity)
typename BaseClass::value_type value_type
typename BaseClass::iterator iterator
typename BaseClass::const_pointer const_pointer
BlockSparseMatrix()=default
virtual void reinit(const BlockSparsityPattern &sparsity)
size_type n_nonzero_elements() const
std::size_t memory_consumption() const
const BlockSparsityPattern & get_sparsity_pattern() const
virtual ~BlockSparseMatrix() override
typename BaseClass::pointer pointer
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 char *separator=" ") const
typename BaseClass::const_reference const_reference
size_type n_actually_nonzero_elements(const double threshold=0.0) const
typename BaseClass::size_type size_type
SmartPointer< const BlockSparsityPattern, BlockSparseMatrix< number > > sparsity_pattern
typename BaseClass::const_iterator const_iterator
void Tvmult(BlockVector< block_number > &dst, const BlockVector< block_number > &src) const
BlockSparseMatrix & operator=(const BlockSparseMatrix &)
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
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
static ::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcNotQuadratic()
static ::ExceptionBase & ExcBlockDimensionMismatch()
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)