Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
vulpes::geometry::Simplexify< Dim, typename > Class Template Reference

A templated class that simplifies a geometric cell into simplices (triangles or tetrahedra). More...

#include <simplexify.hpp>

Public Types

using SimplexifyEngine
 The engine used for simplex generation, determined by the dimension.
using float_t = SimplexifyEngine::float_t
using index_t = SimplexifyEngine::index_t
using PointsType = SimplexifyEngine::PointsType
using SimplexesType = SimplexifyEngine::SimplexesType
using PointsViewType = SimplexifyEngine::PointsViewType
using SimplexesViewType = SimplexifyEngine::SimplexesViewType

Public Member Functions

template<typename T = void, typename = std::enable_if_t<Dim == 2, T>>
 Simplexify (const geometry::Cell< 2, float_t, index_t > &cell, bool=false)
 Constructs a simplexification for the given geometric cell.
template<typename T = void, typename = std::enable_if_t<Dim == 3, T>>
 Simplexify (const geometry::Cell< 3, float_t, index_t > &cell, bool reconstruct_boundaries=false)
 Constructs a simplexification for the given geometric cell.
auto getSubsimplexesListFacet (index_t face_id) const
 List the sub-simplexes (segments in 2D or triangles in 3D) that make a certain face in the simplixification.
index_t getNumPoints () const
 Gets the number of points in the simplexification.
index_t getNumSimplexes () const
 Gets the number of simplices in the simplexification.
const PointsViewType & getPointList () const
 Gets the list of points in the simplexification.
const SimplexesViewType & getSimplexesList () const
 Gets the list of simplices in the simplexification.

Static Public Attributes

static constexpr int32_t dim = SimplexifyEngine::dim

Protected Attributes

SimplexifyEngine m_engine

Detailed Description

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
class vulpes::geometry::Simplexify< Dim, typename >

A templated class that simplifies a geometric cell into simplices (triangles or tetrahedra).

This class provides a unified interface for performing either 2D triangulation or 3D tetrahedralization, depending on the dimension (Dim) of the input cell. It leverages the Triangulation class for 2D cases and the Tetrahedralization class for 3D cases.

Template Parameters
DimThe dimension of the input cell. Must be 2 (for 2D) or 3 (for 3D).
EnableSFINAE helper to restrict the template parameter to valid dimensions.

Member Typedef Documentation

◆ float_t

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
using vulpes::geometry::Simplexify< Dim, typename >::float_t = SimplexifyEngine::float_t

◆ index_t

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
using vulpes::geometry::Simplexify< Dim, typename >::index_t = SimplexifyEngine::index_t

◆ PointsType

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
using vulpes::geometry::Simplexify< Dim, typename >::PointsType = SimplexifyEngine::PointsType

◆ PointsViewType

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
using vulpes::geometry::Simplexify< Dim, typename >::PointsViewType = SimplexifyEngine::PointsViewType

◆ SimplexesType

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
using vulpes::geometry::Simplexify< Dim, typename >::SimplexesType = SimplexifyEngine::SimplexesType

◆ SimplexesViewType

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
using vulpes::geometry::Simplexify< Dim, typename >::SimplexesViewType = SimplexifyEngine::SimplexesViewType

◆ SimplexifyEngine

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
using vulpes::geometry::Simplexify< Dim, typename >::SimplexifyEngine
Initial value:
std::conditional_t<Dim == 2, Triangulation, Tetrahedralization>

The engine used for simplex generation, determined by the dimension.

If Dim is 2, this is an alias for Triangulation. If Dim is 3, this is an alias for Tetrahedralization.

Constructor & Destructor Documentation

◆ Simplexify() [1/2]

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
template<typename T = void, typename = std::enable_if_t<Dim == 2, T>>
vulpes::geometry::Simplexify< Dim, typename >::Simplexify ( const geometry::Cell< 2, float_t, index_t > & cell,
bool = false )
inlineexplicit

Constructs a simplexification for the given geometric cell.

The appropriate simplexification engine (Triangulation or Tetrahedralization) is initialized based on the dimension of the input cell.

Parameters
cellA geometric cell to be simplexified, represented by geometry::Cell<Dim, float_t, index_t>.

◆ Simplexify() [2/2]

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
template<typename T = void, typename = std::enable_if_t<Dim == 3, T>>
vulpes::geometry::Simplexify< Dim, typename >::Simplexify ( const geometry::Cell< 3, float_t, index_t > & cell,
bool reconstruct_boundaries = false )
inlineexplicit

Constructs a simplexification for the given geometric cell.

The appropriate simplexification engine (Triangulation or Tetrahedralization) is initialized based on the dimension of the input cell.

Parameters
cellA geometric cell to be simplexified, represented by geometry::Cell<Dim, float_t, index_t>.
reconstruct_boundariesBoolean indicating the necessity to find which faces of the tetrahedrons belong to the boundary of the cell

Member Function Documentation

◆ getNumPoints()

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
index_t vulpes::geometry::Simplexify< Dim, typename >::getNumPoints ( ) const
inline

Gets the number of points in the simplexification.

Returns
The total number of points in the generated simplices.

◆ getNumSimplexes()

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
index_t vulpes::geometry::Simplexify< Dim, typename >::getNumSimplexes ( ) const
inline

Gets the number of simplices in the simplexification.

Depending on the dimension, this corresponds to:

  • Number of triangles (for 2D).
  • Number of tetrahedra (for 3D).
Returns
The total number of simplices generated.

◆ getPointList()

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
const PointsViewType & vulpes::geometry::Simplexify< Dim, typename >::getPointList ( ) const
inline

Gets the list of points in the simplexification.

The points are represented as an appropriate container or view type (PointsViewType) based on the underlying simplexification engine.

Returns
A reference to a view of the point list.

◆ getSimplexesList()

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
const SimplexesViewType & vulpes::geometry::Simplexify< Dim, typename >::getSimplexesList ( ) const
inline

Gets the list of simplices in the simplexification.

Depending on the dimension, this corresponds to:

  • A list of triangles (for 2D).
  • A list of tetrahedra (for 3D).

The simplices are represented as an appropriate container or view type (SimplexesViewType) based on the underlying simplexification engine.

Returns
A reference to a view of the simplex list.

◆ getSubsimplexesListFacet()

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
auto vulpes::geometry::Simplexify< Dim, typename >::getSubsimplexesListFacet ( index_t face_id) const
inline

List the sub-simplexes (segments in 2D or triangles in 3D) that make a certain face in the simplixification.

Member Data Documentation

◆ dim

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
int32_t vulpes::geometry::Simplexify< Dim, typename >::dim = SimplexifyEngine::dim
staticconstexpr

◆ m_engine

template<std::size_t Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
SimplexifyEngine vulpes::geometry::Simplexify< Dim, typename >::m_engine
protected

The documentation for this class was generated from the following file: