]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
use the real communicator in PetscSparseMatrix as returned from PETSc
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 5 Feb 2013 16:47:49 +0000 (16:47 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 5 Feb 2013 16:47:49 +0000 (16:47 +0000)
git-svn-id: https://svn.dealii.org/trunk@28236 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_sparse_matrix.cc

index a24996c1eeb8c62ea45f04de07f9e42b1b92d0fb..53b734e816000aefade210086b5c6e986aefdb74 100644 (file)
@@ -139,8 +139,9 @@ namespace PETScWrappers
   const MPI_Comm &
   SparseMatrix::get_mpi_communicator () const
   {
-    static const MPI_Comm communicator = MPI_COMM_SELF;
-    return communicator;
+    static MPI_Comm comm;
+    PetscObjectGetComm((PetscObject)matrix, &comm);
+    return comm;
   }
 
 

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.