# Eikonal equation

The eikonal equation (from Greek εἰκών, image[1][2]) is a non-linear partial differential equation encountered in problems of wave propagation, when the wave equation is approximated using the WKB theory. It is derivable from Maxwell's equations of electromagnetics, and provides a link between physical (wave) optics and geometric (ray) optics.

The eikonal equation is of the form

${\displaystyle |\nabla u(x)|={\frac {1}{f(x)}},\quad x\in \Omega }$

subject to ${\displaystyle u|_{\partial \Omega }=0}$, where ${\displaystyle \Omega }$ is an open set in ${\displaystyle \mathbb {R} ^{n}}$ with well-behaved boundary, ${\displaystyle f(x)}$ is a function with positive values, ${\displaystyle \nabla }$ denotes the gradient and ${\displaystyle |\cdot |}$ is the Euclidean norm. Here, the right-hand side ${\displaystyle f(x)}$ is typically supplied as known input. Physically, the solution ${\displaystyle u(x)}$ is the shortest time needed to travel from the boundary ${\displaystyle \partial \Omega }$ to ${\displaystyle x}$ inside ${\displaystyle \Omega ,}$ with ${\displaystyle f(x)}$ being the speed at ${\displaystyle x}$.

In the special case when ${\displaystyle f=1}$, the solution gives the signed distance from ${\displaystyle \partial \Omega }$.[citation needed]

One fast computational algorithm to approximate the solution to the eikonal equation is the fast marching method.

## Physical interpretation

### Continuous shortest-path problems

The solution to the eikonal equation

${\displaystyle \left|\nabla u(x)\right|={\frac {1}{f(x)}}{\text{ for }}x\in \Omega \subset \mathbb {R} ^{n},}$
${\displaystyle u(x)=q(x){\text{ for }}x\in \partial \Omega }$

can be interpreted as the minimal amount of time required to travel from ${\displaystyle x}$ to ${\displaystyle \partial \Omega }$, where ${\displaystyle f:{\bar {\Omega }}\to (0,+\infty )}$ is the speed of travel, and ${\displaystyle q:\partial \Omega \to [0,+\infty )}$ is an exit-time penalty. (Alternatively this can be posed as a minimal cost-to-exit by making the right-side ${\displaystyle C(x)/f(x)}$ and ${\displaystyle q}$ an exit-cost penalty.)

By assuming that ${\displaystyle \nabla u(x)}$ exists at all points, it is easy to prove that ${\displaystyle u(x)}$ corresponds to a time-optimal control problem using Bellman's optimality principle and a Taylor expansion.[3] Unfortunately, it is not guaranteed that ${\displaystyle \nabla u(x)}$ exists at all points, and more advanced techniques are necessary to prove this. This led to the development of viscosity solutions in the 1980s by Pierre-Louis Lions and Michael G. Crandall,[4] and Lions won a Fields Medal for his contributions.

### Electromagnetic potential

The physical meaning of the eikonal equation is related to the formula

${\displaystyle \mathbf {E} =-\nabla V,}$

where ${\displaystyle \mathbf {E} }$ is the electric field strength, and ${\displaystyle V}$ is the electric potential. There is a similar equation for velocity potential in fluid flow and temperature in heat transfer. The physical meaning of this equation in the electromagnetic example is that any charge in the region is pushed to move at right angles to the lines[clarification needed] of constant potential, and along lines of force determined by the field of the E vector and the sign of the charge.

Ray optics and electromagnetism are related by the fact that the eikonal equation gives a second electromagnetic formula of the same form as the potential equation above where the line of constant potential has been replaced by a line of constant phase, and the force lines have been replaced by normal vectors coming out of the constant phase line at right angles. The magnitude of these normal vectors is given by the square root of the relative permittivity. The line of constant phase can be considered the edge of one of the advancing light waves. The normal vectors are the rays the light is traveling down in ray optics.

## Computational algorithms

