`double` should be PetscScalar