]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Change matrix_norm to matrix_norm_square.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 May 2000 17:09:50 +0000 (17:09 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 May 2000 17:09:50 +0000 (17:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@2814 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/full_matrix.h
deal.II/lac/include/lac/full_matrix.templates.h
deal.II/lac/source/full_matrix.double.cc
deal.II/lac/source/full_matrix.float.cc

index 0ef1df83e40d2dc258a5cf2ee103696567e550c1..fb9b466db686b3b7a76f280b811d2fefa1d64905 100644 (file)
@@ -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<typename number2>
-    double matrix_norm (const Vector<number2> &v) const;
+    number2 matrix_norm_square (const Vector<number2> &v) const;
 
                                     /**
                                      * Build the matrix scalar product
@@ -306,8 +303,8 @@ class FullMatrix : public Subscriptor
                                      * 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.
index 469c7a65d6fe171eedf9bff00b17448f99d0bb95..1039b1b26c5cea36c6c2005c230aa5f9cf8c4f68 100644 (file)
@@ -588,7 +588,7 @@ void FullMatrix<number>::Tmmult (FullMatrix<number2>& dst, const FullMatrix<numb
 
 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());
   
@@ -617,8 +617,8 @@ double FullMatrix<number>::matrix_norm (const Vector<number2> &v) const
 
 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());
   
index 4af35357f1ec7fd3fca3d867cb1b8e06aa98bd0c..f69230e76ec16ddb45449283d9b07485c759ec1b 100644 (file)
@@ -36,8 +36,8 @@ template void FullMatrix<TYPEMAT>::add_diag (const TYPEMAT, const FullMatrix<TYP
 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>&);
@@ -49,8 +49,8 @@ template double FullMatrix<TYPEMAT>::least_squares(Vector<TYPEVEC>&, Vector<TYPE
 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>&);
index ec174e7f2684ac21fb034b5ec060de590142b14f..e5d88d8a9f135780610b6618b7adca8d5d4b1bc0 100644 (file)
@@ -36,8 +36,8 @@ template void FullMatrix<TYPEMAT>::add_diag (const TYPEMAT, const FullMatrix<TYP
 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>&);
@@ -49,8 +49,8 @@ template double FullMatrix<TYPEMAT>::least_squares(Vector<TYPEVEC>&, Vector<TYPE
 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>&);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.