  A new algorithm for simulating compact U(1) lattice gauge theory in three
dimensions is presented which is based on global changes in the configuration
space. We show that this algorithm provides an effective way to extract
partition functions at given external flux. As an application, we study
numerically the finite temperature deconfinement phase transition.
