**Abstract** : Nuclear fusion is one promising way to produce a clean energy in the forthcoming years. The possibility to construct nuclear fusion reactors is studied in large scale physics experiments as the international ITER project in construction in Cadarache, France that gathers contributions from seven different countries. In this experimental reactor, known as a tokamak, (a Russian acronym meaning toroidal chamber) an extremely hot plasma of hydrogen isotopes is confined thanks to a very large magnetic field, in order to reach sufficiently high temperatures and densities to initiate nuclear fusion reactions. The equilibrium state of this plasma is described by a non-linear elliptic equation known as the Grad-Shafranov equation[1, 2]. Due to the complexity of the magnetic geometry, this equation can only be solved by specialized numerical solvers[3]. However, since the plasma is highly unstable, the confinement properties of the equilibrium have to be studied by other numerical simulations addressing some specific physical issues as the turbulent transport in the plasma that is done by gyrokinetic codes or the stability of the plasma that is studied by magnetohydrodynamic solvers. These different numerical codes have therefore to be coupled in an appropriate way. Due to the highly anisotropic character of strongly magnetized plasmas, a crucial point in the coupling of these different codes is the construction of a mesh that is aligned on the magnetic flux surfaces computed by the Grad-Shafranov equilibrium solvers. In this work, we will describe an original method for the construction of flux aligned grids that respect the magnetic equilibrium topology. This method relies on the analysis of the singularities of the magnetic flux function and the construction of a graph known as the Reeb graph [4] that allows the segmentation of the physical domain into sub-domains that can be mapped to a reference square domain. We will present several examples taken from existing tokamaks and ITER to illustrate this grid generation process. REFERENCES [1] Grad, H., and Rubin, H.