Several fast and efficient algorithms to solve the eikonal equation have been developed since the 1990s. Many of these algorithms take advantage of algorithms developed much earlier for shortest path problems on graphs with nonnegative edge lengths.[5] These algorithms take advantage of the causality provided by the physical interpretation and typically discretize the domain using a mesh [6][7][8][9] or regular grid [10][11] and calculate the solution at each discretized point. Eikonal solvers on triangulated manifolds are.[6][7]

Sethian's fast marching method (FMM)[10][11] was the first "fast and efficient" algorithm created to solve the Eikonal equation. The original description discretizes the domain ${\displaystyle \Omega \subset \mathbb {R} ^{n}}$ into a regular grid and "marches" the solution from "known" values to the undiscovered regions, precisely mirroring the logic of Dijkstra's algorithm. If ${\displaystyle \Omega }$ is discretized and has ${\displaystyle M}$ meshpoints, then the computational complexity is ${\displaystyle O(M\log M)}$ where the ${\displaystyle \log }$ term comes from the use of a heap (typically binary). A number of modifications can be prescribed to FMM since it is classified as a label-setting method. In addition, FMM has been generalized to operate on general meshes that discretize the domain.[6][7][8][9]

Label-correcting methods such as the Bellman–Ford algorithm can also be used to solve the discretized Eikonal equation also with numerous modifications allowed (e.g. "Small Labels First" [5][12] or "Large Labels Last" [5][13]). Two-queue methods have also been developed[14] that are essentially a version of the Bellman-Ford algorithm except two queues are used with a threshold used to determine which queue a gridpoint should be assigned to based on local information.

Sweeping algorithms such as the fast sweeping method (FSM)[15] are highly efficient for solving Eikonal equations when the corresponding characteristic curves do not change direction very often.[5] These algorithms are label-correcting but do not make use of a queue or heap, and instead prescribe different orderings for the gridpoints to be updated and iterate through these orderings until convergence. Some improvements were introduced such as "locking" gridpoints[14] during a sweep if does not receive an update, but on highly refined grids and higher-dimensional spaces there is still a large overhead due to having to pass through every gridpoint. Parallel methods have been introduced that attempt to decompose the domain and perform sweeping on each decomposed subset. Zhao's parallel implementation decomposes the domain into ${\displaystyle n}$-dimensional subsets and then runs an individual FSM on each subset.[16] Dextrixhe's parallel implementation also decomposes the domain, but parallelizes each individual sweep so that processors are responsible for updating gridpoints in an ${\displaystyle (n-1)}$-dimensional hyperplane until the entire domain is fully swept.[17]

Hybrid methods have also been introduced that take advantage of FMM's efficiency with FSM's simplicity. For example, the Heap Cell Method (HCM) decomposes the domain into cells and performs FMM on the cell-domain, and each time a "cell" is updated FSM is performed on the local gridpoint-domain that lies within that cell.[5] A parallelized version of HCM has also been developed.[18]

## Numerical approximation

For simplicity assume that ${\displaystyle \Omega }$ is discretized into a uniform grid with spacing ${\displaystyle h}$.

### 2D approximation on a Cartesian grid

Assume that a gridpoint ${\displaystyle x_{ij}}$ has value ${\displaystyle U_{ij}=U(x_{ij})\approx u(x_{ij})}$. A first-order scheme to approximate the partial derivatives is

${\displaystyle \max \left(D_{ij}^{-x}U,-D_{ij}^{+x}U,0\right)^{2}+\max \left(D_{ij}^{-y}U,-D_{ij}^{+y}U,0\right)^{2}\ =\ {\frac {1}{f_{ij}^{2}}}}$

where

${\displaystyle u_{x}(x_{ij})\approx D_{ij}^{\pm x}U={\frac {U_{i\pm 1,j}-U_{ij}}{\pm h}}\quad {\text{ and }}\quad u_{y}(x_{ij})\approx D_{ij}^{\pm y}U={\frac {U_{i,j\pm 1}-U_{ij}}{\pm h}}.}$

