Contribution magnetostatic module


I would like to notify you a contribution on the magnetostatic module, because I asked for a pull request.
Also I see a problem in the last part of my contribution;
The Gauss-Legendre quadrature works nice when the sinus is substituted by the cosine, line 641 ( in the new file). I tried the both on my pc, the results are the same but the file with sinus is badly saved.