]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add function clear to productmatrix
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 25 Nov 2005 10:06:10 +0000 (10:06 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 25 Nov 2005 10:06:10 +0000 (10:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@11789 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/matrix_lib.h

index 31ea9468be0d9f07b5eb3be0496ec511f400a917..443cd07c264ede492a5aaf150c652f3bc0e8f4cc 100644 (file)
@@ -86,6 +86,9 @@ class ProductMatrix : public PointerMatrixBase<VECTOR>
                                      * Destructor.
                                      */
     ~ProductMatrix();
+
+                                    // Doc in PointerMatrixBase
+    void clear();
     
                                     /**
                                      * Matrix-vector product <i>w =
@@ -479,6 +482,17 @@ ProductMatrix<VECTOR>::~ProductMatrix ()
 }
 
 
+template<class VECTOR>
+void
+ProductMatrix<VECTOR>::clear ()
+{
+  if (m1) delete m1;
+  m1 = 0;
+  if (m2) delete m2;
+  m2 = 0;
+}
+
+
 template<class VECTOR>
 void
 ProductMatrix<VECTOR>::vmult (VECTOR& dst, const VECTOR& src) 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.