16#ifndef dealii_petsc_sparse_matrix_h
17#define dealii_petsc_sparse_matrix_h
22#ifdef DEAL_II_WITH_PETSC
29# include <petscistypes.h>
36template <
typename MatrixType>
123 const std::vector<size_type> &row_lengths,
143 template <
typename SparsityPatternType>
144 explicit SparseMatrix(
const SparsityPatternType &sparsity_pattern,
145 const bool preset_nonzero_locations =
true);
189 const std::vector<size_type> &row_lengths,
217 template <
typename SparsityPatternType>
219 reinit(
const SparsityPatternType &sparsity_pattern,
220 const bool preset_nonzero_locations =
true);
274 const std::vector<size_type> &row_lengths,
280 template <
typename SparsityPatternType>
283 const bool preset_nonzero_locations);
434 template <
typename SparsityPatternType>
436 const SparsityPatternType & sparsity_pattern,
437 const std::vector<size_type> &local_rows_per_process,
438 const std::vector<size_type> &local_columns_per_process,
439 const unsigned int this_process,
440 const bool preset_nonzero_locations =
true);
481 template <
typename SparsityPatternType>
484 const SparsityPatternType & sparsity_pattern,
485 const std::vector<size_type> &local_rows_per_process,
486 const std::vector<size_type> &local_columns_per_process,
487 const unsigned int this_process,
488 const bool preset_nonzero_locations =
true);
496 template <
typename SparsityPatternType>
499 const SparsityPatternType &sparsity_pattern,
508 template <
typename SparsityPatternType>
512 const SparsityPatternType &sparsity_pattern,
532 template <
typename SparsityPatternType>
537 const IndexSet & local_active_columns,
538 const SparsityPatternType &sparsity_pattern,
551 <<
"The number of local rows " << arg1
552 <<
" must be larger than the total number of rows "
627 template <
typename SparsityPatternType>
630 const SparsityPatternType & sparsity_pattern,
631 const std::vector<size_type> &local_rows_per_process,
632 const std::vector<size_type> &local_columns_per_process,
633 const unsigned int this_process,
634 const bool preset_nonzero_locations);
639 template <
typename SparsityPatternType>
644 const SparsityPatternType &sparsity_pattern);
650 template <
typename SparsityPatternType>
656 const IndexSet & local_active_columns,
657 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