Due to the consistent, monotone, and causal properties of this discretization[5] it is easy to show that if ${\displaystyle U_{H}=\min(U_{i-1,j},U_{i+1,j})}$ and ${\displaystyle U_{V}=\min(U_{i,j-1},U_{i,j+1})}$ and ${\displaystyle |U_{H}-U_{V}|\leq h/f_{ij}}$ then

${\displaystyle \left({\frac {U_{ij}-U_{H}}{h}}\right)^{2}+\left({\frac {U_{ij}-U_{V}}{h}}\right)^{2}={\frac {1}{f_{ij}^{2}}}}$

which means

${\displaystyle U_{ij}={\frac {U_{H}+U_{V}}{2}}+{\frac {1}{2}}{\sqrt {(U_{H}+U_{V})^{2}-2\left(U_{H}^{2}+U_{V}^{2}-{\frac {h^{2}}{f_{ij}^{2}}}\right)}}.}$

This solution will always exist as long as ${\displaystyle |U_{H}-U_{V}|\leq {\sqrt {2}}h/f_{ij}}$ is satisfied and is larger than both, ${\displaystyle U_{H}}$ and ${\displaystyle U_{V}}$, as long as ${\displaystyle |U_{H}-U_{V}|\leq h/f_{ij}}$ . If ${\displaystyle |U_{H}-U_{V}|\geq h/f_{ij}}$, a lower-dimensional update must be performed by assuming one of the partial derivatives is ${\displaystyle 0}$:

${\displaystyle U_{ij}=\min(U_{H},U_{V})+{\frac {h}{f_{ij}}}.}$

### n-D approximation on a Cartesian grid

Assume that a grid point ${\displaystyle x}$ has value ${\displaystyle U=U(x)\approx u(x)}$. Repeating the same steps as in the ${\displaystyle n=2}$ case we can use a first-order scheme to approximate the partial derivatives. Let ${\displaystyle U_{i}}$ be the minimum of the values of the neighbors in the ${\displaystyle \pm \mathbf {e} _{i}}$ directions, where ${\displaystyle \mathbf {e} _{i}}$ is a standard unit basis vector. The approximation is then

${\displaystyle \sum _{j=1}^{n}\left({\frac {U-U_{j}}{h}}\right)^{2}\ =\ {\frac {1}{f_{i}^{2}}}.}$

Solving this quadratic equation for ${\displaystyle U}$ yields:

${\displaystyle U={\frac {1}{n}}\sum _{j=1}^{n}U_{j}+{\frac {1}{n}}{\sqrt {\left(\sum _{j=1}^{n}U_{j}\right)^{2}-n\left(\sum _{j=1}^{n}U_{j}^{2}-{\frac {h^{2}}{f_{i}^{2}}}\right)}}.}$

If the discriminant in the square root is negative, then a lower-dimensional update must be performed (i.e. one of the partial derivatives is ${\displaystyle 0}$).

If ${\displaystyle n=2}$ then perform the one-dimensional update

${\displaystyle U={\frac {h}{f_{i}}}+\min _{j=1,\ldots ,n}U_{j}.}$

If ${\displaystyle n\geq 3}$ then perform an ${\displaystyle n-1}$ dimensional update using the values ${\displaystyle \{U_{1},\ldots ,U_{n}\}\setminus \{U_{i}\}}$ for every ${\displaystyle i=1,\ldots ,n}$ and choose the smallest.

## Mathematical description

An eikonal equation is one of the form

