We present a numerical algorithm to solve the Boltzmann equation for the
electron distribution function in magnetic multilayer heterostructures with
non-collinear magnetizations. The solution is based on a scattering matrix
formalism for layers that are translationally invariant in plane so that
properties only vary perpendicular to the planes. Physical quantities like spin
density, spin current, and spin-transfer torque are calculated directly from
the distribution function. We illustrate our solution method with a systematic
study of the spin-transfer torque in a spin valve as a function of its
geometry. The results agree with a hybrid circuit theory developed by
Slonczewski for geometries typical of those measured experimentally.Comment: 13 pages, 8 figure