diff --git a/Solver/linearSystemPETSc.h b/Solver/linearSystemPETSc.h
index f5a5434dd05e3e15c220a788b59061cdff27d6ee..18dea17f39cd46fec5658947134b86f6576b23d7 100644
--- a/Solver/linearSystemPETSc.h
+++ b/Solver/linearSystemPETSc.h
@@ -44,12 +44,13 @@
 
 template <class scalar>
 class linearSystemPETSc : public linearSystem<scalar> {
+  protected:
   int _blockSize; // for block Matrix
   bool _isAllocated, _kspAllocated;
   Mat _a;
   Vec _b, _x;
   KSP _ksp;
-  void _try(int ierr) const { CHKERRABORT(PETSC_COMM_WORLD, ierr); }
+  static void _try(int ierr) { CHKERRABORT(PETSC_COMM_WORLD, ierr); }
   void _kspCreate() {
     _try(KSPCreate(PETSC_COMM_WORLD, &_ksp));
     PC pc;