From ffedc597243ac9b317554919b52d5a4ddcc1a639 Mon Sep 17 00:00:00 2001 From: guido Date: Mon, 6 Mar 2000 21:39:07 +0000 Subject: [PATCH] redundant subscription removed from SparseMatrix git-svn-id: https://svn.dealii.org/trunk@2558 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/Todo | 6 ------ deal.II/lac/include/lac/sparse_matrix.templates.h | 11 ----------- 2 files changed, 17 deletions(-) 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::SparseMatrix () : template SparseMatrix::SparseMatrix (const SparseMatrix &m) : - Subscriptor(), cols(0), val(0), max_len(0) @@ -70,7 +69,6 @@ SparseMatrix::SparseMatrix (const SparsityPattern &c) : val(0), max_len(0) { - cols->subscribe (); reinit(); }; @@ -78,8 +76,6 @@ SparseMatrix::SparseMatrix (const SparsityPattern &c) : template SparseMatrix::~SparseMatrix () { - if (cols != 0) - cols->unsubscribe(); cols = 0; if (val != 0) @@ -119,12 +115,7 @@ template void SparseMatrix::reinit (const SparsityPattern &sparsity) { - if (cols != 0) - cols->unsubscribe(); - cols = &sparsity; - cols->subscribe(); - reinit (); }; @@ -133,8 +124,6 @@ template void SparseMatrix::clear () { - if (cols != 0) - cols->unsubscribe (); cols = 0; if (val) delete[] val; val = 0; -- 2.39.5