15#ifndef dealii_petsc_sparse_matrix_h
16#define dealii_petsc_sparse_matrix_h
21#ifdef DEAL_II_WITH_PETSC
28# include <petscistypes.h>
35template <
typename MatrixType>
122 const std::vector<size_type> &row_lengths,
142 template <
typename SparsityPatternType>
143 explicit SparseMatrix(
const SparsityPatternType &sparsity_pattern,
144 const bool preset_nonzero_locations =
true);
188 const std::vector<size_type> &row_lengths,
216 template <
typename SparsityPatternType>
218 reinit(
const SparsityPatternType &sparsity_pattern,
219 const bool preset_nonzero_locations =
true);
273 const std::vector<size_type> &row_lengths,
279 template <
typename SparsityPatternType>
282 const bool preset_nonzero_locations);
433 template <
typename SparsityPatternType>
435 const SparsityPatternType &sparsity_pattern,
436 const std::vector<size_type> &local_rows_per_process,
437 const std::vector<size_type> &local_columns_per_process,
438 const unsigned int this_process,
439 const bool preset_nonzero_locations =
true);
480 template <
typename SparsityPatternType>
483 const SparsityPatternType &sparsity_pattern,
484 const std::vector<size_type> &local_rows_per_process,
485 const std::vector<size_type> &local_columns_per_process,
486 const unsigned int this_process,
487 const bool preset_nonzero_locations =
true);
495 template <
typename SparsityPatternType>
498 const SparsityPatternType &sparsity_pattern,
507 template <
typename SparsityPatternType>
511 const SparsityPatternType &sparsity_pattern,
531 template <
typename SparsityPatternType>
536 const IndexSet &local_active_columns,
537 const SparsityPatternType &sparsity_pattern,
550 <<
"The number of local rows " << arg1
551 <<
" must be larger than the total number of rows "
626 template <
typename SparsityPatternType>
629 const SparsityPatternType &sparsity_pattern,
630 const std::vector<size_type> &local_rows_per_process,
631 const std::vector<size_type> &local_columns_per_process,
632 const unsigned int this_process,
633 const bool preset_nonzero_locations);
638 template <
typename SparsityPatternType>
643 const SparsityPatternType &sparsity_pattern);
649 template <
typename SparsityPatternType>
655 const IndexSet &local_active_columns,
656 const SparsityPatternType &sparsity_pattern);
SparseMatrix & operator=(const value_type d)
void copy_from(const SparseMatrix &other)
void reinit(const MPI_Comm communicator, const SparsityPatternType &sparsity_pattern, const std::vector< size_type > &local_rows_per_process, const std::vector< size_type > &local_columns_per_process, const unsigned int this_process, const bool preset_nonzero_locations=true)
void mmult(SparseMatrix &C, const SparseMatrix &B, const MPI::Vector &V=MPI::Vector()) const
PetscScalar matrix_scalar_product(const Vector &u, const Vector &v) const
void Tmmult(SparseMatrix &C, const SparseMatrix &B, const MPI::Vector &V=MPI::Vector()) const
PetscScalar matrix_norm_square(const Vector &v) const
IndexSet locally_owned_range_indices() const
void do_reinit(const MPI_Comm comm, const SparsityPatternType &sparsity_pattern, const std::vector< size_type > &local_rows_per_process, const std::vector< size_type > &local_columns_per_process, const unsigned int this_process, const bool preset_nonzero_locations)
IndexSet locally_owned_domain_indices() const
PetscBool is_symmetric(const double tolerance=1.e-12)
void mmult(SparseMatrix &C, const SparseMatrix &B, const MPI::Vector &V=MPI::Vector()) const
void do_reinit(const size_type m, const size_type n, const size_type n_nonzero_per_row, const bool is_symmetric=false)
void Tmmult(SparseMatrix &C, const SparseMatrix &B, const MPI::Vector &V=MPI::Vector()) const
void reinit(const size_type m, const size_type n, const size_type n_nonzero_per_row, const bool is_symmetric=false)
SparseMatrix(const SparseMatrix &)=delete
SparseMatrix & operator=(const SparseMatrix &)=delete
SparseMatrix & operator=(const double d)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcLocalRowsTooLarge(int arg1, int arg2)
#define DeclException2(Exception2, type1, type2, outsequence)
unsigned int global_dof_index
static const bool zero_addition_can_be_elided
static const bool zero_addition_can_be_elided