Abstract
We derive an algorithm for simulating the dynamical behavior of stochastic diffusive systems. We use this algorithm to simulate flux-lattice melting in thin slabs of type-II superconductor whose thickness is comparable to the penetration depth. The simulations show that the flux lattice can melt at temperatures well below the superconducting transition temperature. In addition we show that the melting behavior of the flux-line lattice is very similar to that seen in both low-density Lennard-Jones and hard-disk systems.