#include <Rodin/Distance/Eikonal.h>
template<class FES, class Data>
Eikonal class
Distance function computation using the Eikonal equation.
| Template parameters | |
|---|---|
| FES | Finite element space type |
| Data | Data storage type for the solution |
This class solves the Eikonal equation 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();
Base classes
-
template<class Derived>class Base<Eikonal<FES, Data>>
- Base class for distance function computation models using CRTP.
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
Function documentation
template<class FES, class Data>
Rodin:: Distance:: Eikonal<FES, Data>:: Eikonal(SolutionType& u)
Constructs an Eikonal distance solver.
| Parameters | |
|---|---|
| u in/out | Grid function to store the computed distance values |
template<class FES, class Data>
Eikonal& Rodin:: Distance:: Eikonal<FES, Data>:: 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.
template<class FES, class Data>
Eikonal& Rodin:: Distance:: Eikonal<FES, Data>:: 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().