13#ifndef dealii_petsc_sparse_matrix_h
14#define dealii_petsc_sparse_matrix_h
19#ifdef DEAL_II_WITH_PETSC
26# include <petscistypes.h>
35#ifdef DEAL_II_WITH_PETSC
38template <
typename MatrixType>
125 const std::vector<size_type> &row_lengths,
145 template <
typename SparsityPatternType>
146 explicit SparseMatrix(
const SparsityPatternType &sparsity_pattern,
147 const bool preset_nonzero_locations =
true);
191 const std::vector<size_type> &row_lengths,
219 template <
typename SparsityPatternType>
221 reinit(
const SparsityPatternType &sparsity_pattern,
222 const bool preset_nonzero_locations =
true);
276 const std::vector<size_type> &row_lengths,
282 template <
typename SparsityPatternType>
285 const bool preset_nonzero_locations);
436 template <
typename SparsityPatternType>
437 DEAL_II_DEPRECATED_EARLY
439 const SparsityPatternType &sparsity_pattern,
440 const std::vector<size_type> &local_rows_per_process,
441 const std::vector<size_type> &local_columns_per_process,
442 const unsigned int this_process,
443 const bool preset_nonzero_locations =
true);
484 template <
typename SparsityPatternType>
485 DEAL_II_DEPRECATED_EARLY
void
487 const SparsityPatternType &sparsity_pattern,
488 const std::vector<size_type> &local_rows_per_process,
489 const std::vector<size_type> &local_columns_per_process,
490 const unsigned int this_process,
491 const bool preset_nonzero_locations =
true);
499 template <
typename SparsityPatternType>
502 const SparsityPatternType &sparsity_pattern,
511 template <
typename SparsityPatternType>
515 const SparsityPatternType &sparsity_pattern,
535 template <
typename SparsityPatternType>
540 const IndexSet &local_active_columns,
541 const SparsityPatternType &sparsity_pattern,
554 <<
"The number of local rows " << arg1
555 <<
" must be larger than the total number of rows "
630 template <
typename SparsityPatternType>
631 DEAL_II_DEPRECATED_EARLY
void
633 const SparsityPatternType &sparsity_pattern,
634 const std::vector<size_type> &local_rows_per_process,
635 const std::vector<size_type> &local_columns_per_process,
636 const unsigned int this_process,
637 const bool preset_nonzero_locations);
642 template <
typename SparsityPatternType>
647 const SparsityPatternType &sparsity_pattern);
653 template <
typename SparsityPatternType>
659 const IndexSet &local_active_columns,
660 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