16 #ifndef dealii__trilinos_block_sparse_matrix_h 17 #define dealii__trilinos_block_sparse_matrix_h 20 #include <deal.II/base/config.h> 22 #ifdef DEAL_II_WITH_TRILINOS 24 # include <deal.II/base/table.h> 25 # include <deal.II/base/template_constraints.h> 26 # include <deal.II/lac/block_matrix_base.h> 27 # include <deal.II/lac/trilinos_sparse_matrix.h> 28 # include <deal.II/lac/trilinos_block_vector.h> 29 # include <deal.II/lac/full_matrix.h> 30 # include <deal.II/lac/exceptions.h> 34 # define TrilinosScalar double 36 DEAL_II_NAMESPACE_OPEN
90 typedef BaseClass::pointer pointer;
91 typedef BaseClass::const_pointer const_pointer;
92 typedef BaseClass::reference reference;
93 typedef BaseClass::const_reference const_reference;
94 typedef BaseClass::size_type size_type;
149 const size_type n_block_columns);
156 template <
typename BlockSparsityPatternType>
157 void reinit (
const std::vector<Epetra_Map> &input_maps,
158 const BlockSparsityPatternType &block_sparsity_pattern,
159 const bool exchange_data =
false);
166 template <
typename BlockSparsityPatternType>
167 void reinit (
const std::vector<IndexSet> &input_maps,
168 const BlockSparsityPatternType &block_sparsity_pattern,
169 const MPI_Comm &communicator = MPI_COMM_WORLD,
170 const bool exchange_data =
false);
177 template <
typename BlockSparsityPatternType>
178 void reinit (
const BlockSparsityPatternType &block_sparsity_pattern);
188 void reinit (
const std::vector<Epetra_Map> &input_maps,
189 const ::BlockSparseMatrix<double> &deal_ii_sparse_matrix,
200 const
double drop_tolerance=1e-13);
257 template <typename VectorType1, typename VectorType2>
258 void vmult (VectorType1 &dst,
259 const VectorType2 &src) const;
266 template <typename VectorType1, typename VectorType2>
267 void Tvmult (VectorType1 &dst,
268 const VectorType2 &src) const;
335 const MPI::
Vector &b) const;
375 << "The blocks [" << arg1 << ',' << arg2 << "] and ["
376 << arg3 << ',' << arg4 << "] have differing row
numbers.");
383 << "The blocks [" << arg1 << ',' << arg2 << "] and ["
384 << arg3 << ',' << arg4 << "] have differing column numbers.");
391 template <typename VectorType1, typename VectorType2>
392 void vmult (VectorType1 &dst,
393 const VectorType2 &src,
394 const
bool transpose,
396 const ::
internal::bool2type<true>) const;
402 template <typename VectorType1, typename VectorType2>
403 void vmult (VectorType1 &dst,
404 const VectorType2 &src,
405 const
bool transpose,
407 const ::
internal::bool2type<true>) const;
413 template <typename VectorType1, typename VectorType2>
414 void vmult (VectorType1 &dst,
415 const VectorType2 &src,
416 const
bool transpose,
418 const ::
internal::bool2type<false>) const;
425 template <typename VectorType1, typename VectorType2>
426 void vmult (VectorType1 &dst,
427 const VectorType2 &src,
428 const
bool transpose,
430 const ::
internal::bool2type<false>) const;
445 Assert (d==0, ExcScalarAssignmentOnlyForZeroValue());
449 this->
block(r,c) = d;
460 bool compressed =
true;
463 if (
block(row, col).is_compressed() ==
false)
474 template <
typename VectorType1,
typename VectorType2>
478 const VectorType2 &src)
const 480 vmult(dst, src,
false,
487 template <
typename VectorType1,
typename VectorType2>
491 const VectorType2 &src)
const 493 vmult(dst, src,
true,
500 template <
typename VectorType1,
typename VectorType2>
504 const VectorType2 &src,
505 const bool transpose,
509 if (transpose ==
true)
518 template <
typename VectorType1,
typename VectorType2>
522 const VectorType2 &src,
523 const bool transpose,
527 if (transpose ==
true)
535 template <
typename VectorType1,
typename VectorType2>
539 const VectorType2 &src,
540 const bool transpose,
544 if (transpose ==
true)
552 template <
typename VectorType1,
typename VectorType2>
556 const VectorType2 &src,
557 const bool transpose,
561 if (transpose ==
true)
569 DEAL_II_NAMESPACE_CLOSE
571 #endif // DEAL_II_WITH_TRILINOS 573 #endif // dealii__trilinos_block_sparse_matrix_h
void vmult_block_nonblock(BlockVectorType &dst, const VectorType &src) const
BlockMatrixBase< SparseMatrix > BaseClass
void vmult_nonblock_block(VectorType &dst, const BlockVectorType &src) const
void Tvmult_block_nonblock(BlockVectorType &dst, const VectorType &src) const
void Tvmult_block_block(BlockVectorType &dst, const BlockVectorType &src) const
void Tvmult_nonblock_block(VectorType &dst, const BlockVectorType &src) const
void vmult_block_block(BlockVectorType &dst, const BlockVectorType &src) const
void Tvmult_nonblock_nonblock(VectorType &dst, const VectorType &src) const
BlockSparseMatrix & operator=(const BlockSparseMatrix &)
BlockDynamicSparsityPattern BlockCompressedSparsityPattern DEAL_II_DEPRECATED
unsigned int n_block_cols() const
void vmult(VectorType1 &dst, const VectorType2 &src) const
#define Assert(cond, exc)
BaseClass::value_type value_type
void reinit(const size_type n_block_rows, const size_type n_block_columns)
BlockType::value_type value_type
bool is_compressed() const
void Tvmult(VectorType1 &dst, const VectorType2 &src) const
DeclException4(ExcIncompatibleRowNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing row numbers.")
std::vector< Epetra_Map > range_partitioner() const DEAL_II_DEPRECATED
BaseClass::BlockType BlockType
void vmult_nonblock_nonblock(VectorType &dst, const VectorType &src) const
std::vector< Epetra_Map > domain_partitioner() const DEAL_II_DEPRECATED
BlockType & block(const unsigned int row, const unsigned int column)
size_type n_nonzero_elements() const
unsigned int n_block_rows() const
TrilinosScalar residual(MPI::BlockVector &dst, const MPI::BlockVector &x, const MPI::BlockVector &b) const