  The effect of a homogeneous magnetic field on surface-tension-driven
B\'{e}nard convection is studied by means of direct numerical simulations. The
flow is computed in a rectangular domain with periodic horizontal boundary
conditions and the free-slip condition on the bottom wall using a
pseudospectral Fourier-Chebyshev discretization. Deformations of the free
surface are neglected. Two- and three-dimensional flows are computed for either
vanishing or small Prandtl number, which are typical of liquid metals. The main
focus of the paper is on a qualitative comparison of the flow states with the
non-magnetic case, and on the effects associated with the possible
near-cancellation of the nonlinear and pressure terms in the momentum equations
for two-dimensional rolls. In the three-dimensional case, the transition from a
stationary hexagonal pattern at the onset of convection to three-dimensional
time-dependent convection is explored by a series of simulations at zero
Prandtl number.
