A numerical method for solving the equations for a vortex core