16 #include <deal.II/lac/trilinos_parallel_block_vector.h> 18 #ifdef DEAL_II_WITH_TRILINOS 20 #include <deal.II/lac/trilinos_index_access.h> 22 #include <deal.II/lac/trilinos_block_sparse_matrix.h> 25 DEAL_II_NAMESPACE_OPEN
51 for (size_type i=0; i<this->
n_blocks(); ++i)
72 const MPI_Comm &communicator,
73 const bool omit_zeroing_entries)
75 const size_type no_blocks = parallel_partitioning.size();
76 std::vector<size_type> block_sizes (no_blocks);
78 for (size_type i=0; i<no_blocks; ++i)
80 block_sizes[i] = parallel_partitioning[i].size();
87 for (size_type i=0; i<
n_blocks(); ++i)
88 components[i].
reinit(parallel_partitioning[i], communicator, omit_zeroing_entries);
95 const std::vector<IndexSet> &ghost_values,
96 const MPI_Comm &communicator,
97 const bool vector_writable)
99 const size_type no_blocks = parallel_partitioning.size();
100 std::vector<size_type> block_sizes (no_blocks);
102 for (size_type i=0; i<no_blocks; ++i)
104 block_sizes[i] = parallel_partitioning[i].size();
111 for (size_type i=0; i<
n_blocks(); ++i)
113 communicator, vector_writable);
121 const bool omit_zeroing_entries)
127 for (size_type i=0; i<
n_blocks(); ++i)
138 std::vector<size_type> block_sizes (num_blocks, 0);
143 for (size_type i=0; i<this->
n_blocks(); ++i)
167 for (size_type i=0; i<this->n_blocks(); ++i)
168 components[i].import_nonlocal_data_for_fe(m.
block(i,i), v.
block(i));
176 const unsigned int precision,
177 const bool scientific,
178 const bool across)
const 180 for (size_type i=0; i<this->
n_blocks(); ++i)
183 out <<
'C' << i <<
':';
185 out <<
"Component " << i << std::endl;
186 this->
components[i].print(out, precision, scientific, across);
194 DEAL_II_NAMESPACE_CLOSE
BaseClass::value_type value_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
unsigned int n_block_cols() const
void swap(BlockVector &u, BlockVector &v)
const BlockIndices & get_block_indices() const
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
std::vector< MPI::Vector > components
BlockVector & operator=(const value_type s)
unsigned int n_blocks() const
void import_nonlocal_data_for_fe(const TrilinosWrappers::BlockSparseMatrix &m, const BlockVector &v)
BlockType & block(const unsigned int row, const unsigned int column)
unsigned int n_block_rows() const
BlockType & block(const unsigned int i)
BlockVectorBase & operator=(const value_type s)
void print(std::ostream &out, const unsigned int precision=3, const bool scientific=true, const bool across=true) const