Eikonal

Distance function computation using the Eikonal equation.

Defined in Rodin/Distance/Eikonal.h

template <
  class FES,
  class Data>
class Eikonal;
Template parameters
FES Finite element space type
Data Data storage type for the solution

This class solves the Eikonal equation $ |\nabla d| = 1 $ to compute distance functions on meshes using the Fast Marching Method. It can optionally compute signed distance functions by specifying interior regions.

Mathematical Background

The Eikonal equation describes the propagation of wavefronts with unit speed, which is equivalent to computing distances. The Fast Marching Method solves this equation efficiently on unstructured meshes.

Usage Example

P1 fes(mesh);
GridFunction u(fes);
Eikonal eikonal(u);
eikonal.setInterface(interfaceAttr)
       .setInterior(interiorAttr)
       .solve()
       .sign();
Direct inheritance by class family
↓
Eikonal

Inherits from

Base classResponsibility
Base<Eikonal<FES, Data>>public
Full type
Base< Eikonal< FES, Data > >
Base class for distance function computation models using CRTP.

Inherited interface

Declared inMembers
Base
4 members

Public types

using SolutionType = Variational::GridFunction<FES, Data>
Solution type: grid function containing the distance values.

Constructors, destructors, conversion operators

Eikonal(SolutionType& u)
Constructs an Eikonal distance solver.

Public functions

auto solve() -> Eikonal&
Solves the Eikonal equation to compute the distance function.
auto sign() -> Eikonal&
Computes the sign of the distance function.

Function documentation

Eikonal(SolutionType& u)

Constructs an Eikonal distance solver.

Parameters
u in/out Grid function to store the computed distance values

Eikonal& solve()

Solves the Eikonal equation to compute the distance function.

Returns Reference to this object for method chaining

This method seeds the Fast Marching Method at the interface region and propagates the distance values throughout the domain.

Eikonal& sign()

Computes the sign of the distance function.

Returns Reference to this object for method chaining

This method assigns negative values to the distance function in the interior region, converting an unsigned distance to a signed distance function. Must be called after solve().