16#ifndef dealii_block_vector_h
17#define dealii_block_vector_h
37# ifdef DEAL_II_WITH_TRILINOS
69template <
typename Number>
128 template <typename OtherNumber>
131#ifdef DEAL_II_WITH_TRILINOS
160 template <
typename InputIterator>
162 const InputIterator
first,
163 const InputIterator
end);
218 template <
class Number2>
228#ifdef DEAL_II_WITH_TRILINOS
252 const bool omit_zeroing_entries =
false);
271 reinit(
const std::vector<size_type> &block_sizes,
272 const bool omit_zeroing_entries =
false);
285 const bool omit_zeroing_entries =
false);
300 template <
typename Number2>
303 const bool omit_zeroing_entries =
false);
309 template <
class BlockVector2>
332 const unsigned int precision = 3,
333 const bool scientific =
true,
334 const bool across =
true)
const;
377template <
typename Number>
378template <
typename InputIterator>
380 const InputIterator
first,
381 const InputIterator end)
387 reinit(block_sizes,
true);
388 InputIterator start =
first;
389 for (size_type b = 0; b < block_sizes.size(); ++b)
391 InputIterator end = start;
392 std::advance(end,
static_cast<signed int>(block_sizes[b]));
393 std::copy(start, end, this->block(b).begin());
396 Assert(start == end, ExcIteratorRangeDoesNotMatchVectorSize());
401template <
typename Number>
407 BaseClass::operator=(s);
413template <
typename Number>
418 BaseClass::operator=(v);
424template <
typename Number>
428 BaseClass::operator=(v);
434template <
typename Number>
435template <
typename Number2>
440 BaseClass::operator=(v);
444template <
typename Number>
448 for (size_type i = 0; i < this->
n_blocks(); ++i)
449 this->components[i].
compress(operation);
454template <
typename Number>
463template <
typename Number>
464template <
class BlockVector2>
481template <
typename Number>
491 namespace LinearOperatorImplementation
500 template <
typename number>
504 template <
typename Matrix>
508 bool omit_zeroing_entries)
510 v.
reinit(matrix.get_row_indices(), omit_zeroing_entries);
513 template <
typename Matrix>
517 bool omit_zeroing_entries)
519 v.
reinit(matrix.get_column_indices(), omit_zeroing_entries);
530template <
typename Number>
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
::internal::BlockVectorIterators::Iterator< BlockVectorBase, false > iterator
unsigned int n_blocks() const
const value_type * const_pointer
typename BlockType::const_reference const_reference
types::global_dof_index size_type
typename BlockType::value_type value_type
#define Assert(cond, exc)
#define AssertIsFinite(number)
::internal::BlockVectorIterators::Iterator< BlockVectorBase, true > const_iterator
static void reinit_range_vector(const Matrix &matrix, BlockVector< number > &v, bool omit_zeroing_entries)
typename BlockType::reference reference
static ::ExceptionBase & ExcIteratorRangeDoesNotMatchVectorSize()
static void reinit_domain_vector(const Matrix &matrix, BlockVector< number > &v, bool omit_zeroing_entries)
BlockIndices block_indices
typename BlockType::real_type real_type
Vector< Number > BlockType
BlockVector(const std::vector< size_type > &block_sizes)
typename BaseClass::const_reference const_reference
void reinit(const BlockIndices &block_indices, const bool omit_zeroing_entries=false)
void swap(BlockVector< Number > &v)
typename BaseClass::reference reference
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const
bool has_ghost_elements() const
BlockVector(const TrilinosWrappers::MPI::BlockVector &v)
BlockVector< Number > & operator=(const TrilinosWrappers::MPI::BlockVector &V)
BlockVector< Number > & operator=(const BlockVector< Number2 > &V)
BlockVector(const BlockIndices &block_indices)
BlockVector< Number > & operator=(BlockVector< Number > &&)=default
typename BaseClass::value_type value_type
typename BaseClass::const_pointer const_pointer
BlockVector(const BlockVector< Number > &V)
void block_write(std::ostream &out) const
typename BaseClass::pointer pointer
~BlockVector() override=default
typename BaseClass::BlockType BlockType
BlockVector(const unsigned int n_blocks=0, const size_type block_size=0)
void scale(const BlockVector2 &v)
BlockVector(BlockVector< Number > &&) noexcept=default
void reinit(const std::vector< size_type > &block_sizes, const bool omit_zeroing_entries=false)
typename BaseClass::iterator iterator
void block_read(std::istream &in)
BlockVector & operator=(const value_type s)
typename BaseClass::size_type size_type
BlockVector< Number > & operator=(const Vector< Number > &V)
BlockVector< Number > & operator=(const BlockVector< Number > &v)
BlockVector(const std::vector< size_type > &block_sizes, const InputIterator first, const InputIterator end)
void compress(::VectorOperation::values operation=::VectorOperation::unknown)
void reinit(const unsigned int n_blocks, const size_type block_size=0, const bool omit_zeroing_entries=false)
void swap(BlockVector< Number > &u, BlockVector< Number > &v)
typename BaseClass::const_iterator const_iterator
void reinit(const BlockVector< Number2 > &V, const bool omit_zeroing_entries=false)
typename BaseClass::real_type real_type
std::enable_if< IsBlockVector< VectorType >::value, unsignedint >::type n_blocks(const VectorType &vector)
std::string compress(const std::string &input)
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)