# Fast marching method

The fast marching method[1] is a numerical method created by James Sethian for solving boundary value problems of the Eikonal equation:

${\displaystyle |\nabla u(x)|=1/f(x){\text{ for }}x\in \Omega }$
${\displaystyle u(x)=0{\text{ for }}x\in \partial \Omega }$

Typically, such a problem describes the evolution of a closed surface as a function of time ${\displaystyle u}$ with speed ${\displaystyle f}$ in the normal direction at a point ${\displaystyle x}$ on the propagating surface. The speed function is specified, and the time at which the contour crosses a point ${\displaystyle x}$ is obtained by solving the equation. Alternatively, ${\displaystyle u(x)}$ can be thought of as the minimum amount of time it would take to reach ${\displaystyle \partial \Omega }$ starting from the point ${\displaystyle x}$. The fast marching method takes advantage of this optimal control interpretation of the problem in order to build a solution outwards starting from the "known information", i.e. the boundary values.

The algorithm is similar to Dijkstra's algorithm and uses the fact that information only flows outward from the seeding area. This problem is a special case of level set methods. More general algorithms exist but are normally slower.

Extensions to non-flat (triangulated) domains solving

${\displaystyle |\nabla _{S}u(x)|=1/f(x),}$

for the surface ${\displaystyle S}$ and ${\displaystyle x\in S}$, were introduced by Ron Kimmel and James Sethian.

## Algorithm

First, assume that the domain has been discretized into a mesh. We will refer to meshpoints as nodes. Each node ${\displaystyle x_{i}}$ has a corresponding value ${\displaystyle U_{i}=U(x_{i})\approx u(x_{i})}$.

The algorithm works just like Dijkstra's algorithm but differs in how the nodes' values are calculated. In Dijkstra's algorithm, a node's value is calculated using a single one of the neighboring nodes. However, in solving the PDE in ${\displaystyle \mathbb {R} ^{n}}$, between ${\displaystyle 1}$ and ${\displaystyle n}$ of the neighboring nodes are used.

Nodes are labeled as far (not yet visited), considered (visited and value tentatively assigned), and accepted (visited and value permanently assigned).

1. Assign every node ${\displaystyle x_{i}}$ the value of ${\displaystyle U_{i}=+\infty }$ and label them as far; for all nodes ${\displaystyle x_{i}\in \partial \Omega }$ set ${\displaystyle U_{i}=0}$ and label ${\displaystyle x_{i}}$ as accepted.
2. For every far node ${\displaystyle x_{i}}$, use the Eikonal update formula to calculate a new value for ${\displaystyle {\tilde {U}}}$. If ${\displaystyle {\tilde {U}} then set ${\displaystyle U_{i}={\tilde {U}}}$ and label ${\displaystyle x_{i}}$ as considered.
3. Let ${\displaystyle {\tilde {x}}}$ be the considered node with the smallest value ${\displaystyle U}$. Label ${\displaystyle {\tilde {x}}}$ as accepted.
4. For every neighbor ${\displaystyle x_{i}}$ of ${\displaystyle {\tilde {x}}}$ that is not-accepted, calculate a tentative value ${\displaystyle {\tilde {U}}}$.
5. If ${\displaystyle {\tilde {U}} then set ${\displaystyle U_{i}={\tilde {U}}}$. If ${\displaystyle x_{i}}$ was labeled as far, update the label to considered.
6. If there exists a considered node, return to step 3. Otherwise, terminate.