const bool adding=false) const;
/**
- * Return the norm of the vector #v# with
- * respect to the norm induced by this
- * matrix, i.e. $\left(v,Mv\right)$. This
- * is useful, e.g. in the finite element
- * context, where the $L_2$ norm of a
- * function equals the matrix norm with
- * respect to the mass matrix of the vector
- * representing the nodal values of the
- * finite element function.
+ * Return the square of the norm
+ * of the vector #v# with respect
+ * to the norm induced by this
+ * matrix,
+ * i.e. $\left(v,Mv\right)$. This
+ * is useful, e.g. in the finite
+ * element context, where the
+ * $L_2$ norm of a function
+ * equals the matrix norm with
+ * respect to the mass matrix of
+ * the vector representing the
+ * nodal values of the finite
+ * element function.
*
- * Note the order in which the matrix
- * appears. For non-symmetric matrices
- * there is a difference whether the
- * matrix operates on the first
- * or on the second operand of the
- * scalar product.
- *
- * Obviously, the matrix needs to be square
- * for this operation.
+ * Obviously, the matrix needs to
+ * be square for this operation.
*/
template<typename number2>
- double matrix_norm (const Vector<number2> &v) const;
+ number2 matrix_norm_square (const Vector<number2> &v) const;
/**
* Build the matrix scalar product
* the finite element context.
*/
template<typename number2>
- double matrix_scalar_product (const Vector<number2> &u,
- const Vector<number2> &v) const;
+ number2 matrix_scalar_product (const Vector<number2> &u,
+ const Vector<number2> &v) const;
/**
* Return the $l_1$-norm of the matrix, i.e.
template <typename number>
template <typename number2>
-double FullMatrix<number>::matrix_norm (const Vector<number2> &v) const
+number2 FullMatrix<number>::matrix_norm_square (const Vector<number2> &v) const
{
Assert (val != 0, ExcEmptyMatrix());
template <typename number>
template <typename number2>
-double FullMatrix<number>::matrix_scalar_product (const Vector<number2> &u,
- const Vector<number2> &v) const
+number2 FullMatrix<number>::matrix_scalar_product (const Vector<number2> &u,
+ const Vector<number2> &v) const
{
Assert (val != 0, ExcEmptyMatrix());
template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
-template double FullMatrix<TYPEMAT>::matrix_norm (const Vector<TYPEVEC> &) const;
-template double FullMatrix<TYPEMAT>::matrix_scalar_product(const Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
+template TYPEVEC FullMatrix<TYPEMAT>::matrix_norm_square (const Vector<TYPEVEC> &) const;
+template TYPEVEC FullMatrix<TYPEMAT>::matrix_scalar_product(const Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::forward(Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::backward(Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::householder(Vector<TYPEVEC>&);
template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
-template double FullMatrix<TYPEMAT>::matrix_norm (const Vector<TYPEVEC> &) const;
-template double FullMatrix<TYPEMAT>::matrix_scalar_product(const Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
+template TYPEVEC FullMatrix<TYPEMAT>::matrix_norm_square (const Vector<TYPEVEC> &) const;
+template TYPEVEC FullMatrix<TYPEMAT>::matrix_scalar_product(const Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::forward(Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::backward(Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::householder(Vector<TYPEVEC>&);
template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
-template double FullMatrix<TYPEMAT>::matrix_norm (const Vector<TYPEVEC> &) const;
-template double FullMatrix<TYPEMAT>::matrix_scalar_product(const Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
+template TYPEVEC FullMatrix<TYPEMAT>::matrix_norm_square (const Vector<TYPEVEC> &) const;
+template TYPEVEC FullMatrix<TYPEMAT>::matrix_scalar_product(const Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::forward(Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::backward(Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::householder(Vector<TYPEVEC>&);
template void FullMatrix<TYPEMAT>::vmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template void FullMatrix<TYPEMAT>::Tvmult(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const bool) const;
template double FullMatrix<TYPEMAT>::residual(Vector<TYPEVEC>&, const Vector<TYPEVEC>&, const Vector<TYPERES>&) const;
-template double FullMatrix<TYPEMAT>::matrix_norm (const Vector<TYPEVEC> &) const;
-template double FullMatrix<TYPEMAT>::matrix_scalar_product(const Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
+template TYPEVEC FullMatrix<TYPEMAT>::matrix_norm_square (const Vector<TYPEVEC> &) const;
+template TYPEVEC FullMatrix<TYPEMAT>::matrix_scalar_product(const Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::forward(Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::backward(Vector<TYPEVEC>&, const Vector<TYPEVEC>&) const;
template void FullMatrix<TYPEMAT>::householder(Vector<TYPEVEC>&);