  Dynamic simulations of spin-transfer and spin-orbit torques are increasingly
important for a wide range of spintronic devices including magnetic random
access memory, spin-torque nano-oscillators and electrical switching of
antiferromagnets. Here we present a computationally efficient method for the
implementation of spin-transfer and spin-orbit torques within the
Landau-Lifshitz-Gilbert equation used in micromagnetic and atomistic
simulations. We consolidate and simplify the varying terminology of different
kinds of torques into a physical action and physical origin that clearly shows
the common action of spin torques while separating their different physical
origins. Our formalism introduces the spin torque as an effective magnetic
field, greatly simplifying the numerical implementation and aiding the
interpretation of results. The strength of the effective spin torque field
unifies the action of the spin torque and subsumes the details of experimental
effects such as interface resistance and spin Hall angle into a simple
transferable number between numerical simulations. We present a series of
numerical tests demonstrating the mechanics of generalised spin torques in a
range of spintronic devices. This revised approach to modelling spin-torque
effects in numerical simulations enables faster simulations and a more direct
way of interpreting the results, and thus it is also suitable to be used in
direct comparisons with experimental measurements or in a modelling tool that
takes experimental values as input.
