Geometrical integration of Landau–Lifshitz–Gilbert equation based on the mid-point rule