PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
Gedim::VoroInterface Class Referencefinal

#include <VoroInterface.hpp>

Classes

struct  Cell0D
 
struct  Cell1D
 
struct  Cell2D
 
struct  Cell3D
 

Public Member Functions

 VoroInterface (const Gedim::GeometryUtilities &geometryUtilities)
 
Eigen::MatrixXd GenerateRandomPoints (const Eigen::MatrixXd &domainVertices, const unsigned int &numPoints, const unsigned int random_seed=Gedim::Utilities::RandomSeed())
 Generate a set of random points inside a parallelepipedal/parallelogram domain.
 
void GenerateVoronoiTassellations2D (const Eigen::MatrixXd &polygonVertices, const unsigned int &numPoints, const unsigned int &numIterations, Gedim::IMeshDAO &mesh, const unsigned int random_seed=Gedim::Utilities::RandomSeed())
 
void GenerateVoronoiTassellations2D (const Eigen::MatrixXd &polygonVertices, const unsigned int &numIterations, Eigen::MatrixXd &VoronoiPoints, Gedim::IMeshDAO &mesh)
 Generate a 2D centroidal Voronoi tessellation from prescribed seeds. The function computes a centroidal Voronoi tessellation inside the input parallelogram using the points contained in VoronoiPoints as initial seeds. The seed positions are updated during the iterative relaxation process. On output, VoronoiPoints contains the final seed positions.
 
void GenerateVoronoiTassellations3D (const Eigen::MatrixXd &polyhedronVertices, const Eigen::MatrixXi &polyhedronEdges, const std::vector< Eigen::MatrixXi > &polyhedronFaces, const unsigned int &numPoints, const unsigned int &numIterations, Gedim::IMeshDAO &mesh, const unsigned int random_seed=Gedim::Utilities::RandomSeed())
 
void GenerateVoronoiTassellations3D (const Eigen::MatrixXd &domain_vertices, const Eigen::MatrixXi &domain_edges, const std::vector< Eigen::MatrixXi > &domain_faces, const unsigned int &num_iterations, Eigen::MatrixXd &VoronoiPoints, Gedim::IMeshDAO &mesh)
 Generate a 3D centroidal Voronoi tessellation from prescribed seeds. The function computes a centroidal Voronoi tessellation inside the input parallelepiped using the points contained in VoronoiPoints as initial seeds. The seed positions are updated during the iterative relaxation process. On output, VoronoiPoints contains the final seed positions.
 

Constructor & Destructor Documentation

◆ VoroInterface()

Gedim::VoroInterface::VoroInterface ( const Gedim::GeometryUtilities geometryUtilities)

Member Function Documentation

◆ GenerateRandomPoints()

Eigen::MatrixXd Gedim::VoroInterface::GenerateRandomPoints ( const Eigen::MatrixXd &  domainVertices,
const unsigned int numPoints,
const unsigned int  random_seed = Gedim::Utilities::RandomSeed() 
)

Generate a set of random points inside a parallelepipedal/parallelogram domain.

The function generates numPoints points uniformly distributed inside the domain defined by domainVertices.

Parameters
domainVerticesMatrix 3 x NumVertices containing the coordinates of the domain vertices.
numPointsNumber of random points to generate.
random_seedSeed used to initialize the random number generator.
Returns
Matrix containing the generated points, with one point per column.

◆ GenerateVoronoiTassellations2D() [1/2]

void Gedim::VoroInterface::GenerateVoronoiTassellations2D ( const Eigen::MatrixXd &  polygonVertices,
const unsigned int numIterations,
Eigen::MatrixXd &  VoronoiPoints,
Gedim::IMeshDAO mesh 
)

Generate a 2D centroidal Voronoi tessellation from prescribed seeds. The function computes a centroidal Voronoi tessellation inside the input parallelogram using the points contained in VoronoiPoints as initial seeds. The seed positions are updated during the iterative relaxation process. On output, VoronoiPoints contains the final seed positions.

Parameters
polygonVerticesVertices of the bounding polygon.
numIterationsNumber of centroidal relaxation iterations.
VoronoiPointsInput/output matrix containing the Voronoi seed coordinates.
meshMesh object where the generated tessellation is stored.

◆ GenerateVoronoiTassellations2D() [2/2]

void Gedim::VoroInterface::GenerateVoronoiTassellations2D ( const Eigen::MatrixXd &  polygonVertices,
const unsigned int numPoints,
const unsigned int numIterations,
Gedim::IMeshDAO mesh,
const unsigned int  random_seed = Gedim::Utilities::RandomSeed() 
)

◆ GenerateVoronoiTassellations3D() [1/2]

void Gedim::VoroInterface::GenerateVoronoiTassellations3D ( const Eigen::MatrixXd &  domain_vertices,
const Eigen::MatrixXi &  domain_edges,
const std::vector< Eigen::MatrixXi > &  domain_faces,
const unsigned int num_iterations,
Eigen::MatrixXd &  VoronoiPoints,
Gedim::IMeshDAO mesh 
)

Generate a 3D centroidal Voronoi tessellation from prescribed seeds. The function computes a centroidal Voronoi tessellation inside the input parallelepiped using the points contained in VoronoiPoints as initial seeds. The seed positions are updated during the iterative relaxation process. On output, VoronoiPoints contains the final seed positions.

Parameters
domain_verticesVertices of the bounding polyhedron.
domain_edgesEdge connectivity of the bounding polyhedron.
domain_facesFace connectivity of the bounding polyhedron.
num_iterationsNumber of centroidal relaxation iterations.
VoronoiPointsInput/output matrix containing the Voronoi seed coordinates.
meshMesh object where the generated tessellation is stored.

◆ GenerateVoronoiTassellations3D() [2/2]

void Gedim::VoroInterface::GenerateVoronoiTassellations3D ( const Eigen::MatrixXd &  polyhedronVertices,
const Eigen::MatrixXi &  polyhedronEdges,
const std::vector< Eigen::MatrixXi > &  polyhedronFaces,
const unsigned int numPoints,
const unsigned int numIterations,
Gedim::IMeshDAO mesh,
const unsigned int  random_seed = Gedim::Utilities::RandomSeed() 
)

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