diff --git a/Solver/linearSystemPETSc.h b/Solver/linearSystemPETSc.h
index df480e95b0059ad62b11b6bfa6386627c1c409db..646e065d075544df325058d6cf4eae3b8827a902 100644
--- a/Solver/linearSystemPETSc.h
+++ b/Solver/linearSystemPETSc.h
@@ -121,7 +121,7 @@ class linearSystemPETSc : public linearSystem<scalar> {
   //std::vector<int> getColumnsIndices();
   #ifndef SWIG
   linearSystemPETSc(MPI_Comm com);
-  MPI_Comm& getComm() {return _comm;}
+  MPI_Comm getComm() const {return _comm;}
   #endif
   linearSystemPETSc();
 };