SignedPoisson

Poisson approximation to the signed distance function.

Defined in Rodin/Distance/SignedPoisson.h

class SignedPoisson;

This class computes an approximation to the signed distance function by solving a Poisson equation with different forcing terms in interior and exterior regions:

\[ -\Delta u = f \quad \text{in } \Omega \]
\[ u = 0 \quad \text{on } \Gamma \]

where $ f $ changes sign based on the region, and $ \Gamma $ is the interface.

Variants

Two mathematical variants are available:

  1. Negative interior approximation (full domain)
  2. Signed distance (with specified interior/interface regions)

Usage Example

P1 fes(mesh);
SignedPoisson signedDist;
// Signed distance with regions:
auto u = signedDist(interfaceAttr, interiorAttr, fes);

Public functions

template<class FES>
auto operator()(const FES& fes) const -> auto
Computes the negative full-domain Poisson approximation.
operator()
Computes the signed distance for specified interface and region.
See declaration
template<class FES>
auto operator()(Geometry::Attribute interface, Geometry::Attribute region, const FES& fes) const -> auto
operator()
Computes the signed distance for specified interface and region sets.
See declaration
template<class FES>
auto operator()(const FlatSet<Geometry::Attribute>& interface, const FlatSet<Geometry::Attribute>& region, const FES& fes) const -> auto

Function documentation

template<class FES>
auto operator()(const FES& fes) const

Computes the negative full-domain Poisson approximation.

Template parameters
FES Finite element space type
Parameters
fes in Finite element space on which to solve
Returns Grid function containing the distance approximation

Solves the Poisson equation over the entire domain with uniform forcing term $ -\Delta u = -1 $ and zero boundary values.

template<class FES>
auto operator()(Geometry::Attribute interface, Geometry::Attribute region, const FES& fes) const

Computes the signed distance for specified interface and region.

Template parameters
FES Finite element space type
Parameters
interface in Attribute marking the interface (zero level set)
region in Attribute marking the interior region
fes in Finite element space on which to solve
Returns Grid function containing the signed distance approximation

Convenience overload that accepts single attributes for interface and region.

template<class FES>
auto operator()(const FlatSet<Geometry::Attribute>& interface, const FlatSet<Geometry::Attribute>& region, const FES& fes) const

Computes the signed distance for specified interface and region sets.

Template parameters
FES Finite element space type
Parameters
interface in Set of attributes marking the interface
region in Set of attributes marking the interior region
fes in Finite element space on which to solve
Returns Grid function containing the signed distance approximation

Solves the Poisson equation with different forcing terms in the interior and exterior regions, creating a signed distance approximation.