From 3d0954ab2db649319f2db5fd3448773c1b817d3b Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 5 May 2000 17:09:50 +0000 Subject: [PATCH] Change matrix_norm to matrix_norm_square. git-svn-id: https://svn.dealii.org/trunk@2814 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/full_matrix.h | 39 +++++++++---------- .../lac/include/lac/full_matrix.templates.h | 6 +-- deal.II/lac/source/full_matrix.double.cc | 8 ++-- deal.II/lac/source/full_matrix.float.cc | 8 ++-- 4 files changed, 29 insertions(+), 32 deletions(-) diff --git a/deal.II/lac/include/lac/full_matrix.h b/deal.II/lac/include/lac/full_matrix.h index 0ef1df83e4..fb9b466db6 100644 --- a/deal.II/lac/include/lac/full_matrix.h +++ b/deal.II/lac/include/lac/full_matrix.h @@ -275,28 +275,25 @@ class FullMatrix : public Subscriptor 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 - double matrix_norm (const Vector &v) const; + number2 matrix_norm_square (const Vector &v) const; /** * Build the matrix scalar product @@ -306,8 +303,8 @@ class FullMatrix : public Subscriptor * the finite element context. */ template - double matrix_scalar_product (const Vector &u, - const Vector &v) const; + number2 matrix_scalar_product (const Vector &u, + const Vector &v) const; /** * Return the $l_1$-norm of the matrix, i.e. diff --git a/deal.II/lac/include/lac/full_matrix.templates.h b/deal.II/lac/include/lac/full_matrix.templates.h index 469c7a65d6..1039b1b26c 100644 --- a/deal.II/lac/include/lac/full_matrix.templates.h +++ b/deal.II/lac/include/lac/full_matrix.templates.h @@ -588,7 +588,7 @@ void FullMatrix::Tmmult (FullMatrix& dst, const FullMatrix template -double FullMatrix::matrix_norm (const Vector &v) const +number2 FullMatrix::matrix_norm_square (const Vector &v) const { Assert (val != 0, ExcEmptyMatrix()); @@ -617,8 +617,8 @@ double FullMatrix::matrix_norm (const Vector &v) const template template -double FullMatrix::matrix_scalar_product (const Vector &u, - const Vector &v) const +number2 FullMatrix::matrix_scalar_product (const Vector &u, + const Vector &v) const { Assert (val != 0, ExcEmptyMatrix()); diff --git a/deal.II/lac/source/full_matrix.double.cc b/deal.II/lac/source/full_matrix.double.cc index 4af35357f1..f69230e76e 100644 --- a/deal.II/lac/source/full_matrix.double.cc +++ b/deal.II/lac/source/full_matrix.double.cc @@ -36,8 +36,8 @@ template void FullMatrix::add_diag (const TYPEMAT, const FullMatrix::vmult(Vector&, const Vector&, const bool) const; template void FullMatrix::Tvmult(Vector&, const Vector&, const bool) const; template double FullMatrix::residual(Vector&, const Vector&, const Vector&) const; -template double FullMatrix::matrix_norm (const Vector &) const; -template double FullMatrix::matrix_scalar_product(const Vector&, const Vector&) const; +template TYPEVEC FullMatrix::matrix_norm_square (const Vector &) const; +template TYPEVEC FullMatrix::matrix_scalar_product(const Vector&, const Vector&) const; template void FullMatrix::forward(Vector&, const Vector&) const; template void FullMatrix::backward(Vector&, const Vector&) const; template void FullMatrix::householder(Vector&); @@ -49,8 +49,8 @@ template double FullMatrix::least_squares(Vector&, Vector::vmult(Vector&, const Vector&, const bool) const; template void FullMatrix::Tvmult(Vector&, const Vector&, const bool) const; template double FullMatrix::residual(Vector&, const Vector&, const Vector&) const; -template double FullMatrix::matrix_norm (const Vector &) const; -template double FullMatrix::matrix_scalar_product(const Vector&, const Vector&) const; +template TYPEVEC FullMatrix::matrix_norm_square (const Vector &) const; +template TYPEVEC FullMatrix::matrix_scalar_product(const Vector&, const Vector&) const; template void FullMatrix::forward(Vector&, const Vector&) const; template void FullMatrix::backward(Vector&, const Vector&) const; template void FullMatrix::householder(Vector&); diff --git a/deal.II/lac/source/full_matrix.float.cc b/deal.II/lac/source/full_matrix.float.cc index ec174e7f26..e5d88d8a9f 100644 --- a/deal.II/lac/source/full_matrix.float.cc +++ b/deal.II/lac/source/full_matrix.float.cc @@ -36,8 +36,8 @@ template void FullMatrix::add_diag (const TYPEMAT, const FullMatrix::vmult(Vector&, const Vector&, const bool) const; template void FullMatrix::Tvmult(Vector&, const Vector&, const bool) const; template double FullMatrix::residual(Vector&, const Vector&, const Vector&) const; -template double FullMatrix::matrix_norm (const Vector &) const; -template double FullMatrix::matrix_scalar_product(const Vector&, const Vector&) const; +template TYPEVEC FullMatrix::matrix_norm_square (const Vector &) const; +template TYPEVEC FullMatrix::matrix_scalar_product(const Vector&, const Vector&) const; template void FullMatrix::forward(Vector&, const Vector&) const; template void FullMatrix::backward(Vector&, const Vector&) const; template void FullMatrix::householder(Vector&); @@ -49,8 +49,8 @@ template double FullMatrix::least_squares(Vector&, Vector::vmult(Vector&, const Vector&, const bool) const; template void FullMatrix::Tvmult(Vector&, const Vector&, const bool) const; template double FullMatrix::residual(Vector&, const Vector&, const Vector&) const; -template double FullMatrix::matrix_norm (const Vector &) const; -template double FullMatrix::matrix_scalar_product(const Vector&, const Vector&) const; +template TYPEVEC FullMatrix::matrix_norm_square (const Vector &) const; +template TYPEVEC FullMatrix::matrix_scalar_product(const Vector&, const Vector&) const; template void FullMatrix::forward(Vector&, const Vector&) const; template void FullMatrix::backward(Vector&, const Vector&) const; template void FullMatrix::householder(Vector&); -- 2.39.5