Effects of thermal and electrical hysteresis on phase transitions and electrocaloric effect in ferroelectrics: A computational study. (15th April 2022)