The equations of motion of an ideal charged fluid, respectively the superco
nductivity equation (both in a given magnetic field) are showed to he geode
sic equations of a general, respectively a central extension of the group o
f volume preserving diffeomorphisms with right invariant metrics. For this,
quantization of the magnetic flux is required. We do curvature computation
s in both cases in order to get informations about the stability. (C) 2001
Elsevier Science B.V. All rights reserved.