16 #ifndef dealii_trilinos_parallel_block_vector_h
17 #define dealii_trilinos_parallel_block_vector_h
22 #ifdef DEAL_II_WITH_TRILINOS
29 # include <functional>
35 template <
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,
121 const MPI_Comm & communicator,
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);
299 print(std::ostream & out,
300 const unsigned int precision = 3,
301 const bool scientific =
true,
302 const bool across =
true)
const;
319 const std::vector<IndexSet> ¶llel_partitioning,
320 const MPI_Comm & communicator)
322 reinit(parallel_partitioning, communicator,
false);
328 const std::vector<IndexSet> ¶llel_partitioning,
329 const std::vector<IndexSet> &ghost_values,
330 const MPI_Comm & communicator,
331 const bool vector_writable)
333 reinit(parallel_partitioning,
354 for (
unsigned int i = 0; i < this->
n_blocks(); ++i)
357 this->collect_sizes();
371 template <
typename Number>
380 if (this->
n_blocks() != v.n_blocks())
384 for (
unsigned int i = 0; i < this->
n_blocks(); ++i)
397 bool ghosted =
block(0).has_ghost_elements();
399 for (
unsigned int i = 0; i < this->
n_blocks(); ++i)
439 namespace LinearOperatorImplementation
452 template <
typename Matrix>
456 bool omit_zeroing_entries)
459 matrix.get_mpi_communicator(),
460 omit_zeroing_entries);
463 template <
typename Matrix>
467 bool omit_zeroing_entries)
470 matrix.get_mpi_communicator(),
471 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
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)
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)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define Assert(cond, exc)
static ::ExceptionBase & ExcIteratorRangeDoesNotMatchVectorSize()
static ::ExceptionBase & ExcNonMatchingBlockVectors()
@ matrix
Contents is actually a matrix.
BlockVector< double > BlockVector
void swap(BlockVector &u, BlockVector &v)
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)