Classes | Public Member Functions | Public Attributes | List of all members
Delaunay Class Reference

The Delaunay data structure. Gets a set of points and constructs the Delaunay tessellation. More...

#include <Delaunay.hpp>

Collaboration diagram for Delaunay:
Collaboration graph
[legend]

Public Member Functions

int GetOrgIndex (int index) const
 Retrieves the original index of a point (in case a point was duplicated) More...
 
void ChangeOlength (int n)
 Changes the cor olength. More...
 
void Changelength (int n)
 Changes the cor length. More...
 
vector< Vector2D > & ChangeCor (void)
 Allows to change the cor. More...
 
const vector< Vector2D > & getCor (void) const
 Access to coordinates. More...
 
 Delaunay (void)
 Class constructor.
 
 Delaunay (Delaunay const &other)
 Copy constructor. More...
 
 ~Delaunay (void)
 Default destructor.
 
void build_delaunay (vector< Vector2D >const &vp, std::vector< std::pair< Vector2D, Vector2D > >const &cpoints)
 Builds the Delaunay tessellation. More...
 
void output (void)
 Dumps the Delaunay tessellation into a binary file.
 
const facetget_facet (int index) const
 Returns a facet. More...
 
double get_facet_coordinate (int Facet, int vertice, int dim)
 Returns a coordinate of a vertice. More...
 
Vector2D get_point (size_t index) const
 Returns a point. More...
 
double get_cor (int index, int dim) const
 Returns a coordinate. More...
 
int get_num_facet (void) const
 Returns the number of facets. More...
 
int get_length (void) const
 Returns the number of points. More...
 
int get_last_loc (void) const
 Returns the last location, a number used to identify the fact that the neighbor of a facet is empty. More...
 
void set_point (int index, Vector2D p)
 Change Mesh point. More...
 
double triangle_area (int index)
 Returns the area of the triangle. Negative result means the triangle isn't right handed. More...
 
void update (const vector< Vector2D > &points, std::vector< std::pair< Vector2D, Vector2D > >const &cpoints)
 Updates the triangulation. More...
 
int GetOriginalIndex (int NewPoint) const
 Returns the original index of the duplicated point in Periodic Boundary conditions. More...
 
int GetOriginalLength (void) const
 Returns the original length of the points (without duplicated points) More...
 
vector< Vector2D > & GetMeshPoints (void)
 Returns a refrence to the points. More...
 
int GetTotalLength (void)
 Returns the length of all the points (included duplicated) More...
 
double GetFacetRadius (int facet) const
 return the facet's radius More...
 
void AddAditionalPoint (Vector2D const &vec)
 Adds a point to the cor vector. Used in periodic boundaries with AMR. More...
 
int GetCorSize (void) const
 Gets the size of the cor vector. More...
 
Vector2D GetCircleCenter (int index, double &R) const
 Returns the center of the circumscribed circle of a facet. More...
 
void BuildBoundary (OuterBoundary const *obc, vector< Edge > const &edges)
 Builds the boundary points. More...
 
pair< vector< vector< int > >, vector< int > > BuildBoundary (OuterBoundary const *obc, Tessellation const &tproc, vector< vector< int > > &Nghost)
 Builds the boundary points for parallel runs. More...
 
void AddBoundaryPoints (vector< Vector2D > const &points)
 Adds the points to the tessellation, used for boundary points. More...
 
bool CheckCorrect (void)
 

Public Attributes

delaunay_loggers::DelaunayLoggerlogger
 Diagnostics.
 

Detailed Description

The Delaunay data structure. Gets a set of points and constructs the Delaunay tessellation.

Author
Elad Steinberg

Definition at line 30 of file Delaunay.hpp.

Constructor & Destructor Documentation

◆ Delaunay()

Delaunay::Delaunay ( Delaunay const &  other)

Copy constructor.

Parameters
otherThe Triangulation to copy

Definition at line 161 of file Delaunay.cpp.

Member Function Documentation

◆ AddAditionalPoint()

void Delaunay::AddAditionalPoint ( Vector2D const &  vec)

Adds a point to the cor vector. Used in periodic boundaries with AMR.

Parameters
vecThe point to add.

Definition at line 767 of file Delaunay.cpp.

◆ AddBoundaryPoints()

void Delaunay::AddBoundaryPoints ( vector< Vector2D > const &  points)

Adds the points to the tessellation, used for boundary points.

Parameters
pointsThe points to add

Definition at line 754 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ build_delaunay()

void Delaunay::build_delaunay ( vector< Vector2D >const &  vp,
std::vector< std::pair< Vector2D, Vector2D > >const &  cpoints 
)

Builds the Delaunay tessellation.

Parameters
vpA refrence to a vector of points to be added.
cpointsThe edges of the processor cell.

Definition at line 376 of file Delaunay.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildBoundary() [1/2]

void Delaunay::BuildBoundary ( OuterBoundary const *  obc,
vector< Edge > const &  edges 
)

Builds the boundary points.

Parameters
obcThe geometrical boundary conditions
edgesThe edges of the domain returns the indeces of the boundary points for each edge, can be larger than the number of edges since it include corners at the end

Definition at line 1167 of file Delaunay.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BuildBoundary() [2/2]

std::pair< vector< vector< int > >, vector< int > > Delaunay::BuildBoundary ( OuterBoundary const *  obc,
Tessellation const &  tproc,
vector< vector< int > > &  Nghost 
)

