Boundary element method in anisotropic media with grain sliding and dislocation dynamics