Rodin::Distance::SpaldingTucker class

Spalding-Tucker normalization for a level set function.

This class implements the Spalding-Tucker normalization method, which transforms an arbitrary level set function into an approximate signed distance function. The transformation is given by:

\[ d(x) = \frac{2u(x)}{|\nabla u(x)| + \sqrt{|\nabla u(x)|^2 + 2|u(x)|}} \]

where $ u $ is the input level set function and $ d $ is the normalized approximate signed distance.

Mathematical Properties

  • Preserves the zero level set: $ d(x) = 0 \iff u(x) = 0 $
  • Preserves the sign: $ \text{sign}(d) = \text{sign}(u) $
  • Better gradient normalization than simple Rvachev method
  • More accurate near the interface

References

[2] [9] [10]

Usage Example

GridFunction u(fes);  // Some level set function
SpaldingTucker st;
auto dist = st(u);  // Normalized distance approximation

Public functions

template<class FES, class Data>
auto operator()(const Variational::GridFunction<FES, Data>& gf) -> auto
Applies Spalding-Tucker normalization to a grid function.

Function documentation

template<class FES, class Data>
auto Rodin::Distance::SpaldingTucker::operator()(const Variational::GridFunction<FES, Data>& gf)

Applies Spalding-Tucker normalization to a grid function.

Template parameters
FES Finite element space type
Data Data storage type
Parameters
gf in Input level set grid function
Returns Normalized grid function approximating signed distance