16 #ifndef dealii_petsc_parallel_sparse_matrix_h 17 #define dealii_petsc_parallel_sparse_matrix_h 19 #include <deal.II/base/config.h> 21 #ifdef DEAL_II_WITH_PETSC 23 # include <deal.II/lac/exceptions.h> 24 # include <deal.II/lac/petsc_matrix_base.h> 25 # include <deal.II/lac/petsc_parallel_vector.h> 28 DEAL_II_NAMESPACE_OPEN
186 const size_type n_offdiag_nonzero_per_row = 0);
217 const std::vector<size_type> &row_lengths,
219 const std::vector<size_type> &offdiag_row_lengths = std::vector<size_type>());
243 template <
typename SparsityPatternType>
245 const SparsityPatternType &sparsity_pattern,
246 const std::vector<size_type> &local_rows_per_process,
247 const std::vector<size_type> &local_columns_per_process,
248 const unsigned int this_process,
249 const bool preset_nonzero_locations =
true);
285 const size_type n_offdiag_nonzero_per_row = 0);
301 const std::vector<size_type> &row_lengths,
303 const std::vector<size_type> &offdiag_row_lengths = std::vector<size_type>());
324 template <
typename SparsityPatternType>
326 const SparsityPatternType &sparsity_pattern,
327 const std::vector<size_type> &local_rows_per_process,
328 const std::vector<size_type> &local_columns_per_process,
329 const unsigned int this_process,
330 const bool preset_nonzero_locations =
true);
338 template <
typename SparsityPatternType>
341 const SparsityPatternType &sparsity_pattern,
366 <<
"The number of local rows " << arg1
367 <<
" must be larger than the total number of rows " << arg2);
453 const size_type n_offdiag_nonzero_per_row = 0);
466 const std::vector<size_type> &row_lengths,
468 const std::vector<size_type> &offdiag_row_lengths = std::vector<size_type>());
473 template <
typename SparsityPatternType>
474 void do_reinit (
const SparsityPatternType &sparsity_pattern,
475 const std::vector<size_type> &local_rows_per_process,
476 const std::vector<size_type> &local_columns_per_process,
477 const unsigned int this_process,
478 const bool preset_nonzero_locations);
483 template <
typename SparsityPatternType>
486 const SparsityPatternType &sparsity_pattern);
507 DEAL_II_NAMESPACE_CLOSE
509 #endif // DEAL_II_WITH_PETSC static ::ExceptionBase & ExcLocalRowsTooLarge(int arg1, int arg2)
#define DeclException2(Exception2, type1, type2, outsequence)
void copy_from(const SparseMatrix &other)
IndexSet locally_owned_domain_indices() const
void do_reinit(const size_type m, const size_type n, const size_type local_rows, const size_type local_columns, const size_type n_nonzero_per_row, const bool is_symmetric=false, const size_type n_offdiag_nonzero_per_row=0)
types::global_dof_index size_type
virtual const MPI_Comm & get_mpi_communicator() const
PetscBool is_symmetric(const double tolerance=1.e-12)
void mmult(SparseMatrix &C, const SparseMatrix &B, const MPI::Vector &V=MPI::Vector()) const
static const bool zero_addition_can_be_elided
SparseMatrix & operator=(const value_type d)
PetscScalar matrix_scalar_product(const Vector &u, const Vector &v) const
unsigned int global_dof_index
types::global_dof_index size_type
void reinit(const MPI_Comm &communicator, const size_type m, const size_type n, const size_type local_rows, const size_type local_columns, const size_type n_nonzero_per_row, const bool is_symmetric=false, const size_type n_offdiag_nonzero_per_row=0)
IndexSet locally_owned_range_indices() const
void Tmmult(SparseMatrix &C, const SparseMatrix &B, const MPI::Vector &V=MPI::Vector()) const
PetscScalar matrix_norm_square(const Vector &v) const