From: Wolfgang Bangerth Date: Mon, 10 May 2004 19:39:42 +0000 (+0000) Subject: Fix a bug. X-Git-Tag: v8.0.0~15190 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b70b1d955b4313b6b471e5d2bb3ed0fce2cae38;p=dealii.git Fix a bug. git-svn-id: https://svn.dealii.org/trunk@9229 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/source/petsc_parallel_sparse_matrix.cc b/deal.II/lac/source/petsc_parallel_sparse_matrix.cc index a445c2ab24..8b8d754573 100644 --- a/deal.II/lac/source/petsc_parallel_sparse_matrix.cc +++ b/deal.II/lac/source/petsc_parallel_sparse_matrix.cc @@ -115,15 +115,9 @@ namespace PETScWrappers // use the call sequence indicating only // a maximal number of elements per row // for all rows globally - // - // 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 +//TODO[WB]: We should do better by providing ways to tell PETSc how to partition the columns const int ierr - = MatCreateMPIAIJ(communicator, local_rows, local_rows, m, n, + = MatCreateMPIAIJ(communicator, local_rows, PETSC_DECIDE, m, n, n_nonzero_per_row, 0, 0, 0, &matrix); AssertThrow (ierr == 0, ExcPETScError(ierr)); @@ -160,14 +154,9 @@ namespace PETScWrappers const std::vector int_row_lengths (row_lengths.begin(), row_lengths.end()); - // 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 +//TODO[WB]: We should do better by providing ways to tell PETSc how to partition the columns const int ierr - = MatCreateMPIAIJ(communicator, local_rows, local_rows, m, n, + = MatCreateMPIAIJ(communicator, local_rows, PETSC_DECIDE, m, n, 0, &int_row_lengths[0], 0, 0, &matrix); AssertThrow (ierr == 0, ExcPETScError(ierr));