SignedPoisson class
#include <Rodin/Distance/SignedPoisson.h>
Poisson approximation to the signed distance function.
This class computes an approximation to the signed distance function by solving a Poisson equation with different forcing terms in interior and exterior regions:
where changes sign based on the region, and is the interface.
Variants
This class provides two operator() overloads:
- Unsigned distance (full domain)
- 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 unsigned Poisson-based distance approximation.
-
template<class FES>auto operator()(Geometry::
Attribute interface, Geometry:: Attribute region, const FES& fes) const -> auto - Computes the signed distance for specified interface and region.
-
template<class FES>auto operator()(const FlatSet<Geometry::
Attribute>& interface, const FlatSet<Geometry:: Attribute>& region, const FES& fes) const -> auto - Computes the signed distance for specified interface and region sets.
Function documentation
template<class FES>
auto Rodin:: Distance:: SignedPoisson:: operator()(const FES& fes) const
Computes the unsigned Poisson-based distance 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.
template<class FES>
auto Rodin:: Distance:: SignedPoisson:: 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 Rodin:: Distance:: SignedPoisson:: 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.