17 #ifndef __deal2__petsc_parallel_sparse_matrix_h 18 #define __deal2__petsc_parallel_sparse_matrix_h 20 #include <deal.II/base/config.h> 22 #ifdef DEAL_II_WITH_PETSC 24 # include <deal.II/lac/exceptions.h> 25 # include <deal.II/lac/petsc_matrix_base.h> 26 # include <deal.II/lac/petsc_parallel_vector.h> 199 const size_type local_rows,
200 const size_type local_columns,
201 const size_type n_nonzero_per_row,
240 const size_type local_rows,
241 const size_type local_columns,
242 const std::vector<size_type> &row_lengths,
285 template <
typename SparsityType>
287 const SparsityType &sparsity_pattern,
288 const std::vector<size_type> &local_rows_per_process,
289 const std::vector<size_type> &local_columns_per_process,
290 const unsigned int this_process,
291 const bool preset_nonzero_locations =
true);
329 const size_type local_rows,
330 const size_type local_columns,
331 const size_type n_nonzero_per_row,
345 const size_type local_rows,
346 const size_type local_columns,
347 const std::vector<size_type> &row_lengths,
384 template <
typename SparsityType>
386 const SparsityType &sparsity_pattern,
387 const std::vector<size_type> &local_rows_per_process,
388 const std::vector<size_type> &local_columns_per_process,
389 const unsigned int this_process,
390 const bool preset_nonzero_locations =
true);
398 template <
typename SparsityType>
401 const SparsityType &sparsity_pattern,
418 <<
"The number of local rows " << arg1
419 <<
" must be larger than the total number of rows " << arg2);
483 const size_type local_rows,
484 const size_type local_columns,
485 const size_type n_nonzero_per_row,
493 const size_type local_rows,
494 const size_type local_columns,
495 const std::vector<size_type> &row_lengths,
501 template <
typename SparsityType>
502 void do_reinit (
const SparsityType &sparsity_pattern,
503 const std::vector<size_type> &local_rows_per_process,
504 const std::vector<size_type> &local_columns_per_process,
505 const unsigned int this_process,
506 const bool preset_nonzero_locations);
511 template <
typename SparsityType>
514 const SparsityType &sparsity_pattern);
537 DEAL_II_NAMESPACE_CLOSE
539 #endif // DEAL_II_WITH_PETSC 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)
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)
virtual const MPI_Comm & get_mpi_communicator() const
DeclException2(ExcLocalRowsTooLarge, int, int,<< "The number of local rows "<< arg1<< " must be larger than the total number of rows "<< arg2)
types::global_dof_index size_type
PetscBool is_symmetric(const double tolerance=1.e-12)
static const bool zero_addition_can_be_elided
void copy_from(const SparseMatrix &other)
unsigned int global_dof_index
PetscScalar matrix_norm_square(const Vector &v) const
PetscScalar matrix_scalar_product(const Vector &u, const Vector &v) const
SparseMatrix & operator=(const value_type d)