From: wolf Date: Thu, 22 Nov 2001 16:20:34 +0000 (+0000) Subject: reinit allocated tmp vectors fast. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa9f6faeab1946cb6f52334dd56477a45e702cf4;p=dealii-svn.git reinit allocated tmp vectors fast. git-svn-id: https://svn.dealii.org/trunk@5246 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/2001/c-3-2.html b/deal.II/doc/news/2001/c-3-2.html index 625ebc1cea..68debc745f 100644 --- a/deal.II/doc/news/2001/c-3-2.html +++ b/deal.II/doc/news/2001/c-3-2.html @@ -94,6 +94,15 @@ documentation, etc.

lac

    +
  1. + Fixed: Allocation of temporary vectors in FilteredMatrix::allocate_tmp_vector + is now faster since it does no more copy the value of the + template vector. +
    + (WB 2001/11/22) +

    +
  2. Fixed: The FilteredMatrix::allocate_tmp_vector diff --git a/deal.II/lac/include/lac/filtered_matrix.h b/deal.II/lac/include/lac/filtered_matrix.h index 82a77c9843..31bd21758b 100644 --- a/deal.II/lac/include/lac/filtered_matrix.h +++ b/deal.II/lac/include/lac/filtered_matrix.h @@ -539,7 +539,11 @@ class FilteredMatrix : public Subscriptor * temporary vector. This * function has to be overloaded * for the various template - * parameter choices. + * parameter choices. Since the + * allocated vector will be + * filled by the site that calls + * this function, no + * initialization is necessary. */ void allocate_tmp_vector (); diff --git a/deal.II/lac/include/lac/filtered_matrix.templates.h b/deal.II/lac/include/lac/filtered_matrix.templates.h index 15344f1305..7b59c9c662 100644 --- a/deal.II/lac/include/lac/filtered_matrix.templates.h +++ b/deal.II/lac/include/lac/filtered_matrix.templates.h @@ -381,7 +381,7 @@ FilteredMatrix,Vector >:: allocate_tmp_vector () { tmp_mutex.acquire (); - tmp_vector.reinit (matrix->n()); + tmp_vector.reinit (matrix->n(), true); tmp_mutex.release (); }; @@ -393,7 +393,7 @@ FilteredMatrix,Vector >:: allocate_tmp_vector () { tmp_mutex.acquire (); - tmp_vector.reinit (matrix->n()); + tmp_vector.reinit (matrix->n(), true); tmp_mutex.release (); }; @@ -409,7 +409,7 @@ allocate_tmp_vector () block_sizes[i] = matrix->block(i,i).n(); tmp_mutex.acquire (); - tmp_vector.reinit (block_sizes); + tmp_vector.reinit (block_sizes, true); tmp_mutex.release (); }; @@ -425,7 +425,7 @@ allocate_tmp_vector () block_sizes[i] = matrix->block(i,i).n(); tmp_mutex.acquire (); - tmp_vector.reinit (block_sizes); + tmp_vector.reinit (block_sizes, true); tmp_mutex.release (); };