17 #ifndef __deal2__petsc_parallel_vector_h 18 #define __deal2__petsc_parallel_vector_h 21 #include <deal.II/base/config.h> 23 #ifdef DEAL_II_WITH_PETSC 25 # include <deal.II/base/subscriptor.h> 26 # include <deal.II/lac/exceptions.h> 27 # include <deal.II/lac/vector.h> 28 # include <deal.II/lac/petsc_vector_base.h> 29 # include <deal.II/base/index_set.h> 36 template <
typename>
class Vector;
229 template <
typename Number>
231 const ::Vector<Number> &v,
391 template <
typename number>
423 const bool fast =
false);
440 const bool fast =
false);
500 void print (std::ostream &out,
501 const unsigned int precision = 3,
502 const bool scientific =
true,
503 const bool across =
true)
const;
562 template <
typename number>
564 const ::Vector<number> &v,
599 #if DEAL_II_PETSC_VERSION_LT(3,2,0) 600 ierr = VecDestroy (
vector);
602 ierr = VecDestroy (&
vector);
607 ierr = VecCreateSeq (PETSC_COMM_SELF, n, &
vector);
631 ierr = VecGhostUpdateBegin(
vector, INSERT_VALUES, SCATTER_FORWARD);
633 ierr = VecGhostUpdateEnd(
vector, INSERT_VALUES, SCATTER_FORWARD);
641 template <
typename number>
691 for (size_type i=0; i<v.size(); ++i)
694 compress (::VectorOperation::insert);
714 DEAL_II_NAMESPACE_CLOSE
716 #endif // DEAL_II_WITH_PETSC
types::global_dof_index size_type
Vector & operator=(const Vector &v)
bool has_ghost_elements() const
#define AssertThrow(cond, exc)
VectorBase & operator=(const PetscScalar s)
void compress() DEAL_II_DEPRECATED
unsigned int global_dof_index
#define Assert(cond, exc)
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const
static const bool supports_distributed_data
BlockCompressedSparsityPattern CompressedBlockSparsityPattern DEAL_II_DEPRECATED
void reinit(const MPI_Comm &communicator, const size_type N, const size_type local_size, const bool fast=false)
const MPI_Comm & get_mpi_communicator() const
virtual void create_vector(const size_type n, const size_type local_size)
size_type local_size() const
::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
IndexSet locally_owned_elements() const
void swap(Vector &u, Vector &v)