Builds the boundary points for parallel runs.

Parameters
obcThe geometrical boundary conditions
tprocThe tessellation of the processors
NghostThe indeces of the ghost cells (order by cpu) in the cor vector. Given as output.
Returns
The indeces of the boundary points sent to each cpu and the list of cpus to talk with.

Definition at line 1919 of file Delaunay.cpp.

Here is the call graph for this function:

◆ ChangeCor()

vector< Vector2D > & Delaunay::ChangeCor ( void  )

Allows to change the cor.

Returns
Refrence to the cor vector

Definition at line 681 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ Changelength()

void Delaunay::Changelength ( int  n)

Changes the cor length.

Parameters
nThe new length

Definition at line 676 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ ChangeOlength()

void Delaunay::ChangeOlength ( int  n)

Changes the cor olength.

Parameters
nThe new length;

Definition at line 671 of file Delaunay.cpp.

◆ get_cor()

double Delaunay::get_cor ( int  index,
int  dim 
) const

Returns a coordinate.

Parameters
indexThe index of the point.
dimIf dim=0 returns the x-coordinate else returns the y-coordinate.
Returns
The chosen coordinate.

Definition at line 709 of file Delaunay.cpp.

◆ get_facet()

const facet & Delaunay::get_facet ( int  index) const

Returns a facet.

Parameters
indexFacet index
Returns
A reference to the selected facet.

Definition at line 691 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ get_facet_coordinate()

double Delaunay::get_facet_coordinate ( int  Facet,
int  vertice,
int  dim 
)

Returns a coordinate of a vertice.

Parameters
FacetThe index of the facet to check.
verticeThe index of the vertice in the facet.
dimIf dim=0 returns the x-coordinate else returns the y-coordinate.
Returns
The chosen coordinate.

Definition at line 696 of file Delaunay.cpp.

◆ get_last_loc()

int Delaunay::get_last_loc ( void  ) const

Returns the last location, a number used to identify the fact that the neighbor of a facet is empty.

Returns
The last location.

Definition at line 729 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ get_length()

int Delaunay::get_length ( void  ) const

Returns the number of points.

Returns
The number of points.

Definition at line 724 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ get_num_facet()

int Delaunay::get_num_facet ( void  ) const

Returns the number of facets.

Returns
The number of facets.

Definition at line 719 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ get_point()

Vector2D Delaunay::get_point ( size_t  index) const

Returns a point.

Parameters
indexThe index of the point.
Returns
The chosen point.

Definition at line 704 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ GetCircleCenter()

Vector2D Delaunay::GetCircleCenter ( int  index,
double &  R 
) const

Returns the center of the circumscribed circle of a facet.

Parameters
indexThe index of the facet
RThe radius given as output
Returns
The circumscribed circle's center

Definition at line 1202 of file Delaunay.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCor()

const vector< Vector2D > & Delaunay::getCor ( void  ) const

Access to coordinates.

Returns
Reference to coordinates vector

Definition at line 686 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ GetCorSize()

int Delaunay::GetCorSize ( void  ) const

Gets the size of the cor vector.

Returns
The size of the cor vector.

Definition at line 772 of file Delaunay.cpp.

Here is the call graph for this function:

◆ GetFacetRadius()

double Delaunay::GetFacetRadius ( int  facet) const

return the facet's radius

Parameters
facetThe facet to check
Returns
The facet's radius

Definition at line 666 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ GetMeshPoints()

vector< Vector2D > & Delaunay::GetMeshPoints ( void  )

Returns a refrence to the points.

Returns
Refrence to the points

Definition at line 744 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ GetOrgIndex()

int Delaunay::GetOrgIndex ( int  index) const

Retrieves the original index of a point (in case a point was duplicated)

Parameters
indexIndex of a point
Returns
Original index

Definition at line 1963 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ GetOriginalIndex()

int Delaunay::GetOriginalIndex ( int  NewPoint) const

Returns the original index of the duplicated point in Periodic Boundary conditions.

Parameters
NewPointThe index of the duplicated point
Returns
The original index

Definition at line 661 of file Delaunay.cpp.

◆ GetOriginalLength()

int Delaunay::GetOriginalLength ( void  ) const

Returns the original length of the points (without duplicated points)

Returns
The original length

Definition at line 739 of file Delaunay.cpp.

Here is the caller graph for this function:

◆ GetTotalLength()

int Delaunay::GetTotalLength ( void  )

Returns the length of all the points (included duplicated)

Returns
The length of all of the points

Definition at line 749 of file Delaunay.cpp.

◆ set_point()

void Delaunay::set_point ( int  index,
Vector2D  p 
)

Change Mesh point.

Parameters
indexThe index of the point to change.
pThe new point to set.

Definition at line 734 of file Delaunay.cpp.

◆ triangle_area()

double Delaunay::triangle_area ( int  index)

Returns the area of the triangle. Negative result means the triangle isn't right handed.

Parameters
indexThe index to the facet
Returns
The area

Definition at line 491 of file Delaunay.cpp.

◆ update()

void Delaunay::update ( const vector< Vector2D > &  points,
std::vector< std::pair< Vector2D, Vector2D > >const &  cpoints 
)

Updates the triangulation.

Parameters
pointsThe new set of points
cpointsThe points of the processor cell

Definition at line 504 of file Delaunay.cpp.

Here is the call graph for this function:

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