To simulate the nonlinear behavior of ferroelectric structures and devices under non-uniform electromechanical loadings,a domain-switching embedded electromechanical finite element method is developed in this paper.Following continuum assumption,the electromechanical behavior of each representative material point can be obtained by averaging the behavior of the local corresponding microstructure,e.g.42 domains used in this work.A new Double Gibbs free energy criterion for domain-switching is proposed to ensure the convergence and stability of the simulations on ferroelectrics under non-uniform field.Several computational examples are given to demonstrate that this nonlinear finite element method can yield reasonable and stable simulation results which can be used to explain some experimental results and assist the design of ferroelectric devices.