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);
273 has_ghost_elements()
const;
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,
369 template <
typename Number>
375 std::vector<size_type> block_sizes(v.n_blocks(), 0);
394 bool ghosted =
block(0).has_ghost_elements();
396 for (
unsigned int i = 0; i < this->
n_blocks(); ++i)
437 namespace LinearOperatorImplementation
450 template <
typename Matrix>
454 bool omit_zeroing_entries)
456 v.
reinit(matrix.locally_owned_range_indices(),
457 matrix.get_mpi_communicator(),
458 omit_zeroing_entries);
461 template <
typename Matrix>
465 bool omit_zeroing_entries)
467 v.
reinit(matrix.locally_owned_domain_indices(),
468 matrix.get_mpi_communicator(),
469 omit_zeroing_entries);
488 #endif // DEAL_II_WITH_TRILINOS BaseClass::pointer pointer
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
BaseClass::const_pointer const_pointer
static void reinit_range_vector(const Matrix &matrix, TrilinosWrappers::MPI::BlockVector &v, bool omit_zeroing_entries)
Contents is actually a matrix.
types::global_dof_index size_type
void reinit(const std::vector< IndexSet > ¶llel_partitioning, const MPI_Comm &communicator=MPI_COMM_WORLD, const bool omit_zeroing_entries=false)
BlockIndices block_indices
BaseClass::BlockType BlockType
void swap(BlockVector &u, BlockVector &v)
BlockVector< double > BlockVector
#define Assert(cond, exc)
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
#define DeclException0(Exception0)
#define DEAL_II_NAMESPACE_CLOSE
std::vector< MPI::Vector > components
BlockVector & operator=(const value_type s)
unsigned int n_blocks() const
bool has_ghost_elements() const
BaseClass::reference reference
#define DEAL_II_NAMESPACE_OPEN
static void reinit_domain_vector(const Matrix &matrix, TrilinosWrappers::MPI::BlockVector &v, bool omit_zeroing_entries)
BaseClass::const_reference const_reference
typename BlockType::const_reference const_reference
BaseClass::size_type size_type
void swap(BlockVector &v)
BlockType & block(const unsigned int i)
typename BlockType::reference reference
const value_type * const_pointer
BaseClass::value_type value_type
static ::ExceptionBase & ExcInternalError()