Add interface for PETSc vector

@TomFischer @norihiro-w @endJunction: The previous pull request about the PETSc interface has been split into four. This is the second part: an interface for PETSc vector.