]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make the default value of preset_nonzero_locations = true.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 4 Apr 2005 18:40:20 +0000 (18:40 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 4 Apr 2005 18:40:20 +0000 (18:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@10344 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.html
deal.II/lac/include/lac/petsc_parallel_sparse_matrix.h

index 66c1ef43cb74309c0acf0903db0b4e6e9be54646..f8b50394a9e0e864afa846b27aa5336155b4a984 100644 (file)
@@ -230,6 +230,19 @@ inconvenience this causes.
 <h3>lac</h3>
 
 <ol>
+  <li> <p>
+       Fixed: The <code class="class">PETScWrappers::MPI::SparseMatrix</code>
+       class had functions that allow to take a pre-existing sparsity pattern
+       as the basis for entry allocation. These function had an option to
+       allow pre-setting these entries in the underlying data structures, but
+       this option was disabled by default because of unresolved questions
+       about its effectiveness. This has now been fixed: The code now properly
+       initializes these elements, and makes the resulting matrix much faster
+       to use.
+       <br> 
+       (WB, 2005/04/04)
+       </p>
+
   <li> <p>
        New: The <code class="class">ProductSparseMatrix</code>
        implements the product of two rectangular sparse matrices with
index c71dde22e096387cd51fef73a50e5a4815b69a86..d2cfa586ef5a053b8d1f3a83db4e53934eeed096 100644 (file)
@@ -261,29 +261,13 @@ namespace PETScWrappers
                                           * significantly more efficient to
                                           * get memory allocation right from
                                           * the start.
-                                          *
-                                          * Despite the fact that it would
-                                          * seem to be an obvious win, setting
-                                          * the @p preset_nonzero_locations
-                                          * flag to @p true doesn't seem to
-                                          * accelerate program. Rather on the
-                                          * contrary, it seems to be able to
-                                          * slow down entire programs
-                                          * somewhat. This is suprising, since
-                                          * we can use efficient function
-                                          * calls into PETSc that allow to
-                                          * create multiple entries at once;
-                                          * nevertheless, given the fact that
-                                          * it is inefficient, the respective
-                                          * flag has a default value equal to
-                                          * @p false.
                                           */
         SparseMatrix (const MPI_Comm                  &communicator,
                       const CompressedSparsityPattern &sparsity_pattern,
                       const std::vector<unsigned int> &local_rows_per_process,
                       const std::vector<unsigned int> &local_columns_per_process,
                       const unsigned int               this_process,
-                      const bool                       preset_nonzero_locations = false);
+                      const bool                       preset_nonzero_locations = true);
 
                                          /**
                                           * This operator assigns a scalar to
@@ -368,29 +352,13 @@ namespace PETScWrappers
                                           * significantly more efficient to
                                           * get memory allocation right from
                                           * the start.
-                                          *
-                                          * Despite the fact that it would
-                                          * seem to be an obvious win, setting
-                                          * the @p preset_nonzero_locations
-                                          * flag to @p true doesn't seem to
-                                          * accelerate program. Rather on the
-                                          * contrary, it seems to be able to
-                                          * slow down entire programs
-                                          * somewhat. This is suprising, since
-                                          * we can use efficient function
-                                          * calls into PETSc that allow to
-                                          * create multiple entries at once;
-                                          * nevertheless, given the fact that
-                                          * it is inefficient, the respective
-                                          * flag has a default value equal to
-                                          * @p false.
                                           */
         void reinit (const MPI_Comm                  &communicator,
                      const CompressedSparsityPattern &sparsity_pattern,
                      const std::vector<unsigned int> &local_rows_per_process,
                      const std::vector<unsigned int> &local_columns_per_process,
                      const unsigned int               this_process,
-                     const bool                       preset_nonzero_locations = false);
+                     const bool                       preset_nonzero_locations = true);
         
                                          /**
                                           * Return a reference to the MPI

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.