Final Report Summary - NSMAG (Magnetic Fields in Neutron Stars via Numerical Simulations) The research activity in this project has mostly focused toward the development of a numerical formalism and the related computational tools required for the modeling of magnetized Neutron Stars (NSs) and to address a few related astrophysical applications.In particular the code XNS (http://www.arcetri.astro.it/science/ahead/XNS/) has been developed to compute equilibrium models of magnetized NSs, for a large set of possible magnetic field configurations and different distributions of currents in conjunction with rotation, implementing also more sophisticated Equations of State (EoSs). The original software, limited to simple polytropic EoS, has been extended to handle more complex poloidal / toroidal configurations and even mixed poloidal-toroidal cases, both for Hadronic and Strange Quark matter. The formalism for rotating magnetized model have been developed to handle the induced electric field, allowing for different gauge choice for the boundary condition on the surface charge. Finally code and algorithms have been extended to compute also configurations endowed with Force-Free magnetospheres.The results of an extensive investigation of the parameter space for rotating and nonrotating magnetized stars, with poloidal and/or toroidal magnetic fields, in the fully non linear General Relativistic (GR) regime, has been carried out: about 50000 different models were build to get a large sampling of the parameter space. This work is the first computation in the full non linear GR regime of mixed poloidal-toroidal configurations, and the first ever investigation in full GR of the role of non-linear current terms, and magnetospheric currents. It has allowed us to get an handling in the full non linear GR regime of combined effects of rotation and magnetic field with different current distributions, to find general scaling relations for global quantities, and to investigate differences associated to gauge-freedom for the induced electric field, not considered in previous studies.In particular we have been able to study the role of the current distributions, and how they affect the structure of the surface magnetic fields, extending the result to the nonperturbative regime to investigate also the role of different current distribution on the quadrupolar deformation, and the magnetosphere. An outcome of this analysis has been the discovery of how the magnetospheric structure, twist and topology, depend on the distribution of currents.Together with the modeling of magnetized NSs, the Fellow has developed numerical tools and algorithms for the study of resistive MHD evolution in full GR, using high-order highresolution computational schemes. These have been applied to the first multidimensional computations of mean field dynamo evolution in a curved space-time.For the first astrophysical applications, the Fellow has started new collaborations for the applications of those results to astrophysical targets: in particular application of magnetospheric models to the study of X-ray polarimetry of magnetars, and applications of rotating magnetized models to possible signatures of the role of the EoS in GammaRay-Burst. The Fellow has been the first to show the compatibility (in terms of energetics and timescales) of quark deconfinement with double-peaked GRBs.The Fellow now has a permanent research position at INAF Osservatorio di Arcetri. He has been promoted to the first senior level. He was also granted the National Scientific Abilitation (ANS), which is a necessary prerequisite for accessing professorship at any Italian University. The Fellow has now a joint professorship at the Physics & Astronomy Department at Universita’ di Firenze, where he teaches the High Energy Astrophysics Class. He collaborates with the INFN (National Institute of Nuclear Physics), with the Nuclear Physics group at Universita’ di Ferrara, and the Astrophysics group at the Universita’ di Padova. At the EU level is Topic Leader within the COMPSTAR collaboration.He is collaborating, as a member of the science team, to the development of two satellites for X-ray polarimetry, now in phase II: XIPE and IXPE. He is also a member of the science team for LOFT. The Fellow has also held Lectures, both for UnderGrad and Grad Students, has acted as supervisor for two Master Theses, and is acting as supervisor for aPhD thesis, in this same project.