template<>
Distancer<typename FormLanguage::Traits<RealGridFunction>::FESType> class
Class which generates the signed distance function of a domain.
Given a domain , with boundary then the signed distance function is defined by:
where
Constructors, destructors, conversion operators
- Distancer(const FESType& fes)
- Creates a Distancer2D object with default values.
Public functions
-
auto setInteriorDomain(const Geometry::
Attribute& ref) -> Distancer& - Specifies which material reference is to be understood as the interior domains.
-
auto setInteriorDomain(const FlatSet<Geometry::
Attribute>& refs) -> Distancer& - Specifies which material references are to be understood as the interior domains.
- auto enableScaling(bool b = true) -> Distancer&
- Specifies whether to enable the scaling of the contour mesh.
- auto setCPUs(unsigned int ncpu) -> Distancer&
- Specifies how many CPUs to use when distancing in parallel.
- auto getCPUs() const -> unsigned int
-
auto distance(const Geometry::
Mesh<Context:: Sequential>& box) -> RealGridFunction - Computes a signed distance function to a subdomain.
-
auto distance(const Geometry::
Mesh<Context:: Sequential>& box, const Geometry:: Mesh<Context:: Sequential>& contour) -> RealGridFunction - Computes a signed distance function from a given bounding box and contour.
Function documentation
template<>
Rodin:: External:: MMG:: Distancer<typename FormLanguage:: Traits<RealGridFunction>:: FESType>:: Distancer(const FESType& fes)
Creates a Distancer2D object with default values.
Parameters | |
---|---|
fes in | Finite element space for the distance function |
template<>
Distancer& Rodin:: External:: MMG:: Distancer<typename FormLanguage:: Traits<RealGridFunction>:: FESType>:: setInteriorDomain(const Geometry:: Attribute& ref)
Specifies which material reference is to be understood as the interior domains.
Parameters | |
---|---|
ref in | Interior material reference |
Returns | Reference to self (for method chaining) |
By default, the interior elements are assumed to have the material reference 3.
template<>
Distancer& Rodin:: External:: MMG:: Distancer<typename FormLanguage:: Traits<RealGridFunction>:: FESType>:: setInteriorDomain(const FlatSet<Geometry:: Attribute>& refs)
Specifies which material references are to be understood as the interior domains.
Parameters | |
---|---|
refs in | Interior material references |
Returns | Reference to self (for method chaining) |
By default, the interior elements are assumed to have the material reference 3.
template<>
Distancer& Rodin:: External:: MMG:: Distancer<typename FormLanguage:: Traits<RealGridFunction>:: FESType>:: enableScaling(bool b = true)
Specifies whether to enable the scaling of the contour mesh.
Specifies whether the contour mesh should be scaled down so that the contour's bounding box is 95% of the enclosing bounding box.
By default, it is enabled.
template<>
Distancer& Rodin:: External:: MMG:: Distancer<typename FormLanguage:: Traits<RealGridFunction>:: FESType>:: setCPUs(unsigned int ncpu)
Specifies how many CPUs to use when distancing in parallel.
Parameters | |
---|---|
ncpu in | Number of CPUs to use |
By default, it will utilize std::thread::hardware_concurrency()
.
template<>
unsigned int Rodin:: External:: MMG:: Distancer<typename FormLanguage:: Traits<RealGridFunction>:: FESType>:: getCPUs() const
Returns | Number of CPUs which will be used when performing the distancing. |
---|
template<>
RealGridFunction Rodin:: External:: MMG:: Distancer<typename FormLanguage:: Traits<RealGridFunction>:: FESType>:: distance(const Geometry:: Mesh<Context:: Sequential>& box)
Computes a signed distance function to a subdomain.
Parameters | |
---|---|
box in | Bounding box containing . |
Returns | Signed distance function representing . |
This function generates the signed distance function to a domain which is contained in the given bounding box , where is identified by its material reference. By default, the elements of are assumed to be specified by the number 3.
template<>
RealGridFunction Rodin:: External:: MMG:: Distancer<typename FormLanguage:: Traits<RealGridFunction>:: FESType>:: distance(const Geometry:: Mesh<Context:: Sequential>& box,
const Geometry:: Mesh<Context:: Sequential>& contour)
Computes a signed distance function from a given bounding box and contour.
Parameters | |
---|---|
box in | Bounding box containing the contour. |
contour in | Orientable contour to distance. |
Returns | Signed distance function representing . |
This function generates the signed distance function to a domain supplied by means of a mesh of its boundary , at the vertices of a computational mesh of a bounding box .