PETSc linear solver class

Including two compilation warning corrections.