An approach for analysis of poled/depolarized piezoelectric materials with a crack