Efficient generalized source field computation for h-oriented magnetostatic formulations