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:
where changes sign based on the region, and is the interface.
Variants
Two mathematical variants are available:
- Negative interior approximation (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 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 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.