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>
111 explicit BlockVector(
const std::vector<IndexSet> ¶llel_partitioning,
112 const MPI_Comm communicator = MPI_COMM_WORLD);
119 BlockVector(
const std::vector<IndexSet> ¶llel_partitioning,
120 const std::vector<IndexSet> &ghost_values,
122 const bool vector_writable =
false);
178 template <
typename Number>
180 operator=(const ::BlockVector<Number> &v);
191 reinit(
const std::vector<IndexSet> ¶llel_partitioning,
192 const MPI_Comm communicator = MPI_COMM_WORLD,
193 const bool omit_zeroing_entries =
false);
213 reinit(
const std::vector<IndexSet> &partitioning,
214 const std::vector<IndexSet> &ghost_values,
215 const MPI_Comm communicator = MPI_COMM_WORLD,
216 const bool vector_writable =
false);
230 const std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
232 const bool make_ghosted =
true,
233 const bool vector_writable =
false);
315 print(std::ostream & out,
316 const unsigned int precision = 3,
317 const bool scientific =
true,
318 const bool across =
true)
const;
335 const std::vector<IndexSet> ¶llel_partitioning,
338 reinit(parallel_partitioning, communicator,
false);
344 const std::vector<IndexSet> ¶llel_partitioning,
345 const std::vector<IndexSet> &ghost_values,
347 const bool vector_writable)
349 reinit(parallel_partitioning,
370 for (
unsigned int i = 0; i < this->
n_blocks(); ++i)
387 template <
typename Number>
396 if (this->
n_blocks() != v.n_blocks())
400 for (
unsigned int i = 0; i < this->
n_blocks(); ++i)
413 bool ghosted =
block(0).has_ghost_elements();
415 for (
unsigned int i = 0; i < this->
n_blocks(); ++i)
455 namespace LinearOperatorImplementation
468 template <
typename Matrix>
472 bool omit_zeroing_entries)
474 v.
reinit(matrix.locally_owned_range_indices(),
475 matrix.get_mpi_communicator(),
476 omit_zeroing_entries);
479 template <
typename Matrix>
483 bool omit_zeroing_entries)
485 v.
reinit(matrix.locally_owned_domain_indices(),
486 matrix.get_mpi_communicator(),
487 omit_zeroing_entries);
::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
std::vector< MPI::Vector > components
::internal::BlockVectorIterators::Iterator< BlockVectorBase, true > const_iterator
typename BlockType::reference reference
BlockIndices block_indices
BlockType & block(const unsigned int i)
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const
bool has_ghost_elements() const
void swap(BlockVector &v)
BaseClass::BlockType BlockType
BaseClass::const_pointer const_pointer
void swap(BlockVector &u, BlockVector &v)
BaseClass::const_reference const_reference
BlockVector & operator=(const value_type s)
void reinit(const std::vector< IndexSet > ¶llel_partitioning, const MPI_Comm communicator=MPI_COMM_WORLD, const bool omit_zeroing_entries=false)
void import_nonlocal_data_for_fe(const TrilinosWrappers::BlockSparseMatrix &m, const BlockVector &v)
BaseClass::pointer pointer
BaseClass::value_type value_type
BaseClass::reference reference
~BlockVector() override=default
static void reinit_range_vector(const Matrix &matrix, TrilinosWrappers::MPI::BlockVector &v, bool omit_zeroing_entries)
static void reinit_domain_vector(const Matrix &matrix, TrilinosWrappers::MPI::BlockVector &v, bool omit_zeroing_entries)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define DeclException0(Exception0)
#define Assert(cond, exc)
static ::ExceptionBase & ExcNonMatchingBlockVectors()
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcIteratorRangeDoesNotMatchVectorSize()
void swap(BlockVector &u, BlockVector &v)