From: wolf Date: Mon, 17 Jan 2000 14:34:05 +0000 (+0000) Subject: Move allocation of vectors outside the loop. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=260da28eb4b7db1628fe2ba597104e05d4fd9780;p=dealii-svn.git Move allocation of vectors outside the loop. git-svn-id: https://svn.dealii.org/trunk@2234 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 4f8de920fb..d6f538c474 100644 --- a/deal.II/lac/include/lac/sparse_vanka.templates.h +++ b/deal.II/lac/include/lac/sparse_vanka.templates.h @@ -53,7 +53,9 @@ SparseVanka::operator ()(Vector &dst, = matrix->get_sparsity_pattern(); // space to be used for local systems FullMatrix local_matrix; - + Vector b; + Vector x; + // traverse all rows of the matrix for (unsigned int row=0; row< matrix->m() ; ++row) { @@ -93,8 +95,8 @@ SparseVanka::operator ()(Vector &dst, if (build_matrix) inverses[row]->reinit (row_length, row_length); - Vector b(row_length); - Vector x(row_length); + b.reinit (row_length); + x.reinit (row_length); // mapping between: // 1 column number of all