17#ifdef DEAL_II_WITH_TRILINOS
43 const size_type n_block_columns)
52 this->
sub_objects.reinit(n_block_rows, n_block_columns);
70 template <
typename BlockSparsityPatternType>
73 const std::vector<IndexSet> ¶llel_partitioning,
74 const BlockSparsityPatternType &block_sparsity_pattern,
76 const bool exchange_data)
78 std::vector<Epetra_Map> epetra_maps;
79 for (
size_type i = 0; i < block_sparsity_pattern.n_block_rows(); ++i)
80 epetra_maps.push_back(
81 parallel_partitioning[i].make_trilinos_map(communicator,
false));
83 Assert(epetra_maps.size() == block_sparsity_pattern.n_block_rows(),
85 block_sparsity_pattern.n_block_rows()));
86 Assert(epetra_maps.size() == block_sparsity_pattern.n_block_cols(),
88 block_sparsity_pattern.n_block_cols()));
95 block_sparsity_pattern.n_block_rows()));
98 block_sparsity_pattern.n_block_cols()));
102 reinit(block_sparsity_pattern.n_block_rows(),
103 block_sparsity_pattern.n_block_cols());
114 this->
sub_objects[r][c]->reinit(parallel_partitioning[r],
115 parallel_partitioning[c],
116 block_sparsity_pattern.block(r, c),
124 template <
typename BlockSparsityPatternType>
127 const BlockSparsityPatternType &block_sparsity_pattern)
129 std::vector<IndexSet> parallel_partitioning;
130 for (
size_type i = 0; i < block_sparsity_pattern.n_block_rows(); ++i)
131 parallel_partitioning.emplace_back(
134 reinit(parallel_partitioning, block_sparsity_pattern);
164 const std::vector<IndexSet> ¶llel_partitioning,
165 const ::BlockSparseMatrix<double> &dealii_block_sparse_matrix,
167 const double drop_tolerance)
173 dealii_block_sparse_matrix.n_block_rows()));
176 dealii_block_sparse_matrix.n_block_cols()));
186 this->
sub_objects[r][c]->reinit(parallel_partitioning[r],
187 parallel_partitioning[c],
188 dealii_block_sparse_matrix.block(r,
201 const ::BlockSparseMatrix<double> &dealii_block_sparse_matrix,
202 const double drop_tolerance)
204 Assert(dealii_block_sparse_matrix.n_block_rows() ==
205 dealii_block_sparse_matrix.n_block_cols(),
207 dealii_block_sparse_matrix.n_block_cols()));
208 Assert(dealii_block_sparse_matrix.m() == dealii_block_sparse_matrix.n(),
210 dealii_block_sparse_matrix.n()));
212 std::vector<IndexSet> parallel_partitioning;
213 for (
size_type i = 0; i < dealii_block_sparse_matrix.n_block_rows(); ++i)
214 parallel_partitioning.emplace_back(
217 reinit(parallel_partitioning,
218 dealii_block_sparse_matrix,
237 std::uint64_t n_nonzero = 0;
312 return this->
sub_objects[0][0]->get_mpi_communicator();
327 const ::BlockDynamicSparsityPattern &,
void reinit(const unsigned int n_blocks, const size_type n_elements_per_block)
BlockIndices column_block_indices
unsigned int n_block_rows() const
Table< 2, SmartPointer< BlockType, BlockMatrixBase< SparseMatrix > > > sub_objects
unsigned int n_block_cols() const
BlockIndices row_block_indices
BlockType & block(const unsigned int row, const unsigned int column)
size_type n_block_rows() const
SparsityPatternType & block(const size_type row, const size_type column)
const BlockIndices & get_column_indices() const
size_type n_block_cols() const
const BlockIndices & get_row_indices() const
real_type l2_norm() const
std::size_t n_nonzero_elements() const
~BlockSparseMatrix() override
TrilinosScalar residual(MPI::BlockVector &dst, const MPI::BlockVector &x, const MPI::BlockVector &b) const
MPI_Comm get_mpi_communicator() const
std::uint64_t n_nonzero_elements() const
void reinit(const size_type n_block_rows, const size_type n_block_columns)
BaseClass::BlockType BlockType
void vmult(VectorType1 &dst, const VectorType2 &src) const
real_type l2_norm() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcNotInitialized()
IndexSet complete_index_set(const IndexSet::size_type N)