16#ifndef dealii_la_parallel_block_vector_h
17#define dealii_la_parallel_block_vector_h
38# ifdef DEAL_II_WITH_PETSC
48# ifdef DEAL_II_WITH_TRILINOS
84 template <
typename Number>
156 template <
typename OtherNumber>
170 const std::vector<IndexSet> &ghost_indices,
191 const std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
193 const MPI_Comm &comm_sm = MPI_COMM_SELF);
223 template <
class Number2>
233#ifdef DEAL_II_WITH_PETSC
245#ifdef DEAL_II_WITH_TRILINOS
274 const bool omit_zeroing_entries =
false);
296 reinit(
const std::vector<size_type> &block_sizes,
297 const bool omit_zeroing_entries =
false);
313 template <
typename Number2>
316 const bool omit_zeroing_entries =
false);
336 reinit(
const std::vector<IndexSet> &local_ranges,
337 const std::vector<IndexSet> &ghost_indices,
344 reinit(
const std::vector<IndexSet> &local_ranges,
362 const std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
364 const MPI_Comm &comm_sm = MPI_COMM_SELF);
374 const std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
376 const bool make_ghosted,
377 const MPI_Comm &comm_sm = MPI_COMM_SELF);
467 template <
typename Number2>
475 template <
typename OtherNumber>
477 add(
const std::vector<size_type> & indices,
478 const ::Vector<OtherNumber> &values);
540 const bool omit_zeroing_entries =
false)
override;
578 std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
579 communication_pattern = {})
override;
584 DEAL_II_DEPRECATED_EARLY
virtual void
587 std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
588 communication_pattern = {})
override
615 template <
typename FullMatrixType>
619 const bool symmetric =
false)
const;
637 template <
typename FullMatrixType>
641 const bool symmetric =
false)
const;
652 template <
typename FullMatrixType>
655 const FullMatrixType &matrix,
656 const Number s = Number(0.),
657 const Number b = Number(1.))
const;
663 add(
const Number a)
override;
685 add(
const std::vector<size_type> &indices,
686 const std::vector<Number> & values);
789 const unsigned int precision = 3,
790 const bool scientific =
true,
791 const bool across =
true)
const override;
833template <
typename Number>
846template <
typename Number>
855# include <deal.II/lac/la_parallel_block_vector.templates.h>
::internal::BlockVectorIterators::Iterator< BlockVectorBase, false > iterator
const value_type * const_pointer
typename BlockType::const_reference const_reference
types::global_dof_index size_type
typename BlockType::value_type value_type
::internal::BlockVectorIterators::Iterator< BlockVectorBase, true > const_iterator
typename BlockType::reference reference
typename BlockType::real_type real_type
Vector< Number > BlockType
void swap(LinearAlgebra::distributed::BlockVector< Number > &u, LinearAlgebra::distributed::BlockVector< Number > &v)
typename BaseClass::value_type value_type
bool has_ghost_elements() const
virtual real_type linfty_norm() const override
void swap(BlockVector< Number > &v)
BlockVector(const size_type num_blocks=0, const size_type block_size=0)
virtual real_type l1_norm() const override
virtual void add(const Number a, const VectorSpaceVector< Number > &V, const Number b, const VectorSpaceVector< Number > &W) override
virtual void add(const std::vector< size_type > &indices, const std::vector< Number > &values)
void reinit(const std::vector< IndexSet > &local_ranges, const MPI_Comm communicator)
virtual void reinit(const VectorSpaceVector< Number > &V, const bool omit_zeroing_entries=false) override
virtual ::IndexSet locally_owned_elements() const override
static constexpr unsigned int communication_block_size
void reinit(const std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > &partitioners, const bool make_ghosted, const MPI_Comm &comm_sm=MPI_COMM_SELF)
real_type norm_sqr() const
virtual ~BlockVector() override=default
virtual void sadd(const Number s, const Number a, const VectorSpaceVector< Number > &V) override
virtual BlockVector< Number > & operator*=(const Number factor) override
virtual BlockVector< Number > & operator/=(const Number factor) override
BlockVector(const std::vector< size_type > &block_sizes)
virtual BlockVector< Number > & operator-=(const VectorSpaceVector< Number > &V) override
virtual void scale(const VectorSpaceVector< Number > &scaling_factors) override
BlockVector(const BlockVector< OtherNumber > &v)
typename BaseClass::iterator iterator
BlockVector(const BlockVector< Number > &V)
void reinit(const size_type num_blocks, const size_type block_size=0, const bool omit_zeroing_entries=false)
virtual std::size_t memory_consumption() const override
virtual Number mean_value() const override
BlockVector< Number > & operator=(const TrilinosWrappers::MPI::BlockVector &trilinos_vec)
BlockVector< Number > & operator=(const PETScWrappers::MPI::BlockVector &petsc_vec)
virtual bool all_zero() const override
void set_ghost_state(const bool ghosted) const
void add(const std::vector< size_type > &indices, const ::Vector< OtherNumber > &values)
BlockVector & operator=(const Vector< Number > &V)
virtual real_type l2_norm() const override
BlockVector(const std::vector< IndexSet > &local_ranges, const MPI_Comm communicator)
virtual Number operator*(const VectorSpaceVector< Number > &V) const override
typename BaseClass::BlockType BlockType
void reinit(const std::vector< IndexSet > &local_ranges, const std::vector< IndexSet > &ghost_indices, const MPI_Comm communicator)
typename BaseClass::size_type size_type
Number multivector_inner_product_with_metric(const FullMatrixType &matrix, const BlockVector< Number > &V, const bool symmetric=false) const
void zero_out_ghost_values() const
virtual BlockVector< Number > & operator+=(const VectorSpaceVector< Number > &V) override
virtual void add(const Number a, const VectorSpaceVector< Number > &V) override
typename BaseClass::const_reference const_reference
real_type lp_norm(const real_type p) const
virtual BlockVector & operator=(const value_type s) override
BlockVector & operator=(const BlockVector< Number2 > &V)
typename BaseClass::real_type real_type
void reinit(const BlockVector< Number2 > &V, const bool omit_zeroing_entries=false)
BlockVector & operator=(const BlockVector &V)
virtual void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const override
void reinit(const std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > &partitioners, const MPI_Comm &comm_sm=MPI_COMM_SELF)
void sadd(const Number s, const BlockVector< Number > &V)
void copy_locally_owned_data_from(const BlockVector< Number2 > &src)
virtual void add(const Number a) override
virtual void import_elements(const LinearAlgebra::ReadWriteVector< Number > &V, VectorOperation::values operation, std::shared_ptr< const Utilities::MPI::CommunicationPatternBase > communication_pattern={}) override
BlockVector(const std::vector< IndexSet > &local_ranges, const std::vector< IndexSet > &ghost_indices, const MPI_Comm communicator)
virtual void equ(const Number a, const VectorSpaceVector< Number > &V) override
BlockVector(const std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > &partitioners, const MPI_Comm &comm_sm=MPI_COMM_SELF)
typename BaseClass::const_pointer const_pointer
typename BaseClass::reference reference
typename BaseClass::const_iterator const_iterator
void multivector_inner_product(FullMatrixType &matrix, const BlockVector< Number > &V, const bool symmetric=false) const
void zero_out_ghosts() const
void update_ghost_values() const
void mmult(BlockVector< Number > &V, const FullMatrixType &matrix, const Number s=Number(0.), const Number b=Number(1.)) const
void reinit(const std::vector< size_type > &block_sizes, const bool omit_zeroing_entries=false)
virtual Number add_and_dot(const Number a, const VectorSpaceVector< Number > &V, const VectorSpaceVector< Number > &W) override
virtual size_type size() const override
virtual void compress(VectorOperation::values operation) override
typename BaseClass::pointer pointer
#define DEAL_II_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
static ::ExceptionBase & ExcVectorTypeNotCompatible()
static ::ExceptionBase & ExcIteratorRangeDoesNotMatchVectorSize()