Voronoi tessellation class. More...
#include <VoronoiMesh.hpp>
Public Member Functions | |
Vector2D | CalcFaceVelocity (Vector2D wl, Vector2D wr, Vector2D rL, Vector2D rR, Vector2D f) const |
Calculates the velocity of a single edge. More... | |
VoronoiMesh * | clone (void) const |
Cloning function. More... | |
vector< int > | GetNeighbors (int index) const |
Returns the indeces of the neighbors. More... | |
void | GetNeighbors (int index, vector< int > &neigh) const |
Returns the indeces of the neighbors. More... | |
vector< int > | GetLiteralNeighbors (int index) const |
Returns the list of neighbors including ghost points. More... | |
int | GetOriginalIndex (int point) const |
Returns the original index of the duplicated point. More... | |
void | Initialise (vector< Vector2D > const &points, Tessellation const &vproc, OuterBoundary const *outer, bool reorder=true) |
Initialise the tessellation. More... | |
void | Initialise (vector< Vector2D > const &points, OuterBoundary const *bc, bool reorder=true) |
Initialises the tessellation. More... | |
VoronoiMesh (void) | |
Class default constructor. | |
VoronoiMesh (vector< Vector2D > const &points, OuterBoundary const &bc, bool HOrder=true) | |
Class constructor. More... | |
VoronoiMesh (Tessellation const &proctess, vector< Vector2D > const &points, OuterBoundary const &bc, bool HOrder=true) | |
Class constructor for MPI. More... | |
VoronoiMesh (VoronoiMesh const &other) | |
Copy constructor. More... | |
vector< int > | Update (const vector< Vector2D > &points, const Tessellation &vproc, bool reorder=false) |
Updates the tessellation. More... | |
vector< int > | Update (const vector< Vector2D > &points, bool reorder=false) |
Update the tessellation. More... | |
int | GetPointNo (void) const |
Get Total number of mesh generating points. More... | |
void | SetPointNo (int N) |
Set the number of points. More... | |
Vector2D | GetMeshPoint (int index) const |
Returns Position of mesh generating point. More... | |
int | GetTotalSidesNumber (void) const |
Returns the total number of faces. More... | |
Edge const & | GetEdge (int index) const |
Returns edge (interface between cells) More... | |
double | GetWidth (int index) const |
Returns the effective width of a cell. More... | |
double | GetVolume (int index) const |
Returns the volume of a cell. More... | |
vector< int > const & | GetCellEdges (int index) const |
Returns a reference to a vector<int> containing the indexes of the edges related to a cell. More... | |
Vector2D const & | GetCellCM (int index) const |
Returns Position of Cell's CM. More... | |
vector< Vector2D > & | GetMeshPoints (void) |
Returns a reference to the point vector. More... | |
void | output (string filename) |
Outputs the grid data. More... | |
bool | NearBoundary (int index) const |
Returns if the cell is adjacent to a boundary. More... | |
vector< Edge > & | GetAllEdges (void) |
Returns a reference to a list of all edges. More... | |
void | FindBoundaryRemoveSend (vector< int > const &ToRemove, vector< vector< int > > &BoundaryRemove, vector< vector< vector< int > > > &BoundaryNeigh) |
Calculates and send the ghost points that are needed for AMR with MPI. More... | |
vector< vector< int > > & | GetDuplicatedPoints (void) |
Returns the indeces of the points that where sent to other processors as ghost points. More... | |
vector< vector< int > > const & | GetDuplicatedPoints (void) const |
Returns the indeces of the points that where sent to other processors as ghost points. More... | |
vector< int > | GetDuplicatedProcs (void) const |
Returns the indeces of the processors with whom ghost points where exchanged. More... | |
vector< vector< int > > const & | GetSentPoints (void) const |
Returns the indeces of the points that where sent to other processors. More... | |
vector< int > | GetSentProcs (void) const |
Returns the indeces of the processors with whom points where exchanged. More... | |
vector< vector< int > > & | GetGhostIndeces (void) |
Returns the indeces of each ghost point in the vector of points that the tessellation holds. More... | |
vector< vector< int > > const & | GetGhostIndeces (void) const |
Returns the indeces of each ghost point in the vector of points that the tessellation holds. More... | |
vector< size_t > | GetSelfPoint (void) const |
Returns the indeces of the points that remain with the processor after the ne processor mesh is built. More... | |
int | GetTotalPointNumber (void) const |
Returns the total number of points (including ghost) More... | |
const vector< Edge > & | getAllEdges (void) const |
Returns reference to the list of all edges. More... | |
vector< Vector2D > & | GetAllCM (void) |
Returns the center of masses of the cells. More... | |
void | GetNeighborNeighbors (vector< int > &result, int point) const |
Retrieves vicarious neighbors. More... | |
vector< Vector2D > | UpdateMPIPoints (Tessellation const &vproc, int rank, vector< Vector2D > &points, OuterBoundary const *obc, vector< size_t > &selfindex, vector< int > &sentproc, vector< vector< int > > &sentpoints) |
Communicate position of mesh generating points between processes. More... | |
Public Attributes | |
voronoi_loggers::VoronoiLogger * | logger |
Diagnostics method. | |
Voronoi tessellation class.
Definition at line 29 of file VoronoiMesh.hpp.
VoronoiMesh::VoronoiMesh | ( | vector< Vector2D > const & | points, |
OuterBoundary const & | bc, | ||
bool | HOrder = true |
||
) |
Class constructor.
points | The points to build for |
bc | The geometric boundary conditions |
HOrder | Should the points be rearranged with Hilbert ordering |
Definition at line 85 of file VoronoiMesh.cpp.
VoronoiMesh::VoronoiMesh | ( | Tessellation const & | proctess, |
vector< Vector2D > const & | points, | ||
OuterBoundary const & | bc, | ||
bool | HOrder = true |
||
) |
Class constructor for MPI.
points | The points to build for |
proctess | The tessellation of the processors |
bc | The geometric boundary conditions |
HOrder | Should the points be rearranged with Hilbert ordering |
Definition at line 109 of file VoronoiMesh.cpp.
VoronoiMesh::VoronoiMesh | ( | VoronoiMesh const & | other | ) |
Copy constructor.
other | The Voronoi to copy |
Definition at line 205 of file VoronoiMesh.cpp.
|
virtual |
Calculates the velocity of a single edge.
wl | The velocity of the left mesh point |
wr | The velocity of the right mesh point |
rL | The location of the left mesh point |
rR | The location of the right mesh point |
f | The centroid of the edge |
Implements Tessellation.
Definition at line 150 of file VoronoiMesh.cpp.
|
virtual |
Cloning function.
Implements Tessellation.
Definition at line 632 of file VoronoiMesh.cpp.
void VoronoiMesh::FindBoundaryRemoveSend | ( | vector< int > const & | ToRemove, |
vector< vector< int > > & | BoundaryRemove, | ||
vector< vector< vector< int > > > & | BoundaryNeigh | ||
) |
Calculates and send the ghost points that are needed for AMR with MPI.
ToRemove | The local list of points to remove |
BoundaryRemove | The list of points that are border points per proc that are removed |
BoundaryNeigh | The indeces in the Nghost list for each neighbor of the points in BoundaryRemove |
|
virtual |
Returns the center of masses of the cells.
Implements Tessellation.
Definition at line 673 of file VoronoiMesh.cpp.
vector< Edge > & VoronoiMesh::GetAllEdges | ( | void | ) |
Returns a reference to a list of all edges.
Definition at line 1168 of file VoronoiMesh.cpp.
|
virtual |
Returns reference to the list of all edges.
Implements Tessellation.
Definition at line 658 of file VoronoiMesh.cpp.
|
virtual |
Returns Position of Cell's CM.
index | Mesh generating point index (the cell's index) |
Implements Tessellation.
Definition at line 668 of file VoronoiMesh.cpp.
|
virtual |
Returns a reference to a vector<int> containing the indexes of the edges related to a cell.
index | The index of the cell. |
Implements Tessellation.
Definition at line 447 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of the points that where sent to other processors as ghost points.
Implements Tessellation.
Definition at line 1173 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of the points that where sent to other processors as ghost points.
Implements Tessellation.
Definition at line 1178 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of the processors with whom ghost points where exchanged.
Implements Tessellation.
Definition at line 1198 of file VoronoiMesh.cpp.
|
virtual |
Returns edge (interface between cells)
index | Face index |
Implements Tessellation.
Definition at line 663 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of each ghost point in the vector of points that the tessellation holds.
Implements Tessellation.
Definition at line 1183 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of each ghost point in the vector of points that the tessellation holds.
Implements Tessellation.
Definition at line 1188 of file VoronoiMesh.cpp.
vector< int > VoronoiMesh::GetLiteralNeighbors | ( | int | index | ) | const |
Returns the list of neighbors including ghost points.
index | The cell whose neighbors are returned |
Definition at line 609 of file VoronoiMesh.cpp.
|
virtual |
Returns Position of mesh generating point.
index | Mesh generating point index |
Implements Tessellation.
Definition at line 648 of file VoronoiMesh.cpp.
|
virtual |
Returns a reference to the point vector.
Implements Tessellation.
Definition at line 485 of file VoronoiMesh.cpp.
|
virtual |
Retrieves vicarious neighbors.
result | Output |
point | Mesh generating point index |
Implements Tessellation.
Definition at line 925 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of the neighbors.
index | The cell to check |
Implements Tessellation.
Definition at line 588 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of the neighbors.
index | The cell to check |
neigh | the indeces of the neighbors given as output |
Implements Tessellation.
Definition at line 598 of file VoronoiMesh.cpp.
|
virtual |
Returns the original index of the duplicated point.
point | The index of the duplicated point |
Reimplemented from Tessellation.
Definition at line 173 of file VoronoiMesh.cpp.
|
virtual |
Get Total number of mesh generating points.
Implements Tessellation.
Definition at line 637 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of the points that remain with the processor after the ne processor mesh is built.
Implements Tessellation.
Definition at line 182 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of the points that where sent to other processors.
Implements Tessellation.
Definition at line 1208 of file VoronoiMesh.cpp.
|
virtual |
Returns the indeces of the processors with whom points where exchanged.
Implements Tessellation.
Definition at line 1203 of file VoronoiMesh.cpp.
|
virtual |
Returns the total number of points (including ghost)
Implements Tessellation.
Definition at line 1193 of file VoronoiMesh.cpp.
|
virtual |
Returns the total number of faces.
Implements Tessellation.
Definition at line 653 of file VoronoiMesh.cpp.
|
virtual |
Returns the volume of a cell.
index | Cell index |
Implements Tessellation.
Definition at line 452 of file VoronoiMesh.cpp.
|
virtual |
Returns the effective width of a cell.
index | Cell index |
Implements Tessellation.
Definition at line 442 of file VoronoiMesh.cpp.
|
virtual |
Initialise the tessellation.
points | List of mesh generating points |
vproc | Tessellation of processors |
outer | Outer boundary condition |
reorder | Determines whether to apply Hilbert order |
Implements Tessellation.
Definition at line 1404 of file VoronoiMesh.cpp.
|
virtual |
Initialises the tessellation.
points | Initial position of mesh generating points |
bc | Boundary conditions of the computational domain |
HilbertOrder | Should the points be rearranged before insertion |
Implements Tessellation.
Definition at line 312 of file VoronoiMesh.cpp.
|
virtual |
Returns if the cell is adjacent to a boundary.
index | The cell to check |
Implements Tessellation.
Definition at line 157 of file VoronoiMesh.cpp.
void VoronoiMesh::output | ( | string | filename | ) |
Outputs the grid data.
filename | The path to the output file |
void VoronoiMesh::SetPointNo | ( | int | N | ) |
Set the number of points.
N | Number of points |
Definition at line 642 of file VoronoiMesh.cpp.
|
virtual |
Updates the tessellation.
points | List of points |
vproc | Tessellation of processors |
reorder | Whether to apply hilbert order |
Implements Tessellation.
Definition at line 1267 of file VoronoiMesh.cpp.
|
virtual |
Update the tessellation.
points | The new positions of the mesh generating points |
HilbertOrder | Should the points be rearranged before insertion |
Implements Tessellation.
Definition at line 490 of file VoronoiMesh.cpp.
vector< Vector2D > VoronoiMesh::UpdateMPIPoints | ( | Tessellation const & | vproc, |
int | rank, | ||
vector< Vector2D > & | points, | ||
OuterBoundary const * | obc, | ||
vector< size_t > & | selfindex, | ||
vector< int > & | sentproc, | ||
vector< vector< int > > & | sentpoints | ||
) |
Communicate position of mesh generating points between processes.
vproc | Meta tessellation |
rank | Current process rank |
points | List of mesh generating points |
obc | Outer boundary conditions |
selfindex | Local indices |
sentproc | Processes to which points should be sentpoints |
sentpoints | Points to be sent |
Definition at line 1540 of file VoronoiMesh.cpp.