16 #ifndef dealii_petsc_vector_h 17 # define dealii_petsc_vector_h 20 # include <deal.II/base/config.h> 22 # ifdef DEAL_II_WITH_PETSC 24 # include <deal.II/base/index_set.h> 25 # include <deal.II/base/subscriptor.h> 27 # include <deal.II/lac/exceptions.h> 28 # include <deal.II/lac/petsc_vector_base.h> 29 # include <deal.II/lac/vector.h> 30 # include <deal.II/lac/vector_operation.h> 31 # include <deal.II/lac/vector_type_traits.h> 33 DEAL_II_NAMESPACE_OPEN
202 template <
typename Number>
204 const ::Vector<Number> &v,
302 template <
typename number>
326 const bool omit_zeroing_entries =
false);
338 reinit(
const Vector &v,
const bool omit_zeroing_entries =
false);
381 print(std::ostream & out,
382 const unsigned int precision = 3,
383 const bool scientific =
true,
384 const bool across =
true)
const;
446 template <
typename number>
448 const ::Vector<number> &v,
449 const size_type local_size)
450 : communicator(communicator)
469 template <
typename number>
501 for (size_type i = 0; i < v.size(); ++i)
511 inline const MPI_Comm &
512 Vector::get_mpi_communicator()
const 523 namespace LinearOperatorImplementation
536 template <
typename Matrix>
542 v.
reinit(matrix.locally_owned_range_indices(),
543 matrix.get_mpi_communicator());
546 template <
typename Matrix>
552 v.
reinit(matrix.locally_owned_domain_indices(),
553 matrix.get_mpi_communicator());
573 DEAL_II_NAMESPACE_CLOSE
575 # endif // DEAL_II_WITH_PETSC
virtual void clear() override
Vector< Number > & operator=(const Number s)
VectorBase & operator=(const VectorBase &)=delete
LinearAlgebra::distributed::Vector< Number > Vector
static void reinit_range_vector(const Matrix &matrix, Vector &v, bool omit_zeroing_entries)
static void reinit_domain_vector(const Matrix &matrix, Vector &v, bool omit_zeroing_entries)
void swap(BlockVector &u, BlockVector &v)
size_type local_size() const
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
types::global_dof_index size_type
Vector & operator=(const Vector &v)
unsigned int global_dof_index
const MPI_Comm & get_mpi_communicator() const override
void reinit(const MPI_Comm &communicator, const size_type N, const size_type local_size, const bool omit_zeroing_entries=false)
virtual void create_vector(const size_type n, const size_type local_size)
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const
void swap(Vector &u, Vector &v)