Numerical simulation of domain switching in multilayer ferroelectric actuators