A Variational Approach to Electroelastic Analysis of Piezoelectric Ceramics with Surface Electrodes