From: guido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Date: Mon, 6 Mar 2000 21:39:07 +0000 (+0000)
Subject: redundant subscription removed from SparseMatrix
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffedc597243ac9b317554919b52d5a4ddcc1a639;p=dealii-svn.git

redundant subscription removed from SparseMatrix


git-svn-id: https://svn.dealii.org/trunk@2558 0785d39b-7218-0410-832d-ea1e28bc413d
---

diff --git a/deal.II/lac/Todo b/deal.II/lac/Todo
index add3adf645..a90d77d1af 100644
--- a/deal.II/lac/Todo
+++ b/deal.II/lac/Todo
@@ -12,9 +12,3 @@ Why not replace Vector::scale by Vector::operator *= ?
 
 Use the commented-out version in PreconditionBlock::invert_diagblocks
   using the try-catch clauses
-
-
-Someone should take a look at the handling of the sparsity variable
-  in the sparse matrix: it is subscribed to twice (explicitely and 
-  through the subscriptor); the explicit subscription is redundant,
-  but I don't have the time to look into that now.
diff --git a/deal.II/lac/include/lac/sparse_matrix.templates.h b/deal.II/lac/include/lac/sparse_matrix.templates.h
index 170e4bad33..2348d8c66b 100644
--- a/deal.II/lac/include/lac/sparse_matrix.templates.h
+++ b/deal.II/lac/include/lac/sparse_matrix.templates.h
@@ -41,7 +41,6 @@ SparseMatrix<number>::SparseMatrix () :
 
 template <typename number>
 SparseMatrix<number>::SparseMatrix (const SparseMatrix &m) :
-		Subscriptor(),
 		cols(0),
 		val(0),
 		max_len(0)
@@ -70,7 +69,6 @@ SparseMatrix<number>::SparseMatrix (const SparsityPattern &c) :
 		val(0),
 		max_len(0)
 {
-  cols->subscribe ();
   reinit();
 };
 
@@ -78,8 +76,6 @@ SparseMatrix<number>::SparseMatrix (const SparsityPattern &c) :
 template <typename number>
 SparseMatrix<number>::~SparseMatrix ()
 {
-  if (cols != 0)
-    cols->unsubscribe();
   cols = 0;
   
   if (val != 0)
@@ -119,12 +115,7 @@ template <typename number>
 void
 SparseMatrix<number>::reinit (const SparsityPattern &sparsity)
 {
-  if (cols != 0)
-    cols->unsubscribe();
-  
   cols = &sparsity;
-  cols->subscribe();
-  
   reinit ();
 };
 
@@ -133,8 +124,6 @@ template <typename number>
 void
 SparseMatrix<number>::clear ()
 {
-  if (cols != 0)
-    cols->unsubscribe ();
   cols = 0;
   if (val) delete[] val;
   val = 0;