Development of a deflation-based linear solver in reservoir simulation