Modeling of magnetic recording heads for 2-D and 3-D finite element analysis