17 #ifndef __deal2__petsc_sparse_matrix_h
18 #define __deal2__petsc_sparse_matrix_h
21 #include <deal.II/base/config.h>
23 #ifdef DEAL_II_WITH_PETSC
25 # include <deal.II/lac/exceptions.h>
26 # include <deal.II/lac/petsc_matrix_base.h>
140 const std::vector<size_type> &row_lengths,
175 template <
typename SparsityType>
176 explicit SparseMatrix (
const SparsityType &sparsity_pattern,
177 const bool preset_nonzero_locations =
true);
220 const std::vector<size_type> &row_lengths,
271 template <
typename SparsityType>
272 void reinit (
const SparsityType &sparsity_pattern,
273 const bool preset_nonzero_locations =
true);
355 const std::vector<size_type> &row_lengths,
361 template <
typename SparsityType>
362 void do_reinit (
const SparsityType &sparsity_pattern,
363 const bool preset_nonzero_locations);
374 DEAL_II_NAMESPACE_CLOSE
376 #endif // DEAL_II_WITH_PETSC
PetscScalar matrix_scalar_product(const VectorBase &u, const VectorBase &v) const
virtual const MPI_Comm & get_mpi_communicator() const
static const bool zero_addition_can_be_elided
PetscBool is_symmetric(const double tolerance=1.e-12)
PetscScalar matrix_norm_square(const VectorBase &v) const
void do_reinit(const size_type m, const size_type n, const size_type n_nonzero_per_row, const bool is_symmetric=false)
types::global_dof_index size_type
void reinit(const size_type m, const size_type n, const size_type n_nonzero_per_row, const bool is_symmetric=false)
SparseMatrix & operator=(const double d)