The use of unconventional (edge-based) finite elements is proposed for the computation of a static magnetic field in a system of deformable conductors and ferromagnetic bodies (with a linear b-h law). Thanks to a virtual-work approach, the associated forces can be computed at the element level.