  We investigate the mechanism by which topological defects form in first order
phase transitions with a charged order parameter. We show how thick
superconductor vortices and heavy cosmic strings form by trapping of magnetic
flux. In an external magnetic field, intermediate objects such as strips and
membranes of magnetic flux and chains of single winding defects are produced.
At non-zero temperature, a variety of spontaneous defects of different winding
numbers arise. In cosmology, our results mean that the magnetic flux thermal
fluctuations get trapped in a primordial multi-tension string network. The
mechanism may also apply to the production of cosmic-like strings in brane
collisions. In a thin type-I superconductor film, flux strips are found to be
meta-stable while thick vortices are stable up to some critical value of the
winding number which increases with the thickness of the film. In addition, a
non-dissipative Josephson-like current is obtained across the strips of
quantized magnetic flux.
