Twin boundaries in perovskite