Finite element analysis of geometrically necessary dislocations in crystal plasticity