17 #ifndef __deal2__trilinos_block_sparse_matrix_h 18 #define __deal2__trilinos_block_sparse_matrix_h 21 #include <deal.II/base/config.h> 23 #ifdef DEAL_II_WITH_TRILINOS 25 # include <deal.II/base/table.h> 26 # include <deal.II/base/template_constraints.h> 27 # include <deal.II/lac/block_matrix_base.h> 28 # include <deal.II/lac/trilinos_sparse_matrix.h> 29 # include <deal.II/lac/trilinos_block_vector.h> 30 # include <deal.II/lac/full_matrix.h> 31 # include <deal.II/lac/exceptions.h> 35 # define TrilinosScalar double 96 typedef BaseClass::pointer pointer;
97 typedef BaseClass::const_pointer const_pointer;
98 typedef BaseClass::reference reference;
99 typedef BaseClass::const_reference const_reference;
100 typedef BaseClass::size_type size_type;
185 const size_type n_block_columns);
195 template <
typename BlockSparsityType>
196 void reinit (
const std::vector<Epetra_Map> &input_maps,
197 const BlockSparsityType &block_sparsity_pattern);
207 template <
typename BlockSparsityType>
208 void reinit (
const std::vector<IndexSet> &input_maps,
209 const BlockSparsityType &block_sparsity_pattern,
210 const MPI_Comm &communicator = MPI_COMM_WORLD);
219 template <
typename BlockSparsityType>
220 void reinit (
const BlockSparsityType &block_sparsity_pattern);
233 void reinit (
const std::vector<Epetra_Map> &input_maps,
234 const ::BlockSparseMatrix<double> &deal_ii_sparse_matrix,
235 const double drop_tolerance=1e-13);
252 void reinit (const ::BlockSparseMatrix<double> &deal_ii_sparse_matrix,
253 const double drop_tolerance=1e-13);
306 template <
typename VectorType1,
typename VectorType2>
307 void vmult (VectorType1 &dst,
308 const VectorType2 &src)
const;
315 template <
typename VectorType1,
typename VectorType2>
316 void Tvmult (VectorType1 &dst,
317 const VectorType2 &src)
const;
483 <<
"The blocks [" << arg1 <<
',' << arg2 <<
"] and [" 484 << arg3 <<
',' << arg4 <<
"] have differing row numbers.");
491 <<
"The blocks [" << arg1 <<
',' << arg2 <<
"] and [" 492 << arg3 <<
',' << arg4 <<
"] have differing column numbers.");
499 template <
typename VectorType1,
typename VectorType2>
500 void vmult (VectorType1 &dst,
501 const VectorType2 &src,
502 const bool transpose,
503 const ::internal::bool2type<true>,
504 const ::internal::bool2type<true>)
const;
510 template <
typename VectorType1,
typename VectorType2>
511 void vmult (VectorType1 &dst,
512 const VectorType2 &src,
513 const bool transpose,
514 const ::internal::bool2type<false>,
515 const ::internal::bool2type<true>)
const;
521 template <
typename VectorType1,
typename VectorType2>
522 void vmult (VectorType1 &dst,
523 const VectorType2 &src,
524 const bool transpose,
525 const ::internal::bool2type<true>,
526 const ::internal::bool2type<false>)
const;
533 template <
typename VectorType1,
typename VectorType2>
534 void vmult (VectorType1 &dst,
535 const VectorType2 &src,
536 const bool transpose,
537 const ::internal::bool2type<false>,
538 const ::internal::bool2type<false>)
const;
557 this->
block(r,c) = d;
568 bool compressed =
true;
571 if (
block(row, col).is_compressed() ==
false)
582 template <
typename VectorType1,
typename VectorType2>
586 const VectorType2 &src)
const 588 vmult(dst, src,
false,
595 template <
typename VectorType1,
typename VectorType2>
599 const VectorType2 &src)
const 601 vmult(dst, src,
true,
608 template <
typename VectorType1,
typename VectorType2>
612 const VectorType2 &src,
613 const bool transpose,
617 if (transpose ==
true)
626 template <
typename VectorType1,
typename VectorType2>
630 const VectorType2 &src,
631 const bool transpose,
635 if (transpose ==
true)
643 template <
typename VectorType1,
typename VectorType2>
647 const VectorType2 &src,
648 const bool transpose,
652 if (transpose ==
true)
660 template <
typename VectorType1,
typename VectorType2>
664 const VectorType2 &src,
665 const bool transpose,
669 if (transpose ==
true)
677 DEAL_II_NAMESPACE_CLOSE
679 #endif // DEAL_II_WITH_TRILINOS 681 #endif // __deal2__trilinos_block_sparse_matrix_h
void Tvmult_nonblock_nonblock(VectorType &dst, const VectorType &src) const
void vmult_block_block(BlockVectorType &dst, const BlockVectorType &src) const
void vmult_nonblock_nonblock(VectorType &dst, const VectorType &src) const
BlockMatrixBase< SparseMatrix > BaseClass
void Tvmult_block_nonblock(BlockVectorType &dst, const VectorType &src) const
unsigned int n_block_cols() const
void vmult_block_nonblock(BlockVectorType &dst, const VectorType &src) const
void vmult(VectorType1 &dst, const VectorType2 &src) const
size_type n_nonzero_elements() const
void vmult_nonblock_block(VectorType &dst, const BlockVectorType &src) const
TrilinosScalar residual(MPI::BlockVector &dst, const MPI::BlockVector &x, const MPI::BlockVector &b) 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
BlockSparseMatrix & operator=(const BlockSparseMatrix &)
DeclException4(ExcIncompatibleRowNumbers, int, int, int, int,<< "The blocks ["<< arg1<< ','<< arg2<< "] and ["<< arg3<< ','<< arg4<< "] have differing row numbers.")
void Tvmult_nonblock_block(VectorType &dst, const BlockVectorType &src) const
BaseClass::BlockType BlockType
void Tvmult_block_block(BlockVectorType &dst, const BlockVectorType &src) const
BlockType & block(const unsigned int row, const unsigned int column)
bool is_compressed() const
::ExceptionBase & ExcScalarAssignmentOnlyForZeroValue()
void Tvmult(VectorType1 &dst, const VectorType2 &src) const
unsigned int n_block_rows() const