Modeling hysteresis in multifunctional materials