FEM approach to the numerical simulation of vector hysteresis