void vmult (parallel::distributed::Vector<TrilinosScalar> &dst,
const parallel::distributed::Vector<TrilinosScalar> &src) const;
+ /**
+ * Same as before, but working with
+ * deal.II's own vector
+ * class.
+ */
+ void vmult (dealii::Vector<TrilinosScalar> &dst,
+ const dealii::Vector<TrilinosScalar> &src) const;
+
/**
* Matrix-vector multiplication:
* let <i>dst =
void Tvmult (parallel::distributed::Vector<TrilinosScalar> &dst,
const parallel::distributed::Vector<TrilinosScalar> &src) const;
+ /**
+ * Same as before, but working with
+ * deal.II's own vector
+ * class.
+ */
+ void Tvmult (dealii::Vector<TrilinosScalar> &dst,
+ const dealii::Vector<TrilinosScalar> &src) const;
+
/**
* Adding Matrix-vector
* multiplication. Add
+ inline
+ void
+ SparseMatrix::vmult (dealii::Vector<TrilinosScalar> &dst,
+ const dealii::Vector<TrilinosScalar> &src) const
+ {
+ Assert (&src != &dst, ExcSourceEqualsDestination());
+ Assert (matrix->Filled(), ExcMatrixNotCompressed());
+
+ AssertDimension (static_cast<unsigned int>(matrix->DomainMap().NumMyElements()),
+ static_cast<unsigned int>(matrix->DomainMap().NumGlobalElements()));
+ AssertDimension (dst.size(), static_cast<unsigned int>(matrix->RangeMap().NumMyElements()));
+ AssertDimension (src.size(), static_cast<unsigned int>(matrix->DomainMap().NumMyElements()));
+
+ Epetra_Vector tril_dst (View, matrix->RangeMap(), dst.begin());
+ Epetra_Vector tril_src (View, matrix->DomainMap(),
+ const_cast<double *>(src.begin()));
+
+ const int ierr = matrix->Multiply (false, tril_src, tril_dst);
+ Assert (ierr == 0, ExcTrilinosError(ierr));
+ (void)ierr; // removes -Wunused-variable in optimized mode
+ }
+
+
+
inline
void
SparseMatrix::Tvmult (VectorBase &dst,
+ inline
+ void
+ SparseMatrix::Tvmult (dealii::Vector<TrilinosScalar> &dst,
+ const dealii::Vector<TrilinosScalar> &src) const
+ {
+ Assert (&src != &dst, ExcSourceEqualsDestination());
+ Assert (matrix->Filled(), ExcMatrixNotCompressed());
+
+ AssertDimension (static_cast<unsigned int>(matrix->DomainMap().NumMyElements()),
+ static_cast<unsigned int>(matrix->DomainMap().NumGlobalElements()));
+ AssertDimension (dst.size(), static_cast<unsigned int>(matrix->DomainMap().NumMyElements()));
+ AssertDimension (src.size(), static_cast<unsigned int>(matrix->RangeMap().NumMyElements()));
+
+ Epetra_Vector tril_dst (View, matrix->DomainMap(), dst.begin());
+ Epetra_Vector tril_src (View, matrix->RangeMap(),
+ const_cast<double *>(src.begin()));
+
+ const int ierr = matrix->Multiply (true, tril_src, tril_dst);
+ Assert (ierr == 0, ExcTrilinosError(ierr));
+ (void)ierr; // removes -Wunused-variable in optimized mode
+ }
+
+
+
inline
void
SparseMatrix::vmult_add (VectorBase &dst,