SemiDiscreteOT 1.0
Semi-Discrete Optimal Transport Library
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim > Class Template Reference

A class for computing power diagrams using Geogram. More...

#include <PowerDiagram.h>

Inheritance diagram for PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >:
Inheritance graph
[legend]
Collaboration diagram for PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >:
Collaboration graph
[legend]

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.
 
- Public Member Functions inherited from PowerDiagramSpace::PowerDiagramBase< dim, spacedim >
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

- Protected Attributes inherited from PowerDiagramSpace::PowerDiagramBase< dim, spacedim >
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.
 

Detailed Description

template<int dim, int spacedim = dim>
class PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >

A class for computing power diagrams using Geogram.

Template Parameters
dimThe dimension of the mesh.
spacedimThe dimension of the space the mesh is embedded in.

Definition at line 175 of file PowerDiagram.h.

Constructor & Destructor Documentation

◆ GeogramPowerDiagram()

template<int dim, int spacedim>
PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::GeogramPowerDiagram ( const std::string &  source_mesh_file)

Constructor for the GeogramPowerDiagram class.

Parameters
source_mesh_fileThe path to the source mesh file.

Definition at line 16 of file PowerDiagramGeogram.cc.

Here is the call graph for this function:

◆ ~GeogramPowerDiagram()

template<int dim, int spacedim>
PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::~GeogramPowerDiagram ( )
default

Member Function Documentation

◆ set_generators()

template<int dim, int spacedim>
void PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::set_generators ( const std::vector< Point< spacedim > > &  points,
const Vector< double > &  potentials 
)
overridevirtual

Sets the generator points and their potentials.

Parameters
pointsThe generator points.
potentialsThe potentials of the generator points.

Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.

Definition at line 70 of file PowerDiagramGeogram.cc.

◆ compute_power_diagram()

template<int dim, int spacedim>
void PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::compute_power_diagram ( )
overridevirtual

Computes the power diagram.

Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.

Definition at line 131 of file PowerDiagramGeogram.cc.

◆ output_vtu()

template<int dim, int spacedim>
void PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::output_vtu ( const std::string &  filename) const
overridevirtual

Outputs the power diagram to a VTU file.

Parameters
filenameThe name of the output file.

Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.

Definition at line 198 of file PowerDiagramGeogram.cc.

◆ compute_cell_centroids()

template<int dim, int spacedim>
void PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::compute_cell_centroids ( )
overridevirtual

Computes the centroids of the power cells.

Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.

Definition at line 155 of file PowerDiagramGeogram.cc.

◆ save_centroids_to_file()

template<int dim, int spacedim>
void PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::save_centroids_to_file ( const std::string &  filename) const
overridevirtual

Saves the centroids of the power cells to a file.

Parameters
filenameThe name of the output file.

Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.

Definition at line 205 of file PowerDiagramGeogram.cc.

Here is the call graph for this function:

◆ get_cell_centroids()

template<int dim, int spacedim>
const std::vector< Point< spacedim > > & PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::get_cell_centroids ( ) const
overridevirtual

Returns the centroids of the power cells.

Implements PowerDiagramSpace::PowerDiagramBase< dim, spacedim >.

Definition at line 211 of file PowerDiagramGeogram.cc.

◆ init_power_diagram()

template<int dim, int spacedim>
void PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::init_power_diagram ( )
private

Definition at line 93 of file PowerDiagramGeogram.cc.

◆ load_volume_mesh()

template<int dim, int spacedim>
bool PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::load_volume_mesh ( const std::string &  filename,
GEO::Mesh &  mesh 
)
private

Definition at line 217 of file PowerDiagramGeogram.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ source_mesh

template<int dim, int spacedim = dim>
std::unique_ptr<GEO::Mesh> PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::source_mesh
private

The source mesh.

Definition at line 221 of file PowerDiagram.h.

◆ dimension_voronoi

template<int dim, int spacedim = dim>
int PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::dimension_voronoi
private

The dimension of the Voronoi diagram.

Definition at line 222 of file PowerDiagram.h.

◆ RVD_mesh

template<int dim, int spacedim = dim>
std::unique_ptr<GEO::Mesh> PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::RVD_mesh
private

The restricted Voronoi diagram mesh.

Definition at line 223 of file PowerDiagram.h.

◆ delaunay

template<int dim, int spacedim = dim>
GEO::Delaunay_var PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::delaunay
private

The Delaunay triangulation.

Definition at line 224 of file PowerDiagram.h.

◆ RVD

template<int dim, int spacedim = dim>
GEO::RestrictedVoronoiDiagram_var PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::RVD
private

The restricted Voronoi diagram.

Definition at line 225 of file PowerDiagram.h.

◆ points_mesh_target

template<int dim, int spacedim = dim>
std::vector<double> PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::points_mesh_target
private

The target points.

Definition at line 226 of file PowerDiagram.h.

◆ points_mesh_target_lifted

template<int dim, int spacedim = dim>
std::vector<double> PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::points_mesh_target_lifted
private

The lifted target points.

Definition at line 227 of file PowerDiagram.h.

◆ save_RVD

template<int dim, int spacedim = dim>
bool PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::save_RVD = false
private

A flag to indicate whether to save the restricted Voronoi diagram.

Definition at line 228 of file PowerDiagram.h.

◆ save_morph

template<int dim, int spacedim = dim>
bool PowerDiagramSpace::GeogramPowerDiagram< dim, spacedim >::save_morph = false
private

A flag to indicate whether to save the morphed mesh.

Definition at line 229 of file PowerDiagram.h.


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