From: Timo Heister Date: Thu, 31 Jan 2013 19:46:17 +0000 (+0000) Subject: check that PETSc solvers work with the same communicators for Matrix/Vectors X-Git-Tag: v8.0.0~120^2~93 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbc7eb9d72a8eed6dbf7f78c1cf39531c058880c;p=dealii.git check that PETSc solvers work with the same communicators for Matrix/Vectors git-svn-id: https://svn.dealii.org/branches/branch_unify_linear_algebra@28204 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/lac/petsc_solver.cc b/deal.II/source/lac/petsc_solver.cc index ad9f1dfd50..e6c9a59d47 100644 --- a/deal.II/source/lac/petsc_solver.cc +++ b/deal.II/source/lac/petsc_solver.cc @@ -63,6 +63,11 @@ namespace PETScWrappers const PreconditionerBase &preconditioner) { int ierr; + + Assert(A.get_mpi_communicator()==mpi_communicator, ExcMessage("PETSc Solver and Matrix need to use the same MPI_Comm.")); + Assert(x.get_mpi_communicator()==mpi_communicator, ExcMessage("PETSc Solver and Vector need to use the same MPI_Comm.")); + Assert(b.get_mpi_communicator()==mpi_communicator, ExcMessage("PETSc Solver and Vector need to use the same MPI_Comm.")); + // first create a solver object if this // is necessary if (solver_data.get() == 0)