]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Revert last patch as it triggers strange PETSc error messages like
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 19 May 2004 09:12:16 +0000 (09:12 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 19 May 2004 09:12:16 +0000 (09:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@9264 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/petsc_parallel_sparse_matrix.cc

index 8b8d75457376fd3325e847b4a659fba369cc9a90..a445c2ab24a917a5eb69198bde351485d1b4290b 100644 (file)
@@ -115,9 +115,15 @@ namespace PETScWrappers
                                        // use the call sequence indicating only
                                        // a maximal number of elements per row
                                        // for all rows globally
-//TODO[WB]: We should do better by providing ways to tell PETSc how to partition the columns
+                                       //
+                                       // note that we partition the columns
+                                       // in the same way as we partition the
+                                       // rows, i.e. we assume that users
+                                       // specify the same number for
+                                       // local_rows as they do for local_size
+                                       // on parallel vectors
       const int ierr
-        = MatCreateMPIAIJ(communicator, local_rows, PETSC_DECIDE, m, n,
+        = MatCreateMPIAIJ(communicator, local_rows, local_rows, m, n,
                           n_nonzero_per_row, 0, 0, 0,
                           &matrix);
       AssertThrow (ierr == 0, ExcPETScError(ierr));
@@ -154,9 +160,14 @@ namespace PETScWrappers
       const std::vector<signed int> int_row_lengths (row_lengths.begin(),
                                                      row_lengths.end());
                                        
-//TODO[WB]: We should do better by providing ways to tell PETSc how to partition the columns
+                                       // note that we partition the columns
+                                       // in the same way as we partition the
+                                       // rows, i.e. we assume that users
+                                       // specify the same number for
+                                       // local_rows as they do for local_size
+                                       // on parallel vectors
       const int ierr
-        = MatCreateMPIAIJ(communicator, local_rows, PETSC_DECIDE, m, n,
+        = MatCreateMPIAIJ(communicator, local_rows, local_rows, m, n,
                           0, &int_row_lengths[0], 0, 0,
                           &matrix);
       AssertThrow (ierr == 0, ExcPETScError(ierr));

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.