![]() |
SemiDiscreteOT 1.0
Semi-Discrete Optimal Transport Library
|
A class for computing power diagrams using Geogram. More...
#include <PowerDiagram.h>
Public Member Functions | |
GeogramPowerDiagram (const std::string &source_mesh_file) | |
Constructor for the GeogramPowerDiagram class. | |
~GeogramPowerDiagram () | |
void | set_generators (const std::vector< Point< spacedim > > &points, const Vector< double > &potentials) override |
Sets the generator points and their potentials. | |
void | compute_power_diagram () override |
Computes the power diagram. | |
void | output_vtu (const std::string &filename) const override |
Outputs the power diagram to a VTU file. | |
void | compute_cell_centroids () override |
Computes the centroids of the power cells. | |
void | save_centroids_to_file (const std::string &filename) const override |
Saves the centroids of the power cells to a file. | |
const std::vector< Point< spacedim > > & | get_cell_centroids () const override |
Returns the centroids of the power cells. | |
![]() | |
virtual | ~PowerDiagramBase ()=default |
Private Member Functions | |
void | init_power_diagram () |
bool | load_volume_mesh (const std::string &filename, GEO::Mesh &mesh) |
Private Attributes | |
std::unique_ptr< GEO::Mesh > | source_mesh |
The source mesh. | |
int | dimension_voronoi |
The dimension of the Voronoi diagram. | |
std::unique_ptr< GEO::Mesh > | RVD_mesh |
The restricted Voronoi diagram mesh. | |
GEO::Delaunay_var | delaunay |
The Delaunay triangulation. | |
GEO::RestrictedVoronoiDiagram_var | RVD |
The restricted Voronoi diagram. | |
std::vector< double > | points_mesh_target |
The target points. | |
std::vector< double > | points_mesh_target_lifted |
The lifted target points. | |
bool | save_RVD = false |
A flag to indicate whether to save the restricted Voronoi diagram. | |
bool | save_morph = false |
A flag to indicate whether to save the morphed mesh. | |
Additional Inherited Members | |
![]() | |
std::vector< Point< spacedim > > | generator_points |
The generator points. | |
std::vector< double > | generator_potentials |
The potentials of the generator points. | |
std::vector< Point< spacedim > > | cell_centroids |
The centroids of the power cells. | |
A class for computing power diagrams using Geogram.
dim | The dimension of the mesh. |
spacedim | The dimension of the space the mesh is embedded in. |
Definition at line 175 of file PowerDiagram.h.
PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::GeogramPowerDiagram | ( | const std::string & | source_mesh_file | ) |
Constructor for the GeogramPowerDiagram class.
source_mesh_file | The path to the source mesh file. |
Definition at line 16 of file PowerDiagramGeogram.cc.
|
default |
|
overridevirtual |
Sets the generator points and their potentials.
points | The generator points. |
potentials | The potentials of the generator points. |
Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.
Definition at line 70 of file PowerDiagramGeogram.cc.
|
overridevirtual |
Computes the power diagram.
Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.
Definition at line 131 of file PowerDiagramGeogram.cc.
|
overridevirtual |
Outputs the power diagram to a VTU file.
filename | The name of the output file. |
Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.
Definition at line 198 of file PowerDiagramGeogram.cc.
|
overridevirtual |
Computes the centroids of the power cells.
Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.
Definition at line 155 of file PowerDiagramGeogram.cc.
|
overridevirtual |
Saves the centroids of the power cells to a file.
filename | The name of the output file. |
Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.
Definition at line 205 of file PowerDiagramGeogram.cc.
|
overridevirtual |
Returns the centroids of the power cells.
Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.
Definition at line 211 of file PowerDiagramGeogram.cc.
|
private |
Definition at line 93 of file PowerDiagramGeogram.cc.
|
private |
|
private |
The source mesh.
Definition at line 221 of file PowerDiagram.h.
|
private |
The dimension of the Voronoi diagram.
Definition at line 222 of file PowerDiagram.h.
|
private |
The restricted Voronoi diagram mesh.
Definition at line 223 of file PowerDiagram.h.
|
private |
The Delaunay triangulation.
Definition at line 224 of file PowerDiagram.h.
|
private |
The restricted Voronoi diagram.
Definition at line 225 of file PowerDiagram.h.
|
private |
The target points.
Definition at line 226 of file PowerDiagram.h.
|
private |
The lifted target points.
Definition at line 227 of file PowerDiagram.h.
|
private |
A flag to indicate whether to save the restricted Voronoi diagram.
Definition at line 228 of file PowerDiagram.h.
|
private |
A flag to indicate whether to save the morphed mesh.
Definition at line 229 of file PowerDiagram.h.