how magnetic flow meters work