Computational Magnetics