PETSc interface for assembly and linear solver