16 #ifndef dealii__la_parallel_block_vector_h 17 #define dealii__la_parallel_block_vector_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 22 #include <deal.II/lac/block_indices.h> 23 #include <deal.II/lac/block_vector_base.h> 24 #include <deal.II/lac/la_parallel_vector.h> 25 #include <deal.II/lac/vector_type_traits.h> 31 DEAL_II_NAMESPACE_OPEN
34 #ifdef DEAL_II_WITH_PETSC 44 #ifdef DEAL_II_WITH_TRILINOS 80 template <
typename Number>
100 typedef typename BaseClass::pointer pointer;
101 typedef typename BaseClass::const_pointer const_pointer;
102 typedef typename BaseClass::reference reference;
103 typedef typename BaseClass::const_reference const_reference;
104 typedef typename BaseClass::size_type size_type;
123 explicit BlockVector (
const size_type num_blocks = 0,
124 const size_type block_size = 0);
133 #ifndef DEAL_II_EXPLICIT_CONSTRUCTOR_BUG 146 template <
typename OtherNumber>
155 BlockVector (
const std::vector<size_type> &block_sizes);
161 BlockVector (
const std::vector<IndexSet> &local_ranges,
162 const std::vector<IndexSet> &ghost_indices,
163 const MPI_Comm communicator);
168 BlockVector (
const std::vector<IndexSet> &local_ranges,
169 const MPI_Comm communicator);
188 template <
class Number2>
198 #ifdef DEAL_II_WITH_PETSC 210 #ifdef DEAL_II_WITH_TRILINOS 236 void reinit (
const size_type num_blocks,
237 const size_type block_size = 0,
238 const bool omit_zeroing_entries =
false);
259 void reinit (
const std::vector<size_type> &N,
260 const bool omit_zeroing_entries=
false);
276 template <
typename Number2>
278 const bool omit_zeroing_entries=
false);
335 template <
typename OtherNumber>
336 void add (
const std::vector<size_type> &indices,
337 const ::Vector<OtherNumber> &values);
343 void sadd (
const Number s,
359 void sadd (
const Number s,
381 real_type
lp_norm (
const real_type p)
const;
438 std_cxx11::shared_ptr<const CommunicationPatternBase> communication_pattern =
439 std_cxx11::shared_ptr<const CommunicationPatternBase> ());
449 virtual void add(
const Number a);
466 virtual void add (
const std::vector<size_type> &indices,
467 const std::vector<Number> &values);
473 virtual void sadd(
const Number s,
const Number a,
492 virtual real_type
l1_norm()
const;
498 virtual real_type
l2_norm()
const;
530 virtual size_type
size()
const;
548 virtual void print(std::ostream &out,
549 const unsigned int precision=3,
550 const bool scientific=
true,
551 const bool across=
true)
const;
593 template <
typename Number>
607 template <
typename Number>
613 DEAL_II_NAMESPACE_CLOSE
616 #include <deal.II/lac/la_parallel_block_vector.templates.h> static ::ExceptionBase & ExcIteratorRangeDoesNotMatchVectorSize()
real_type lp_norm(const real_type p) const
virtual ::IndexSet locally_owned_elements() const
virtual BlockVector< Number > & operator-=(const VectorSpaceVector< Number > &V)
virtual size_type size() const
virtual std::size_t memory_consumption() const
virtual BlockVector< Number > & operator*=(const Number factor)
virtual real_type l2_norm() const
void reinit(const size_type num_blocks, const size_type block_size=0, const bool omit_zeroing_entries=false)
BaseClass::BlockType BlockType
BlockVectorBase< Vector< Number > > BaseClass
static ::ExceptionBase & ExcVectorTypeNotCompatible()
virtual void scale(const VectorSpaceVector< Number > &scaling_factors)
virtual void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const
virtual Number add_and_dot(const Number a, const VectorSpaceVector< Number > &V, const VectorSpaceVector< Number > &W)
virtual BlockVector< Number > & operator/=(const Number factor)
BaseClass::value_type value_type
virtual Number operator*(const VectorSpaceVector< Number > &V) const
virtual real_type l1_norm() const
BlockType::real_type real_type
Vector< Number > BlockType
void swap(LinearAlgebra::distributed::BlockVector< Number > &u, LinearAlgebra::distributed::BlockVector< Number > &v)
#define DeclException0(Exception0)
void swap(BlockVector< Number > &v)
virtual real_type linfty_norm() const
void update_ghost_values() const
Number mean_value() const
BlockVector(const size_type num_blocks=0, const size_type block_size=0)
void equ(const Number a, const BlockVector< Number > &u, const Number b, const BlockVector< Number > &v) 1
void add(const std::vector< size_type > &indices, const ::Vector< OtherNumber > &values)
BlockVector & operator=(const value_type s)
void sadd(const Number s, const BlockVector< Number > &V)
void compress(::VectorOperation::values operation)
bool has_ghost_elements() const
virtual BlockVector< Number > & operator+=(const VectorSpaceVector< Number > &V)