Generalized grain cluster method for multiscale response of multiphase materials