16#ifndef dealii_petsc_block_sparse_matrix_h
17#define dealii_petsc_block_sparse_matrix_h
22#ifdef DEAL_II_WITH_PETSC
117 template <
size_t block_rows,
size_t block_columns>
119 const std::array<std::array<Mat, block_columns>, block_rows> &);
172 reinit(
const std::vector<IndexSet> & rows,
173 const std::vector<IndexSet> & cols,
182 reinit(
const std::vector<IndexSet> & sizes,
278 std::vector<IndexSet>
286 std::vector<IndexSet>
316 operator const Mat &()
const;
362 , petsc_nest_matrix(nullptr)
375 template <
size_t block_rows,
size_t block_columns>
377 const std::array<std::array<Mat, block_columns>, block_rows> &arrayA)
380 this->
reinit(block_rows, block_columns);
381 this->
sub_objects.reinit(block_rows, block_columns);
382 for (
auto r = 0; r < block_rows; ++r)
383 for (
auto c = 0; c < block_columns; ++c)
402 this->
block(r, c) = d;
void Tvmult_nonblock_nonblock(VectorType &dst, const VectorType &src) const
void vmult_nonblock_nonblock(VectorType &dst, const VectorType &src) const
void Tvmult_block_block(BlockVectorType &dst, const BlockVectorType &src) const
const value_type & const_reference
void Tvmult_nonblock_block(VectorType &dst, const BlockVectorType &src) const
unsigned int n_block_rows() const
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, true > > const_iterator
void vmult_block_block(BlockVectorType &dst, const BlockVectorType &src) const
types::global_dof_index size_type
Table< 2, SmartPointer< BlockType, BlockMatrixBase< SparseMatrix > > > sub_objects
typename BlockType::value_type value_type
void vmult_nonblock_block(VectorType &dst, const BlockVectorType &src) const
unsigned int n_block_cols() const
const value_type * const_pointer
MatrixIterator< BlockMatrixIterators::Accessor< BlockMatrixBase, false > > iterator
BlockType & block(const unsigned int row, const unsigned int column)
void vmult_block_nonblock(BlockVectorType &dst, const VectorType &src) const
void Tvmult_block_nonblock(BlockVectorType &dst, const VectorType &src) const
void Tvmult(BlockVector &dst, const BlockVector &src) const
BaseClass::reference reference
~BlockSparseMatrix() override
void vmult(BlockVector &dst, const BlockVector &src) const
void reinit(const size_type n_block_rows, const size_type n_block_columns)
BlockSparseMatrix & operator=(const BlockSparseMatrix &)
BaseClass::pointer pointer
MPI_Comm get_mpi_communicator() const
BaseClass::const_pointer const_pointer
void create_empty_matrices_if_needed()
std::uint64_t n_nonzero_elements() const
BaseClass::BlockType BlockType
std::vector< IndexSet > locally_owned_domain_indices() const
BaseClass::value_type value_type
std::vector< IndexSet > locally_owned_range_indices() const
BaseClass::const_reference const_reference
void compress(VectorOperation::values operation)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
#define Assert(cond, exc)