From: wolf Date: Mon, 17 Jan 2000 22:11:02 +0000 (+0000) Subject: Small clean-ups. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf895dfec8216cd52a2598bd7d8be9d720ae08bb;p=dealii-svn.git Small clean-ups. git-svn-id: https://svn.dealii.org/trunk@2242 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparse_vanka.templates.h b/deal.II/lac/include/lac/sparse_vanka.templates.h index 8b5ad7ca04..25875fd708 100644 --- a/deal.II/lac/include/lac/sparse_vanka.templates.h +++ b/deal.II/lac/include/lac/sparse_vanka.templates.h @@ -52,6 +52,8 @@ SparseVanka::compute_inverses () const SparseMatrixStruct &structure = matrix->get_sparsity_pattern(); + map local_index; + // traverse all rows of the matrix // which are selected for (unsigned int row=0; row< matrix->m() ; ++row) @@ -73,7 +75,7 @@ SparseVanka::compute_inverses () // of each entry simply denotes // all degrees of freedom that // couple with #row#. - map local_index; + local_index.clear (); for (unsigned int i=0; i (structure.column_number(row, i), i)); @@ -93,9 +95,6 @@ SparseVanka::compute_inverses () // irow (including irow itself) const unsigned int irow_length = structure.row_length(irow); - // copy rhs -// b(i) = src(irow); - // for all the DoFs that irow // couples with for (unsigned int j=0; j::compute_inverses () // #row#. const map::const_iterator js = local_index.find(col); - // if not, then still use - // this dof to modify the rhs - // - // note that if so, we already - // have copied the entry above - if (js == local_index.end()) -;//b(i) -= matrix->raw_entry(irow,j) * dst(col); - else - // if so, then build the - // matrix out of it + + if (js != local_index.end()) (*inverses[row])(i,js->second) = matrix->raw_entry(irow,j); }; }; @@ -156,6 +147,8 @@ SparseVanka::operator ()(Vector &dst, Vector b (structure.max_entries_per_row()); Vector x (structure.max_entries_per_row()); + map local_index; + // traverse all rows of the matrix // which are selected for (unsigned int row=0; row< matrix->m() ; ++row) @@ -190,7 +183,7 @@ SparseVanka::operator ()(Vector &dst, // of each entry simply denotes // all degrees of freedom that // couple with #row#. - map local_index; + local_index.clear (); for (unsigned int i=0; i (structure.column_number(row, i), i));