Modelling the geodynamo: progress and challenges