From dcc75d500a7dd5ae64cfbbd582955441e4fd71f7 Mon Sep 17 00:00:00 2001
From: young <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Date: Tue, 31 Mar 2009 13:13:45 +0000
Subject: [PATCH] Upgraded: PETSc vector base to migrate to PETSc 3.0.0

git-svn-id: https://svn.dealii.org/trunk@18534 0785d39b-7218-0410-832d-ea1e28bc413d
---
 deal.II/lac/include/lac/petsc_vector_base.h |  8 ++++++++
 deal.II/lac/source/petsc_vector_base.cc     | 11 +++++++++++
 2 files changed, 19 insertions(+)

diff --git a/deal.II/lac/include/lac/petsc_vector_base.h b/deal.II/lac/include/lac/petsc_vector_base.h
index 1889d575e1..1249ac988e 100644
--- a/deal.II/lac/include/lac/petsc_vector_base.h
+++ b/deal.II/lac/include/lac/petsc_vector_base.h
@@ -455,6 +455,14 @@ namespace PETScWrappers
                                         */
       VectorBase & conjugate ();
 
+				       /**
+                                        * A collective piecewise
+					* multiply operation. TODO:
+					* The model for this function
+					* should be similer to add ().
+                                        */
+      VectorBase & mult (); 
+
                                        /**
                                         * Return whether the vector contains
                                         * only elements with value zero. This
diff --git a/deal.II/lac/source/petsc_vector_base.cc b/deal.II/lac/source/petsc_vector_base.cc
index 2acb47d533..95436b78e8 100644
--- a/deal.II/lac/source/petsc_vector_base.cc
+++ b/deal.II/lac/source/petsc_vector_base.cc
@@ -448,6 +448,17 @@ namespace PETScWrappers
 
 
 
+  VectorBase &
+  VectorBase::mult () 
+  {
+    const int ierr = VecPointwiseMult (vector,vector,vector);
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
+
+    return *this;
+  }
+
+
+
   bool
   VectorBase::all_zero () const
   {
-- 
2.39.5