Partial differential equations with hysteresis functionals