14 #include "../misc/universal_error.hpp" 17 #include "../misc/utils.hpp" 20 #include "../newtonian/two_dimensional/OuterBoundary.hpp" 22 #include "../misc/int2str.hpp" 23 #include "../newtonian/two_dimensional/diagnostics.hpp" 34 int findSomeOuterPoint(
void);
36 pair<vector<vector<int> >, vector<vector<int> > > findOuterPoints(
const Tessellation& t_proc,
37 const vector<Edge>& edge_list,
const vector<Edge>& box_edges, vector<vector<int> > &NghostIndex,
bool periodic,
38 std::vector<int> &cpu_neigh, std::vector<Vector2D> &periodic_add_self, std::vector<std::vector<Vector2D> >
41 std::pair<vector<vector<int> >, vector<int> > FindOuterPoints2
43 const vector<Edge>& edge_list,
44 vector<vector<int> > &to_duplicate,
45 vector<vector<int> >& self_points,
46 const vector<Edge>& box_edges,
47 vector<vector<int> > &NghostIndex,
49 std::vector<int> &cpu_neigh, std::vector<Vector2D> &periodic_add_self, std::vector<std::vector<Vector2D> >
52 vector<vector<int> > boundary_intersection_check
53 (
const vector<Edge>& edges,
54 const vector<vector<int> >& to_duplicate);
57 enum Sides { RIGHT, UP, LEFT, DOWN, LU, LD, RU, RD };
61 class DataOnlyForBuild
65 DataOnlyForBuild(DataOnlyForBuild
const& other);
66 DataOnlyForBuild& operator=(DataOnlyForBuild
const& other);
67 vector<vector<char> > copied;
70 vector<double> radius;
81 bool IsOuterFacet(
int facet)
const;
82 void add_point(
size_t index, stack<std::pair<size_t, size_t> > &flip_stack);
83 void flip(
size_t i,
size_t j, stack<std::pair<size_t, size_t> > & flip_stack);
84 size_t Walk(
size_t point);
85 double CalculateRadius(
int facet);
86 double CalcRadiusHiRes(
int facet);
87 int FindPointInFacet(
int facet,
int point);
88 double FindMaxRadius(
int point);
89 void FindContainingTetras(
int StartTetra,
int point, vector<int> &tetras);
90 vector<int> FindContainingTetras(
int StartTetra,
int point);
91 vector<vector<int> > FindOuterPoints(vector<Edge>
const& edges);
92 void AddPeriodicMPI(std::vector<int>& toduplicate, std::vector<Vector2D>& periodic_add);
93 vector<vector<int> > FindOuterPointsMPI(
OuterBoundary const* obc, vector<Edge>
const& edges,
94 Tessellation const& tproc, vector<vector<int> > &Nghost, vector<int> &proclist);
95 bool IsTripleOut(
int index)
const;
96 int FindTripleLoc(facet
const& f)
const;
97 void AddFacetDuplicate(
int index, vector<vector<int> > &toduplicate, vector<Edge>
98 const& edges, vector<bool> &checked)
const;
99 void AddOuterFacets(
int tri, vector<vector<int> > &toduplicate, vector<Edge>
100 const& edges, vector<bool> &checked);
102 vector<vector<int> > AddOuterFacetsMPI(
int point,vector<vector<int> > &toduplicate,vector<int> &neigh,
103 vector<bool> &checked,
const Tessellation& tproc,
const vector<Edge>& own_edges,
bool periodic,
104 std::vector<Vector2D> &periodic_add_self,std::vector<std::vector<Vector2D> >& periodic_add_others,
107 void AddRigid(vector<Edge>
const& edges,vector<vector<int> > &toduplicate);
108 vector<vector<int> > AddPeriodic(
OuterBoundary const* obc, vector<Edge>
const& edges,
109 vector<vector<int> > &toduplicate);
110 void AddHalfPeriodic(
OuterBoundary const* obc, vector<Edge>
const& edges, vector<vector<int> > &toduplicate);
111 double GetMaxRadius(
int point,
int startfacet);
112 void SendRecvFirstBatch(vector<vector<Vector2D> > &tosend,vector<int>
const& neigh, vector<vector<int> > &Nghost);
113 vector<int> GetOuterFacets(
int cur_facet,
int real_point,
int olength);
143 const vector<Vector2D>&
getCor(
void)
const;
161 void build_delaunay(vector<Vector2D>
const& vp, std::vector<std::pair<Vector2D, Vector2D> >
const & cpoints);
191 double get_cor(
int index,
int dim)
const;
225 void update(
const vector<Vector2D>& points, std::vector<std::pair<Vector2D, Vector2D> >
const& cpoints);
293 vector<vector<int> > &Nghost);
300 bool CheckCorrect(
void);
302 #endif //DELAUNAYMPI_HPP double get_cor(int index, int dim) const
Returns a coordinate.
void Changelength(int n)
Changes the cor length.
Geometrical calculations.
Various checks for geometric data.
void AddBoundaryPoints(vector< Vector2D > const &points)
Adds the points to the tessellation, used for boundary points.
void AddAditionalPoint(Vector2D const &vec)
Adds a point to the cor vector. Used in periodic boundaries with AMR.
void set_point(int index, Vector2D p)
Change Mesh point.
Abstract class for tessellation.
const facet & get_facet(int index) const
Returns a facet.
Delanauy triangle data structure. Keeps the indexes of the vertices (right hand fashion) and the neig...
void update(const vector< Vector2D > &points, std::vector< std::pair< Vector2D, Vector2D > >const &cpoints)
Updates the triangulation.
const vector< Vector2D > & getCor(void) const
Access to coordinates.
int get_length(void) const
Returns the number of points.
Hilbert space filling curve.
int GetTotalLength(void)
Returns the length of all the points (included duplicated)
void output(void)
Dumps the Delaunay tessellation into a binary file.
Vector2D GetCircleCenter(int index, double &R) const
Returns the center of the circumscribed circle of a facet.
vector< Vector2D > & GetMeshPoints(void)
Returns a refrence to the points.
void BuildBoundary(OuterBoundary const *obc, vector< Edge > const &edges)
Builds the boundary points.
~Delaunay(void)
Default destructor.
int get_num_facet(void) const
Returns the number of facets.
Diagnostic class for Delaunay triangulation.
The Delaunay data structure. Gets a set of points and constructs the Delaunay tessellation.
int GetCorSize(void) const
Gets the size of the cor vector.
int GetOrgIndex(int index) const
Retrieves the original index of a point (in case a point was duplicated)
Vector2D get_point(size_t index) const
Returns a point.
delaunay_loggers::DelaunayLogger * logger
Diagnostics.
double get_facet_coordinate(int Facet, int vertice, int dim)
Returns a coordinate of a vertice.
void ChangeOlength(int n)
Changes the cor olength.
int GetOriginalLength(void) const
Returns the original length of the points (without duplicated points)
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...
Abstract class for geometric boundary conditions for the tessellation.
A debugging function for the Delaunay triangulation.
Determines which cells might be affected by boundary conditions.
double triangle_area(int index)
Returns the area of the triangle. Negative result means the triangle isn't right handed.
void build_delaunay(vector< Vector2D >const &vp, std::vector< std::pair< Vector2D, Vector2D > >const &cpoints)
Builds the Delaunay tessellation.
double GetFacetRadius(int facet) const
return the facet's radius
Delaunay(void)
Class constructor.
vector< Vector2D > & ChangeCor(void)
Allows to change the cor.
int GetOriginalIndex(int NewPoint) const
Returns the original index of the duplicated point in Periodic Boundary conditions.