]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Upgraded: PETSc vector base to migrate to PETSc 3.0.0
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Mar 2009 13:13:45 +0000 (13:13 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 Mar 2009 13:13:45 +0000 (13:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@18534 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 1889d575e1eb498c2565ae4d3b963ff3be759496..1249ac988eda235a3111c82b06e579ba8b89ea33 100644 (file)
@@ -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
index 2acb47d53374aed116a866fd7d23434956595d7a..95436b78e8aaa4105ad56c9a43a65127d62986e4 100644 (file)
@@ -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
   {

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.