  An implementation of the Polynomial Chaos Expansion is introduced here as a
fast solver of the equations of beam and spin motion inside an RF Wien filter.
The device shall be used to search for the deuteron electric dipole moment in
the COSY storage ring. The new approach is based on the stochastic Galerkin
method, and it is shown that this constitutes a new and very powerful
alternative to the commonly used Monte-Carlo methods.
