]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Hide a compress() call within the collect_sizes operation, so compres() will only...
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 22 Aug 2008 16:31:46 +0000 (16:31 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 22 Aug 2008 16:31:46 +0000 (16:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@16654 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/trilinos_block_sparse_matrix.h
deal.II/lac/source/trilinos_block_sparse_matrix.cc
deal.II/lac/source/trilinos_sparse_matrix.cc

index c9a5a815524953f4224bd6c992fcd9be42669da7..99f2caab4c1dd7dff633913cadfddb843157a443 100644 (file)
@@ -182,14 +182,13 @@ namespace TrilinosWrappers
                                       /** 
                                        * This function calls the compress()
                                        * command of all matrices after 
-                                       * the sparsity pattern has been 
-                                       * generated or the assembly is 
+                                       * the assembly is 
                                        * completed. Note that all MPI
                                        * processes need to call this 
-                                       * command (in contrast to sparsity
-                                       * pattern generation, which is 
-                                       * probably only called on one 
-                                       * single process) before any 
+                                       * command (whereas the individual 
+                                       * assembly routines will most probably
+                                       * only be called on each processor
+                                       * individually) before any 
                                        * can complete it.
                                        */
       void compress ();
@@ -204,7 +203,10 @@ namespace TrilinosWrappers
                                         * subobjects. You *must* call
                                         * this function each time after
                                         * you have changed the size of
-                                        * the sub-objects.
+                                        * the sub-objects. Note that 
+                                       * this is a collective 
+                                       * operation, i.e., it needs to
+                                       * be called on all MPI processes.
                                         */
       void collect_sizes ();
 
index 314c8a158da4de9a3f57c8efa45be8d38b8160db..6d486470e8ff4c5304188bf2fda49bed910cb212 100644 (file)
@@ -97,6 +97,7 @@ namespace TrilinosWrappers
   void
   BlockSparseMatrix::collect_sizes ()
   {
+    compress();
     BaseClass::collect_sizes ();
   }
   
index f8f8872550db8364da9084b316769eee54d7b8d1..0e9789f71c39e8e6e326461151052aa77f1a1d03 100755 (executable)
@@ -275,15 +275,6 @@ namespace TrilinosWrappers
     matrix = std::auto_ptr<Epetra_FECrsMatrix>
              (new Epetra_FECrsMatrix(Copy, row_map, col_map,
                                      &n_entries_per_row[0], true));
-      
-//      Assert (matrix->NumGlobalCols() == col_map.NumGlobalElements(),
-//           ExcInternalError());
-//      Assert (matrix->NumGlobalRows() == row_map.NumGlobalElements(),
-//           ExcInternalError());
-//      Assert (matrix->NumGlobalCols() == sparsity_pattern.n_cols(),
-//           ExcInternalError());
-//      Assert (matrix->NumGlobalRows() == sparsity_pattern.n_rows(),
-//           ExcInternalError());
     
     const unsigned int n_max_entries_per_row = *std::max_element (
                    &n_entries_per_row[0], &n_entries_per_row[n_rows-1]);

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.