* running on one processor, since the matrix object is inherently
* distributed. Otherwise, an exception will be thrown.
*/
+ template <typename VectorType>
TrilinosScalar
- residual(MPI::Vector &dst,
- const MPI::Vector &x,
- const MPI::Vector &b) const;
+ residual(VectorType &dst, const VectorType &x, const VectorType &b) const;
/**
* Perform the matrix-matrix multiplication <tt>C = A * B</tt>, or, if an
}
+
+ template <typename VectorType>
+ inline TrilinosScalar
+ SparseMatrix::residual(VectorType &dst,
+ const VectorType &x,
+ const VectorType &b) const
+ {
+ vmult(dst, x);
+ dst -= b;
+ dst *= -1.;
+
+ return dst.l2_norm();
+ }
+
+
namespace internal
{
namespace LinearOperatorImplementation
- TrilinosScalar
- SparseMatrix::residual(MPI::Vector &dst,
- const MPI::Vector &x,
- const MPI::Vector &b) const
- {
- vmult(dst, x);
- dst -= b;
- dst *= -1.;
-
- return dst.l2_norm();
- }
-
-
-
namespace internals
{
using size_type = dealii::types::global_dof_index;