Hysteretic magnetic forces calculation for type-II superconductors