16#ifndef dealii_trilinos_parallel_block_vector_h
17#define dealii_trilinos_parallel_block_vector_h
22#ifdef DEAL_II_WITH_TRILINOS
35template <
typename Number>
110 explicit BlockVector(
const std::vector<IndexSet> ¶llel_partitioning,
111 const MPI_Comm &communicator = MPI_COMM_WORLD);
118 BlockVector(
const std::vector<IndexSet> ¶llel_partitioning,
119 const std::vector<IndexSet> &ghost_values,
121 const bool vector_writable =
false);
177 template <
typename Number>
179 operator=(const ::BlockVector<Number> &v);
190 reinit(
const std::vector<IndexSet> ¶llel_partitioning,
191 const MPI_Comm & communicator = MPI_COMM_WORLD,
192 const bool omit_zeroing_entries =
false);
212 reinit(
const std::vector<IndexSet> &partitioning,
213 const std::vector<IndexSet> &ghost_values,
214 const MPI_Comm & communicator = MPI_COMM_WORLD,
215 const bool vector_writable =
false);
298 print(std::ostream & out,
299 const unsigned int precision = 3,
300 const bool scientific =
true,
301 const bool across =
true)
const;
318 const std::vector<IndexSet> ¶llel_partitioning,
321 reinit(parallel_partitioning, communicator,
false);
327 const std::vector<IndexSet> ¶llel_partitioning,
328 const std::vector<IndexSet> &ghost_values,
330 const bool vector_writable)
332 reinit(parallel_partitioning,
368 template <
typename Number>
374 std::vector<size_type> block_sizes(v.n_blocks(), 0);
393 bool ghosted =
block(0).has_ghost_elements();
395 for (
unsigned int i = 0; i < this->
n_blocks(); ++i)
435 namespace LinearOperatorImplementation
448 template <
typename Matrix>
452 bool omit_zeroing_entries)
454 v.
reinit(matrix.locally_owned_range_indices(),
455 matrix.get_mpi_communicator(),
456 omit_zeroing_entries);
459 template <
typename Matrix>
463 bool omit_zeroing_entries)
465 v.
reinit(matrix.locally_owned_domain_indices(),
466 matrix.get_mpi_communicator(),
467 omit_zeroing_entries);
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
#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)
std::vector< MPI::Vector > components
static ::ExceptionBase & ExcNonMatchingBlockVectors()
::internal::BlockVectorIterators::Iterator< BlockVectorBase, true > const_iterator
typename BlockType::reference reference
BlockIndices block_indices
static ::ExceptionBase & ExcInternalError()
BlockType & block(const unsigned int i)
static ::ExceptionBase & ExcIteratorRangeDoesNotMatchVectorSize()
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const
bool has_ghost_elements() const
static void reinit_range_vector(const Matrix &matrix, TrilinosWrappers::MPI::BlockVector &v, bool omit_zeroing_entries)
void swap(BlockVector &v)
BaseClass::BlockType BlockType
BaseClass::const_pointer const_pointer
BaseClass::size_type size_type
void swap(BlockVector &u, BlockVector &v)
void reinit(const std::vector< IndexSet > ¶llel_partitioning, const MPI_Comm &communicator=MPI_COMM_WORLD, const bool omit_zeroing_entries=false)
BaseClass::const_reference const_reference
BlockVector & operator=(const value_type s)
void import_nonlocal_data_for_fe(const TrilinosWrappers::BlockSparseMatrix &m, const BlockVector &v)
static void reinit_domain_vector(const Matrix &matrix, TrilinosWrappers::MPI::BlockVector &v, bool omit_zeroing_entries)
BaseClass::pointer pointer
BaseClass::value_type value_type
BaseClass::reference reference
~BlockVector() override=default