]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix up the norm type of PETSc vectors.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Nov 2007 21:20:06 +0000 (21:20 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 6 Nov 2007 21:20:06 +0000 (21:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@15453 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/petsc_vector_base.h
deal.II/lac/source/petsc_vector_base.cc

index 5dd04ba5e1cea87962bc8f614604da4dbd31c3bd..be949df8c7c983d1743abc3931a497c373a8b91b 100644 (file)
@@ -224,6 +224,7 @@ namespace PETScWrappers
                                         * class.
                                         */
       typedef PetscScalar               value_type;
+      typedef PetscScalar               real_type;
       typedef size_t                    size_type;
       typedef internal::VectorReference reference;
       typedef const internal::VectorReference const_reference;
@@ -393,7 +394,7 @@ namespace PETScWrappers
                                        /**
                                         * Return square of the $l_2$-norm.
                                         */
-      PetscScalar norm_sqr () const;
+      real_type norm_sqr () const;
 
                                        /**
                                         * Mean value of the elements of
@@ -405,14 +406,14 @@ namespace PETScWrappers
                                         * $l_1$-norm of the vector.
                                         * The sum of the absolute values.
                                         */
-      PetscScalar l1_norm () const;
+      real_type l1_norm () const;
 
                                        /**
                                         * $l_2$-norm of the vector.  The
                                         * square root of the sum of the
                                         * squares of the elements.
                                         */
-      PetscScalar l2_norm () const;
+      real_type l2_norm () const;
 
                                        /**
                                         * $l_p$-norm of the vector. The
@@ -420,13 +421,13 @@ namespace PETScWrappers
                                         * powers of the absolute values
                                         * of the elements.
                                         */
-      PetscScalar lp_norm (const PetscScalar p) const;
+      real_type lp_norm (const PetscScalar p) const;
 
                                        /**
                                         * Maximum absolute value of the
                                         * elements.
                                         */
-      PetscScalar linfty_norm () const;
+      real_type linfty_norm () const;
 
                                        /**
                                         * Return whether the vector contains
index b8e9b4dd90ea8858dcc03f2e2d99a5291530df96..41e838b2147146670c602c64ede1f4afe79f6b57 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2004, 2005, 2006 by the deal.II authors
+//    Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -260,7 +260,7 @@ namespace PETScWrappers
 
 
 
-  PetscScalar
+  VectorBase::real_type
   VectorBase::norm_sqr () const
   {
     const PetscScalar d = l2_norm();
@@ -314,7 +314,7 @@ namespace PETScWrappers
   
 
 
-  PetscScalar
+  VectorBase::real_type
   VectorBase::l1_norm () const
   {
     PetscScalar d;
@@ -327,7 +327,7 @@ namespace PETScWrappers
   
 
 
-  PetscScalar
+  VectorBase::real_type
   VectorBase::l2_norm () const
   {
     PetscScalar d;
@@ -340,7 +340,7 @@ namespace PETScWrappers
   
 
 
-  PetscScalar
+  VectorBase::real_type
   VectorBase::lp_norm (const PetscScalar p) const
   {
                                      // get a representation of the vector and
@@ -386,7 +386,7 @@ namespace PETScWrappers
 
 
 
-  PetscScalar
+  VectorBase::real_type
   VectorBase::linfty_norm () const
   {
     PetscScalar d;

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.