The effect of inter-granular constraints on the response of polycrystalline piezoelectric ceramics at the surface and in the bulk