Written and maintained by CASRAI Editorial Board
Published
On this page
The level-set method tracks a moving boundary, such as the surface between two fluids, by storing it implicitly: the interface is the set of points where a function φ(x), defined on the whole computational grid, equals zero. Instead of following points along the boundary, you evolve φ with a partial differential equation, and the boundary is read off wherever φ crosses zero. Because the interface is never stored as a list of points, it can merge, split or develop corners without special bookkeeping (Persson, UC Berkeley Math 228B notes; Sethian, Berkeley).
Short answer
To “do a level set” therefore means three things in practice: choose a function φ whose zero level set is your interface, move φ with a speed F that encodes the physics, and periodically repair φ so that it stays well behaved near the interface. The sections below set out each choice and where the common variants differ.
Definition and scope
A level set of a function is the set of points where the function takes a fixed value; the method uses the zero level set. In the lecture notes for Berkeley’s Math 228B, Per-Olof Persson describes the interface as the zero level set of φ, with φ defined everywhere on a background grid, so that the interface is accessed implicitly by operating on φ rather than on the curve itself. Sethian’s overview of the formulation puts the same idea geometrically: a curve is recast as a surface evolving in one dimension higher, and the zero level set φ = 0 is identified with the evolving curve.
The method was introduced by Stanley Osher and James Sethian in Journal of Computational Physics 79 (1988), 12-49, “Fronts Propagating with Curvature-Dependent Speed: Algorithms Based on Hamilton-Jacobi Formulations”, and developed further in Sethian’s 1990 paper in the Journal of Differential Geometry 31, 131-161. Sethian lists flame propagation, crystal growth and oil-water boundaries among the examples of curvature-dependent interface motion in that 1990 work.
Scope matters when you read the literature. The core method is a way to represent and move an interface on a fixed grid. Everything else (surface tension models, contact-line treatment, image-segmentation energies, shape-optimisation objectives) is built on top of it. Related CASRAI pages cover two such uses: topology optimization and image segmentation.
How it works in practice
Representing the interface
The interface is the zero level set of φ. The method does not require φ to be a signed distance function, which has the property |∇φ| = 1, but Persson notes that accuracy suffers when the gradient of φ varies a lot, so φ is normally kept close to a distance function. Two geometric quantities come directly from φ: the unit normal n = ∇φ/|∇φ|, and, in two dimensions, the curvature κ = ∇·(∇φ/|∇φ|).
Moving the interface
If every point of the interface moves with velocity v, then φ satisfies φt + v·∇φ = 0. When the motion is normal to the interface, v = F n, this reduces to φt + F|∇φ| = 0, the equation Sethian uses to define the formulation. Note that this moves every level set of φ, not only the zero one; the zero level set is simply the one you care about (Persson).
The notes discretise the advection term with first-order upwinding chosen by the sign of F, and the curvature terms with central differences. Sethian names the situations that motivated the approach: speed that depends on curvature, fronts that do not remain graphs because they merge or break, and corners and cusps. His summary is that topological changes in the evolving front are handled naturally. Persson contrasts this with explicit, node-based methods, which need special treatment when curves merge.
Keeping φ well behaved: reinitialization
Advection distorts φ, so it stops resembling a distance function. Persson describes two repairs. One is to solve φt + sign(φ)(|∇φ| − 1) = 0 for a short pseudo-time, with the sign function smoothed over a few grid cells. The other is to rebuild the distance function with fast marching. Reinitialization is where many practical differences between level-set codes sit, and it is an active research topic: Waclawczyk (Journal of Computational Physics 299, 2015, arXiv:1506.04268) reports that the reinitialization and advection equations of the conservative level-set approach are mathematically equivalent to localized signed-distance equations, and that a new discretization gives second-order convergence of the interface curvature without artificial deformation of the interface after many reinitialization steps.
Reducing cost: narrow band and fast marching
Adding a dimension costs computation. Sethian states that Narrow Band methods reduce that cost, and that when the speed F keeps one sign, the Fast Marching Method, which uses a stationary formulation, is much faster. In that formulation the front is described by its arrival time T(x): |∇T| F = 1, with T = 0 on the initial interface. Persson notes that fast marching solves this with a priority queue at O(n log n) cost.
Two formulations and a decision cross-walk
The data table below this page’s text compares the main formulations and components, with the equation, the condition under which each applies, and the source. The cross-walk here turns those into the decisions a user of a level-set code must make.
| Decision | Options described in the sources | What the sources say about the choice |
|---|---|---|
| Representation of φ | General function with zero level set at the interface, or a signed distance function (|∇φ| = 1) | The method does not require a distance function, but accuracy suffers when |∇φ| varies strongly (Persson) |
| Speed F | Velocity field v, or normal speed F with v = F n; may depend on curvature κ | Curvature-dependent speed is a motivating case (Sethian) |
| Spatial scheme | First-order upwind for advection; central differences for curvature | Upwind direction follows the sign of F (Persson) |
| Repairing φ | Solve the reinitialization equation for a short time, or rebuild with fast marching | Sign function smoothed over a few cells in the PDE form (Persson) |
| Cost control | Narrow band, or fast marching | Fast marching applies when F keeps one sign (Sethian) |
| Time-dependent or arrival-time view | φt + F|∇φ| = 0, or |∇T| F = 1 | The arrival-time form gives one arrival time per point, so it fits fronts that move in one direction (Sethian, Persson) |
Related variants and where the method matters
Conservative level set
A recurring concern in two-phase flow is that standard level-set schemes can gain or lose volume of a fluid. The conservative level-set variant addresses this by changing how φ is represented and reinitialized. Parameswaran and Mandal (arXiv:2012.08747, later published in European Journal of Mechanics B/Fluids) state in their abstract that an existing artificial-compression reinitialization scheme for the conservative method has drawbacks including distortion of the fluid-fluid interface, unphysical patch formation away from the interface and lack of mass conservation, and they propose a reformulated reinitialization equation that improves mass conservation and permits larger time steps. They test it on scalar advection and incompressible two-phase flow problems, and on an unstructured mesh of triangular and quadrilateral cells.
Fluid interfaces and process engineering
Two-phase interface problems of this kind are the setting in which a chemical or process-engineering team meets the method: the interface between two fluids, tracked on a fixed grid, is moved by a velocity field computed from the flow. Sethian’s oil-water boundary example belongs to the same family. The method itself is only the interface-tracking component; the flow solver, surface tension model and mesh are separate choices.
Other applications
The same machinery appears in image analysis and design optimisation, where the evolving interface is a region boundary or a material boundary. See the CASRAI pages on image segmentation and topology optimization for those settings.
Common misunderstandings
- “The level set is the interface.” Only the zero level set is the interface. Every level set of φ is advected by the same equation, so the others move too (Persson).
- “φ has to be a distance function.” It does not, but keeping it close to one protects accuracy, which is why reinitialization exists (Persson).
- “Topology changes need no care at all.” Merging and breaking need no special code in the formulation (Sethian), but the numerical quality of the result still depends on how φ is discretised and reinitialized, which is the subject of the continuing research cited above.
- “Level set means fast marching.” They are related but not identical. Fast marching solves the arrival-time form and applies when F keeps one sign; the evolution form has no such restriction (Sethian).
- “The method conserves volume by construction.” Standard schemes can lose or gain mass in two-phase flow, which motivated conservative variants (Parameswaran and Mandal).
Frequently asked questions
What does it mean to do a level set?
It means representing a boundary as the zero level set of a function φ on a grid, moving φ with φt + F|∇φ| = 0 for a chosen speed F, and reading the new boundary from where φ is zero (Persson; Sethian).
Does the level-set method handle merging and splitting boundaries?
Yes. Sethian writes that topological changes in the evolving front are handled naturally, because the interface is a level set of a function and not a connected list of points.
What is reinitialization and why is it needed?
It restores φ to a near signed-distance function after advection distorts it. Persson gives the equation φt + sign(φ)(|∇φ| − 1) = 0, solved for a short time, and fast marching as an alternative.
When can fast marching replace the time-dependent method?
When the speed F keeps one sign, so the front passes each point once. The problem becomes |∇T| F = 1 with T = 0 on the initial interface (Sethian; Persson).
Where do the other questions that appear in searches belong?
Searches for the level-set method also surface unrelated mathematics queries, such as curves with similar-sounding names or rankings of mathematical subjects. Those are separate topics and are not covered by this method.
Sources
- Persson, P.-O., “The Level Set Method: Lecture Notes”, UC Berkeley Math 228B, persson.berkeley.edu/math228b/html/levelset_notes.html (read 2026-11-20).
- Sethian, J. A., “The Level Set Formulation”, math.berkeley.edu/~sethian (read 2026-11-20).
- Osher, S. and Sethian, J. A., “Fronts Propagating with Curvature-Dependent Speed: Algorithms Based on Hamilton-Jacobi Formulations”, J. Comput. Phys. 79 (1988) 12-49, PDF (citation checked 2026-11-20).
- Waclawczyk, T., arXiv:1506.04268, J. Comput. Phys. 299 (2015) 487-525, arxiv.org/abs/1506.04268 (abstract read 2026-11-20).
- Parameswaran, S. and Mandal, J. C., “A Novel Reinitialization Scheme for Conservative Level Set Method”, arXiv:2012.08747, arxiv.org/abs/2012.08747 (abstract read 2026-11-20).
Data: Level-set method: formulations and components compared
Compares the evolution (time-dependent) formulation, the arrival-time (stationary) formulation, reinitialization, narrow band and fast marching of the level-set method by governing equation and condition of use, compiled from university lecture notes and the method's originator's overview.
| Formulation or component | Governing equation or procedure | Applies when | Source |
|---|---|---|---|
| Evolution form | φ_t + F|∇φ| = 0, all level sets advected | Front may move in both directions and may merge or break | Persson; Sethian |
| Arrival-time (boundary-value) form | |∇T| F = 1, T = 0 on the initial interface | Speed F keeps one sign | Persson; Sethian |
| PDE reinitialization | φ_t + sign(φ)(|∇φ| − 1) = 0 for a short pseudo-time, sign smoothed over a few cells | φ has drifted from a signed distance function | Persson |
| Fast marching | Priority-queue solution of the arrival-time form, O(n log n) | Speed F keeps one sign; also used to rebuild distance functions | Persson; Sethian |
| Narrow band | Computation restricted near the zero level set | Reducing the cost of the extra dimension | Sethian |
| Upwind advection | First-order upwind by sign of F; central differences for curvature | Discretising the evolution equation | Persson |
Sources
- Persson, The Level Set Method: Lecture Notes (UC Berkeley Math 228B) (accessed 2026-11-20)
- Sethian, The Level Set Formulation (accessed 2026-11-20)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







