SpaldingTucker class
#include <Rodin/Distance/SpaldingTucker.h>
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:
where is the input level set function and is the normalized approximate signed distance.
Mathematical Properties
- Preserves the zero level set:
- Preserves the sign:
- Better gradient normalization than simple Rvachev method
- More accurate near the interface
References
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 |