Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
vulpes::geometry::vulpoly Namespace Reference

VulPoly meshing options and algorithm parameters. More...

Classes

struct  VulPolyParams
 Parameters controlling VulPoly relaxation and mesh cleanup. More...

Typedefs

template<typename FloatType, typename IndexType, IndexType Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
using Mesh
 Select the concrete mesh type for a supported spatial dimension.

Enumerations

enum  RandomEngine : std::uint8_t { Pseudo , AdditiveRecurrence }
 Available random or low-discrepancy seed generation strategies. More...

Functions

template<typename FloatType, typename IndexType, IndexType Dim, typename D>
std::pair< Mesh< FloatType, IndexType, Dim >, std::vector< Point< FloatType, Dim > > > mesh (const DistanceExpression< FloatType, Dim, D > &distanceFunction, size_t n_elems, const std::vector< Point< FloatType, Dim > > &fixed_pts={}, const VulPolyParams< FloatType > &params={}, size_t seed=0)
 Generate a VulPoly mesh from a requested number of seeds.
template<typename FloatType, typename IndexType, IndexType Dim, typename D>
Mesh< FloatType, IndexType, Dim > mesh (std::vector< Point< FloatType, Dim > > &center_pts, const DistanceExpression< FloatType, Dim, D > &distanceFunction, const std::vector< Point< FloatType, Dim > > &fixed_pts={}, const VulPolyParams< FloatType > &params={})
 Generate a VulPoly mesh from caller-supplied seed points.
template<typename FloatType, typename IndexType>
auto buildHexagonTessellation (const Point< FloatType, 2 > &corner_a, const Point< FloatType, 2 > &corner_b, const Point< IndexType, 2 > &n_divisions)
 Build a 2D hexagonal seed tessellation and mesh its rectangle.
template<typename FloatType, typename IndexType>
auto buildOctahedronTessellation (const Point< FloatType, 3 > &corner_a, const Point< FloatType, 3 > &corner_b, const Point< IndexType, 3 > &n_divisions)
 Build a 3D hexahedral-domain mesh from an octahedral seed pattern.

Detailed Description

VulPoly meshing options and algorithm parameters.

VulPoly mesh generation API.

VulPoly adapts the PolyMesher approach; see the file reference.

Typedef Documentation

◆ Mesh

template<typename FloatType, typename IndexType, IndexType Dim, typename = std::enable_if_t<(Dim == 2) || (Dim == 3)>>
using vulpes::geometry::vulpoly::Mesh
Initial value:
std::conditional_t<
Dim == 2,
A class for a 2D mesh, inheriting from MeshBase.
Definition mesh_2d.hpp:94
Represents a 3D mesh.
Definition mesh_3d.hpp:82

Select the concrete mesh type for a supported spatial dimension.

Enumeration Type Documentation

◆ RandomEngine

Available random or low-discrepancy seed generation strategies.

Enumerator
Pseudo 

Draw independent uniform samples from the unit box.

AdditiveRecurrence 

Generate points with the additive recurrence sequence.

Function Documentation

◆ buildHexagonTessellation()

template<typename FloatType, typename IndexType>
auto vulpes::geometry::vulpoly::buildHexagonTessellation ( const Point< FloatType, 2 > & corner_a,
const Point< FloatType, 2 > & corner_b,
const Point< IndexType, 2 > & n_divisions )

Build a 2D hexagonal seed tessellation and mesh its rectangle.

Template Parameters
FloatTypeCoordinate scalar type.
IndexTypeDivision-count integer type.
Parameters
corner_aFirst rectangle corner.
corner_bOpposite rectangle corner.
n_divisionsRequested divisions along the two coordinate axes.
Returns
A VulPoly mesh initialized from a staggered hexagonal seed pattern.
Note
The returned mesh uses the PolyMesher-derived VulPoly procedure.

◆ buildOctahedronTessellation()

template<typename FloatType, typename IndexType>
auto vulpes::geometry::vulpoly::buildOctahedronTessellation ( const Point< FloatType, 3 > & corner_a,
const Point< FloatType, 3 > & corner_b,
const Point< IndexType, 3 > & n_divisions )

Build a 3D hexahedral-domain mesh from an octahedral seed pattern.

Template Parameters
FloatTypeCoordinate scalar type.
IndexTypeDivision-count integer type.
Parameters
corner_aFirst box corner.
corner_bOpposite box corner.
n_divisionsRequested divisions along the three coordinate axes.
Returns
A VulPoly mesh initialized from the generated 3D seed pattern.
Note
The returned mesh uses the PolyMesher-derived VulPoly procedure.

◆ mesh() [1/2]

template<typename FloatType, typename IndexType, IndexType Dim, typename D>
std::pair< Mesh< FloatType, IndexType, Dim >, std::vector< Point< FloatType, Dim > > > vulpes::geometry::vulpoly::mesh ( const DistanceExpression< FloatType, Dim, D > & distanceFunction,
size_t n_elems,
const std::vector< Point< FloatType, Dim > > & fixed_pts = {},
const VulPolyParams< FloatType > & params = {},
size_t seed = 0 )

Generate a VulPoly mesh from a requested number of seeds.

Template Parameters
FloatTypeCoordinate scalar type.
IndexTypeMesh index type.
DimSpatial dimension; currently 2 or 3.
DDistance-expression implementation type.
Parameters
distanceFunctionSigned-distance expression describing the domain.
n_elemsNumber of in-domain seed points to create.
fixed_ptsOptional locations to preserve during meshing.
paramsVulPoly relaxation and cleanup parameters.
seedSeed value for the pseudorandom strategy; the current configuration selects additive recurrence points.
Returns
The generated mesh and the seed points updated by the meshing procedure, including reflected points retained in the final iteration.
Note
The centroidal Voronoi meshing algorithm and boundary reflection are based on PolyMesher; see the file reference.

◆ mesh() [2/2]

template<typename FloatType, typename IndexType, IndexType Dim, typename D>
Mesh< FloatType, IndexType, Dim > vulpes::geometry::vulpoly::mesh ( std::vector< Point< FloatType, Dim > > & center_pts,
const DistanceExpression< FloatType, Dim, D > & distanceFunction,
const std::vector< Point< FloatType, Dim > > & fixed_pts = {},
const VulPolyParams< FloatType > & params = {} )

Generate a VulPoly mesh from caller-supplied seed points.

Template Parameters
FloatTypeCoordinate scalar type.
IndexTypeMesh index type.
DimSpatial dimension; currently 2 or 3.
DDistance-expression implementation type.
Parameters
[in,out]center_ptsInitial seed points; updated in place by the meshing procedure, including reflected points retained in the final iteration.
distanceFunctionSigned-distance expression describing the domain.
fixed_ptsOptional locations to preserve during meshing.
paramsVulPoly relaxation and cleanup parameters.
Returns
The generated 2D or 3D mesh.
Note
The centroidal Voronoi meshing algorithm and boundary reflection are based on PolyMesher; see the file reference.