I don't think we need `quit()` since the destructor call `KSPDestroy()` if we properly delete a PETScLinearSolver object. In addition, we should have only one universal function or class to  finalize the program, i.e. releasing memory and finalizing external libraries, etc. Otherwise we have to write `PetscFinalize()` for everywhere we have to quit the program (e.g. when we find error in input files or when nonlinear solve diverged).