]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
reinit allocated tmp vectors fast.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 22 Nov 2001 16:20:34 +0000 (16:20 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 22 Nov 2001 16:20:34 +0000 (16:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@5246 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/2001/c-3-2.html
deal.II/lac/include/lac/filtered_matrix.h
deal.II/lac/include/lac/filtered_matrix.templates.h

index 625ebc1cea5fb1769e831920d34cc1c51c6f8082..68debc745fc92544aad5519472ec6e8d8b8f1d91 100644 (file)
@@ -94,6 +94,15 @@ documentation, etc</a>.
 <h3>lac</h3>
 
 <ol>
+  <li> <p>
+       Fixed: Allocation of temporary vectors in <code
+       class="member">FilteredMatrix::allocate_tmp_vector</code>
+       is now faster since it does no more copy the value of the
+       template vector.
+       <br>
+       (WB 2001/11/22)
+       </p>
+
   <li> <p>
        Fixed: The <code
        class="member">FilteredMatrix::allocate_tmp_vector</code>
index 82a77c9843709d4e9f7249f3c895942caf6dd23a..31bd21758ba212fa29d5fa2ba2efd026a0e8d3b7 100644 (file)
@@ -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 ();
 
index 15344f130598be6c7ab1e34ac7a3723c27021707..7b59c9c662a46f42df95957d6bf7d00bcfd371f0 100644 (file)
@@ -381,7 +381,7 @@ FilteredMatrix<SparseMatrix<double>,Vector<double> >::
 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<SparseMatrix<float>,Vector<float> >::
 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 ();
 };
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.