Controlling electromagnetic waves has broad range of applications in various area of science and engineering, for instance the design of perfect flat lenses, waveguides, invisibility cloaks or in general metamaterials. The idea of controlling electromagnetic waves by introducing materials inhomogeneity was introduced in  by Pendry et. al. It stems on this fact that the Maxwell equations are invariant under the coordinate transformation. Therefore, by finding an analytic mapping from the physical (undeformed) space to the clocked (deformed) space in which the transformation maps a point onto a ball with the finite reduce, the mentioned ball will be hidden from the electromagnetic waves. Later, this method has been extensively used by various researchers for the design of metamaterials -, photonic band gap devices , active nanoplasmonic metamaterials , extreme-angle broadband metamaterial lens , all-dielectric, polarization-independent optical cloaks .
There are several efforts in the literature for the design of invisibility cloaks, in particular within the frequencies spectrum of the visible light, for instance the optical cloaking with metamaterials , full-wave invisibility of active devices at all frequencies , macroscopic invisibility cloak for visible light -. However, as it is already warned by Pendry et. al. , the need for highly anisotropic inhomogeneous media is the main difficulty of their method. This makes it difficult to realize these materials for real world applications. To cope this limitation, some authors use conformal mapping to generate nearly isotropic cloaks, for instance see -. The use of constrained optimization and quasi-conformal mapping - is another alternative approach to overcome this limitation. Computing the mapping based on the laplace equation - was another idea to reduce the material anisotropy.
The use of topology optimization method is an alternative way to control the propagation of electromagnetic waves in a heterogeneous media. In -, the topology optimization approach was used for the design of directional cloaks considering a plane wave with a specific frequency. In these works the optimal design problem leads to the solution of a distributed parameter identification problem under the Maxwell equation as a constraint which was computationally very expensive. In  a simple method for the design of directional cloaks has been suggested based on the laplace equation. In this method, the light trajectories are computed by the solution of the laplace equation and then the material properties, the index of refraction, was computed directly using the eikonal equation. This method produces the isotropic material properties and does the perfect cloaking under the geometric optics approximation. However, there is no bound on the material properties.
In the present study, the topology optimization method is adapted to formulate the original problem as a distributed parameter identification problem. However, unlike formerly mentioned works, it is assumed that the light trajectories follow the eikonal equation. Therefore, we avoid to solve the Maxwell equation which is computationally very expensive. Instead, we solve the eikonal equation that can be solved very efficiently by the fast marching or fast sweeping methods.
The remainder of this paper is organized as follows. The problem formulation is presented in the next section. The sensitivity analysis and necessary optimality conditions are presented in section 3. The solution algorithm is presented in section 4. Section 5 is devoted to the space discretization and numerical algorithm. The numerical results for a model problem is presented in section 6. Finally, section 7 summarizes this work and presents the outline of further studies.
Consider () as an open bounded domain with sufficiently regular boundaries occupied with two isotropic materials. Assume the characteristic length scale of is denoted by. Consider arbitrary electromagnetic wave with wavelengths (considering non-monochromatic waves includes no technical difficulty). It is well known that under assumption of the wave (light) trajectories obeys the following eikonal equation:
Where denotes the first arrival time of wave at , denotes the index of refraction and denotes the set of point source in. Note that isosurfaces of are equivalent to the wave fronts, i.e. the wave trajectory at is orthogonal to -isosurface.
The goal of optimal design problem in the present study is to determine the optimal distribution of in the design domain such that the waves propagate according to a-priori desired trajectories in the control domain. For this purpose, the objective functional, to be minimized, is defined as the distance of and target wave fronts over,
It is worth mentioning that the objective function can defined in more general form to result other desires. For instance, to make hidden from the light, i.e. to make invisibility cloaks for visible light spectrum, we can maximize the arrival time of light into , and on the other hand minimize the arrival time of light in the remained areas, i.e. in . For this purpose, the objective function can be defined alternatively as follows:
To make the optimal design manufacturable, is constrained to lies in the admissible design space which is defined as follows:
Where denotes the admissible lower and upper bound for pointwise refractive index respectively. Therefor the optimal design problem in the present study can be summarized as follows:
To minimize the objective functional, the constrained gradient flow of (2) or (3) is used in the present study. To do this, it is required to compute the fist variation of objective functional (2) or (3) with respect to the design variable. Because after the space discretization, the number of design parameters will be possibly very large, the adjoint approach is adapted here to compute the first variation of (2) or (3) with respect to .
Consider as the Lagrange multiplier corresponding to PDE constraint (1). Ignoring the bound contestants (they are treated by the projected gradient approach later), the local solutions of (5) are subsets of stationary points of the following augmented lagrangian:
Taking the first variation of with respect to and equating it to zero will be identical to the direct PDE (1). The first variation of with respect to will be computed as follows (consider objective functional (2)):
Consider as a scalar field and as a vector field, applying identity to the second term in right hand side of (6) results in (take and):
Applying the divergence theorem on the first term on the right hand side of (8) results in:
Where denotes the boundaries of, i.e. and denotes the outward unit normal vector on. Considering (7) to gather with (9) and equating to zero the first variation of with respect to results in the following adjoint PDE:
Where denotes the characteristic function corresponding to, i.e. in and in. Note that the boundary conditions of adjoint PDE is computed by equating to zero the first term in the right hand side of (9). If alternatively the objective functional (3) is considered, by similar derivation we reach to the following adjoint PDE:
Finally, taking the first variation of with respect to leads to:
Therefore, equating it to zero the first variation of with respect to results in:
Treating the bound constraints by the projected gradient approach (cf. , ), the first order KKT necessary optimality conditions (cf. ) corresponding to the optimization problem (5) can be expressed as follows:
where operator denotes the orthogonal projection of trial fields onto design space . By straightforward computation, the explicit form of operator can be computed as follows (cf. ):
For the case of objective functional (3) the necessary first order optimality conditions will has the following form:
Considering results of section III, the solution for (5) based on the constrained gradient flow could be expressed as follows:
Algorithm 1. Constrained gradient flow of (5):
where denotes the characteristic function of the design space, i.e. in and in . Because the gradient is computed based on the norm, the regularity of the new design may not be better than (is a square integrable field). In fact, it can possesses discontinuity in which is not desirable from the practical and computational point of views. It can decrease the convergence rate of algorithm 1, or even leads to oscillatory behavior in the course of computations. To overcome this problem, we perform a regularization step in algorithm 1 and lift the new design variable from the function space to the more regular space in which both of function and its first order derivative are square integrable. For this purpose, the following Helmholtz equation should be solved at every step:
whereis a regularization parameter that controls the smoothness of solution and denotes the regularized design variable. According to the above discussion, algorithm 1 could be modified as follows:
Algorithm 1. Regularized constrained gradient flow of (5):
For the purpose of numerical solution, the spatial domain is assumed to be a rectangular domain with dimension unites and is discretized into a uniform squared grid with edge length. The spatial variables are defined at center of finite difference cells, and is used to denote the discretized counterpart of at . Because, direct equation (1) is a nonlinear first order partial differential equation, using conventional methods for its solution leads to a nonlinear system of equations which is computational expensive to solve in practice. However, exploiting the hyperbolic and causality nature of this equation leads to a very efficient solution algorithm called the fast marching method  with computational complexity; where. Later, the fast sweeping method has been introduced in  by Zhao
Fig. 1. Contour plot of first arrival time for iteration 10 (legend in time unit).
and it has been shown that it exhibits computational complexity to achieve a moderate (reasonable) accuracy. Due to the high computational performance and ease of implementation, the fast sweeping method will be used in the present study to solve (1). The numerical method in the
present study is closely related to method introduced in . This method will be briefly discussed in this paper in the appendix section.
In this section, the performance and success of the presented algorithm is studied by a numerical experiment. For this purpose consider as a rectangular domain with edge lengths and units along and directions respectively. Moreover, assume that the spatial domain is decomposed into uniform square grids with grid size. The control domain, , is defined as a circle with radius located at the center of the spatial domain. The design domain, cloak in this example, is defined as a ring around the control domain with external radius. Our goal is to hide the control domain from light rays propagated from a point source which is located at the center of left edge of the spatial domain. For this purpose, the objective function is defined such that its minimizer leads to very large arrival time in and minimal arrival time in other regions, i.e. objective functional (3) is considered here. Figs. 1-5 show the contour plot of first arrival times after 10, 20, 30, 50 and 100 iterations.
Fig. 2. Contour plot of first arrival time for iteration 20 (legend in time unit).
Fig. 3. Contour plot of first arrival time for iteration 30 (legend in time unit).
Fig. 4. Contour plot of first arrival time for iteration 50 (legend in time unit).
Fig. 5. Contour plot of first arrival time for iteration 100 (legend in time unit).
Fig. 6. The variation of the objective function in the course of optimization.
According to plots the first arrival time is increased inside the control domain as the optimization proceeds. This observation confirms the success of the optimization algorithm to move toward the optimal solution. Fig. 6 shows the variation of objective functional as a function of iterations during the first 100 iterations. As the figure shows, the objective functional decreased monotonically by iterations. This observation confirms the convergence of the presented numerical algorithm.
A mathematical model and its corresponding computational method is presented in this study to control the light propagation in a media by means of optimal determination of material inhomogeneity. It is based on solving a distributed parameter identification problem constrained to an eikonal equation. In contrast to available alternative methods, the main benefit of the presented approach is its ability to produce designs with bounded isotropic material properties. The success of the presented method is shown by solving a model problem corresponding to the invisibility cloaking. According to our numerical results the performance of optimized design, the objective functional, is improved by an order of magnitude by the presented numerical algorithm.
In this section the numerical solution algorithm for the eikonal equation and its corresponding adjoint equation used in the present study are briefly discussed.
Applying the Godunov numerical Hamiltonian to the eikonal equation (1), for , we have:
and denotes the positive part of, i.e. . The one sided finite difference method is used at the boundary points. The fast sweeping algorithm can be summarized as follows:
Following , the fast sweeping method is used in the present study to solve (11). Considering two dimensional case, equation (11) can be written in the following form:
where , and are function of and , i.e. , , . The space discretized form of (A.2) can be expressed as follow:
where and are determined according to the direction of light propagation. For instance, when, . Moreover,
Following , we introduce the following notation:
Using this notation results in:
(A.4) can be written as follows:
(A.5) is in fact a system of linear equation that can be solved efficiently to a reasonable accuracy by the fast sweeping method.
 J. B. Pendry, D. Schurig, and D. R. Smith, “Controlling electromagnetic fields,” Science, vol. 312, no. 5781, pp. 1780-1782, 2006.
 D. H. Werner and D. Kwon, Transformation electromagnetics and metamaterials, Springer, 2013.
 M. R. Soheilifar and R. A. Sadeghzadeh, “Design, Fabrication and Measurement of Two-Layered Quadruple-Band Microwave Metamaterial Absorber,” Journal of Communication Engineering, vol. 3, no. 1, pp. 13-22, Jan.-June 2014.
 M. Hajebi, E. Zarezadeh, and F. Babaeian, “A Compact Ultra-Wideband Filter Based on Left Handed Transmission Line by Using Complementary Split Ring Resonators and Series Capacitor,” Journal of Communication Engineering, vol. 4, no. 2, pp. 111-121, July-Dec. 2015.
 Y. A. Urzhumov and D. R. Smith, “Transformation optics with photonic band gap Media,” Physical Review Letters, vol. 105, no. 16, Oct. 2010.
 O. Hess, J. B. Pendry, S. A. Maier, R. F. Oulton, J. M. Hamm, and K. L. Tsakmakidis, “Active nanoplasmonic metamaterials,” Nature materials, vol. 11, no. 7, pp. 573–584, 2012.
 N. Kundtz and D. R. Smith, “Extreme-angle broadband metamaterial lens,” Nature materials, vol. 9, no. 2, pp. 129–132, 2010.
 J. Andkjær, N. A. Mortensen, and O. Sigmund, “Towards all-dielectric, polarization-independent optical cloaks,” Applied Physics Letters, vol. 100, no. 10, 2012.
 W. Cai, U. K. Chettiar, A. V. Kildishev, and V. M. Shalaev, “Optical cloaking with metamaterials,” Nature photonics, vol. 1, no. 4, pp. 224–227, 2007.
 A. Greenleaf, Y. Kurylev, M. Lassas, and G. Uhlmann, “Full-wave invisibility of active devices at all frequencies,” Communications in Mathematical Physics, vol. 275, no. 3, pp. 749–789, 2007.
 T. Ergin, N. Stenger, P. Brenner, J. B. Pendry, and M. Wegener, “Three-dimensional invisibility cloak at optical wavelengths,” Science, vol. 328, no. 5976, pp. 337–339, 2010.
 B. Zhang, Y. Luo, X. Liu, and G. Barbastathis, “Macroscopic invisibility cloak for visible light,” Physical Review Letters, vol. 106, no. 3, 2011.
 X. Chen, Y. Luo, J. Zhang, K. Jiang, J. B. Pendry, and S. Zhang, “Macroscopic invisibility cloaking of visible light,” Nature Communications, vol. 2, no. 176, Feb. 2011.
 U. Leonhardt, “Optical conformal mapping,” Science, vol. 312, no. 5781, pp. 1777–1780, 2006.
 P. Alitalo and S. Tretyakov, “Electromagnetic cloaking with metamaterials,” Materials today, vol. 12, no. 3, pp. 22–29, 2009.
 N. I. Landy and W. J. Padilla, “Guiding light with conformal transformations,” Optics express, vol. 17, no. 17, pp.14872–14879, 2009.
 L. Peng, L. Ran, and N. A. Mortensen, “The scattering of a cylindrical invisibility cloak: reduced parameters and optimization,” Journal of Physics D: Applied Physics, vol. 44, no. 13, 2011.
 D. Schurig, J. B. Pendry, and D. R. Smith, “Calculation of material properties and ray tracing in transformation media,” Optics Express, vol. 14, no. 21, pp. 9794–9804, 2006.
 J. Lu and J. Vuckovic, “Inverse design of nanophotonic structures using complementary convex optimization,” Optics express, vol. 18, no. 4, pp. 3793–3804, 2010.
 J. Hu, X. Zhou, and G. Hu, “Design method for electromagnetic cloak with arbitrary shapes based on laplaces equation,” Optics Express, vol. 17, no. 3, pp. 1308–1320, 2009.
 Z. Chang, X. Zhou, J. Hu, and G. Hu, “Design method for quasi-isotropic transformation materials based on inverse laplaces equation with sliding boundaries,” Optics express, vol. 18, no. 6, pp. 6089–6096, 2010.
 J. Andkjær and O. Sigmund, “Topology optimized low-contrast all-dielectric optical cloak,” Applied Physics Letters, vol. 98, no. 2, 2011.
 G. Fujii, H. Watanabe, T. Yamada, T. Ueta, and M. Mizuno, “Level set based topology optimization for optical cloaks,” Applied Physics Letters, vol. 102, no. 25, 2013.
 L. Lan, F. Sun, Y. Liu, C. Ong, and Y. Ma, “Experimentally demonstrated a unidirectional electromagnetic cloak designed by topology optimization,” Applied Physics Letters, vol. 103, no. 12, 2013.
 M. Otomori, T. Yamada, J. Andkjaer, K. Izui, S. Nishiwaki, and N. Kogiso, “Level set-based topology optimization for the design of an electromagnetic cloak with ferrite material,” IEEE Transactions on Magnetics, vol. 49, no. 5, pp. 2081–2084, 2013.
 Z. L. Mei, J. Bai, T. M. Niu, and T. J. Cui, “Design of arbitrarily directional cloaks by solving the Laplace’s equation,” Journal of Applied Physics, vol. 107, no. 12, 2010.
 R. Tavakoli and H. Zhang, “A nonmonotone spectral projected gradient method for large-scale topology optimization problems,” Numer Algebra, Control Optim, vol. 2, no. 2, pp. 395–412, 2012.
 R. Tavakoli, “Multimaterial topology optimization by volume constrained allen-cahn system and regularized projected steepest descent method,” Comput Meth Appl Mech Eng, vol. 276, pp. 534–565, 2014.
 G. Allaire, Numerical analysis and optimization: an introduction to mathematical modelling and numerical simulation, Translated by: Craig, A., Oxford University Press, USA, 2007.
 J. A. Sethian, “Fast Marching Methods,” SIAM Review, vol. 41, no. 2, pp. 199–235, 1999.
 H. Zhao, “A fast sweeping method for Eikonal equations,” Mathematics of Computation, vol. 74, no. 250, pp. 603–627, 2004.
 S. Leung and J. Qian, “An adjoint state method for three-dimensional transmission traveltime tomography using first-arrivals,” Comm. Math Sci, vol. 4, no. 1, pp. 249–266, 2006.