Implementation of multiscale mechanisms in finite element analysis of active composite structures