${\displaystyle H(x,\nabla u(x))=0}$
${\displaystyle u(0,x')=u_{0}(x'),{\text{ for }}x=(x_{1},x')}$

The plane ${\displaystyle x=(0,x')}$ can be thought of as the initial condition, by thinking of ${\displaystyle x_{1}}$ as ${\displaystyle t.}$ We could also solve the equation on a subset of this plane, or on a curved surface, with obvious modifications.

The eikonal equation shows up in geometrical optics, which is a way of studying solutions of the wave equation ${\displaystyle c^{2}|\nabla _{x}u|^{2}=|\partial _{t}u|^{2}}$, where ${\displaystyle c(x)}$ and ${\displaystyle u(x,t)}$. In geometric optics, the eikonal equation describes the phase fronts of waves. Under reasonable hypothesis on the "initial" data, the eikonal equation admits a local solution, but a global smooth solution (e.g. a solution for all time in the geometrical optics case) is not possible. The reason is that caustics may develop. In the geometrical optics case, this means that wavefronts cross.

We can solve the eikonal equation using the method of characteristics. One must impose the "non-characteristic" hypothesis ${\displaystyle \partial _{p_{1}}H(x,p)\neq 0}$ along the initial hypersurface ${\displaystyle x=(0,x')}$, where H = H(x,p) and p = (p1,...,pn) is the variable that gets replaced by ∇u. Here x = (x1,...,xn) = (t,x′).

First, solve the problem ${\displaystyle H(x,\xi (x))=0}$, ${\displaystyle \xi (x)=\nabla u(x),x\in H}$. This is done by defining curves (and values of ${\displaystyle \xi }$ on those curves) as

${\displaystyle {\dot {x}}(s)=\nabla _{\xi }H(x(s),\xi (s)),\;\;\;\;{\dot {\xi }}(s)=-\nabla _{x}H(x(s),\xi (s)).}$
${\displaystyle x(0)=x_{0},\;\;\;\;\xi (x(0))=\nabla u(x(0)).}$ Note that even before we have a solution ${\displaystyle u}$, we know ${\displaystyle \nabla u(x)}$ for ${\displaystyle x=(0,x')}$ due to our equation for ${\displaystyle H}$.

That these equations have a solution for some interval ${\displaystyle 0\leq s follows from standard ODE theorems (using the non-characteristic hypothesis). These curves fill out an open set around the plane ${\displaystyle x=(0,x')}$. Thus the curves define the value of ${\displaystyle \xi }$ in an open set about our initial plane. Once defined as such it is easy to see using the chain rule that ${\displaystyle \partial _{s}H(x(s),\xi (s))=0}$, and therefore ${\displaystyle H=0}$ along these curves.

We want our solution ${\displaystyle u}$ to satisfy ${\displaystyle \nabla u=\xi }$, or more specifically, for every ${\displaystyle s}$, ${\displaystyle (\nabla u)(x(s))=\xi (x(s)).}$ Assuming for a minute that this is possible, for any solution ${\displaystyle u(x)}$ we must have

${\displaystyle {\frac {d}{ds}}u(x(s))=\nabla u(x(s))\cdot {\dot {x}}(s)=\xi \cdot {\frac {\partial H}{\partial \xi }},}$

and therefore

${\displaystyle u(x(t))=u(x(0))+\int _{0}^{t}\xi (x(s))\cdot {\dot {x}}(s)\,ds.}$

In other words, the solution ${\displaystyle u}$ will be given in a neighborhood of the initial plane by an explicit equation. However, since the different paths ${\displaystyle x(t)}$, starting from different initial points may cross, the solution may become multi-valued, at which point we have developed caustics. We also have (even before showing that ${\displaystyle u}$ is a solution)

${\displaystyle \xi (x(t))=\xi (x(0))-\int _{0}^{t}\nabla _{x}H(x(s),\xi (x(s)))\,ds.}$

It remains to show that ${\displaystyle \xi }$, which we have defined in a neighborhood of our initial plane, is the gradient of some function ${\displaystyle u}$. This will follow if we show that the vector field ${\displaystyle \xi }$ is curl free. Consider the first term in the definition of ${\displaystyle \xi }$. This term, ${\displaystyle \xi (x(0))=\nabla u(x(0))}$ is curl free as it is the gradient of a function. As for the other term, we note

${\displaystyle {\frac {\partial ^{2}}{\partial x_{k}\,\partial x_{j}}}H={\frac {\partial ^{2}}{\partial x_{j}\,\partial x_{k}}}H.}$

The result follows.

## References

1. ^ The Oxford English Dictionary. 2nd ed. 1989. OED Online. Oxford University Press. 4 April 2000 http://dictionary.oed.com/cgi/entry/00292404
2. ^ Evans, L. C. Partial Differential Equations. AMS Graduate Texts in Mathematics. Vol. 19. p. 93.
3. ^ Clawson, Z.; Chacon, A.; Vladimirsky, A. (2014). "Causal Domain Restriction for Eikonal Equations". SIAM Journal on Scientific Computing. 36 (5): A2478–A2505. arXiv:1309.2884. doi:10.1137/130936531.
4. ^ Bardi, M.; Capuzzo-Dolcetta, I. (1997). Optimal Control and Viscosity Solutions of Hamilton–Jacobi–Bellman Equations. Boston: Birkhäuser. ISBN 0-8176-3640-4.
5. Chacon, A.; Vladimirsky, A. (2012). "Fast two-scale methods for eikonal equations". SIAM Journal on Scientific Computing. 34 (2): A547–A578. arXiv:1110.6220. doi:10.1137/10080909X.
6. ^ a b c Kimmel, R.; Sethian, J. A. (1998). "Computing Geodesic Paths on Manifolds". Proceedings of the National Academy of Sciences. 95 (15): 8431–8435. doi:10.1073/pnas.95.15.8431.
7. ^ a b c Bronstein, A. M.; Bronstein, M. M.; Kimmel, R. (2007). "Weighted distance maps computation on parametric three-dimensional manifolds". Journal of Computational Physics. 225 (1): 771–784. doi:10.1016/j.jcp.2007.01.009.
8. ^ a b Sethian, J. A.; Vladimirsky, A. (2000). "Fast methods for the Eikonal and related Hamilton–Jacobi equations on unstructured meshes". Proc. Natl. Acad. Sci. USA. 97 (11): 5699–5703. doi:10.1073/pnas.090060097.
9. ^ a b Yershov, D. S.; LaValle, S. M. (2012). "Simplicial Dijkstra and A* Algorithms: From Graphs to Continuous Spaces". Advanced Robotics. 26 (17): 2065–2085. doi:10.1080/01691864.2012.729559.
10. ^ a b Sethian, J. A. (1996). "A Fast Marching Level Set Method for Monotonically Advancing Fronts". Proc. Natl. Acad. Sci. 93 (4): 1591–1595. doi:10.1073/pnas.93.4.1591.
11. ^ a b Tsitsiklis, J. N. (1995). "Efficient algorithms for globally optimal trajectories". IEEE Trans. Automat. Control. 40 (9): 1528–1538. doi:10.1109/9.412624.
12. ^ Bertsekas, D. P. (1993). "A Simple and Fast Label Correcting Algorithm for Shortest Paths". Networks. 23 (8): 703–709. doi:10.1002/net.3230230808. hdl:1721.1/3256.
13. ^ Bertsekas, D. P.; Guerriero, F.; Musmanno, R. (1996). "Parallel Asynchronous Label Correcting Methods for Shortest Paths". Journal of Optimization Theory and Applications. 88: 297–320. doi:10.1007/BF02192173.
14. ^ a b Bak, S.; McLaughlin, J.; Renzi, D. (2010). "Some improvements for the fast sweeping method". SIAM Journal on Scientific Computing. 32 (5): 2853–2874. doi:10.1137/090749645.
15. ^ Zhao, H. (2004). "A fast sweeping method for eikonal equations". Math. Comp. 74: 603–627. doi:10.1090/S0025-5718-04-01678-3.
16. ^ Zhao, H. (2007). "Parallel Implementations of the Fast Sweeping Method". J. Comput. Math. 25 (4): 421–429. JSTOR 43693378.
17. ^ Detrixhe, M.; Gibou, F.; Min, C. (2013). "A parallel fast sweeping method for the Eikonal equation". Journal of Computational Physics. 237: 46–55. doi:10.1016/j.jcp.2012.11.042.
18. ^ Chacon, A.; Vladimirsky, A. (2015). "A parallel two-scale method for Eikonal equations". SIAM Journal on Scientific Computing. 37 (1): A156–A180. arXiv:1306.4743. doi:10.1137/12088197X.