A family of three-dimensional virtual elements with applications to magnetostatics