SMS dit: The simulation of switching in polycrystalline ferroelectric ceramics