In this work, we review the formalism which would allow us to model magnetically deformed neutron stars. We study the effect of different magnetic field configurations on the equation of state (EoS) and structure of such stars. In this study, the EoS of magnetars is acquired by using the lowest order constraint variational (LOCV) method and the upper limit of the magnetic field is derived based on our EoS for magnetized neutron matter.
We introduce two different exponential and polynomial density-dependent prescriptions for the magnetic field profiles and check the divergence-free constraint of these profiles in the neutron stars. It can be concluded that the exponential profile violates Gauss law, while the polynomial prescription fulfills Gauss law.
For obtaining macroscopic properties of magnetars, the magnetic pressure as well as the metric are expanded as multipoles in spherical harmonics up to the quadrupole term. Solving the Einstein equations, one acquires the excess mass and deformation of the star due to the magnetic field.