From 1886b4e773b1bc134d34a46155dc71b83c3e56b6 Mon Sep 17 00:00:00 2001 From: Tristan Carrier Baudouin <tristan.carrier@uclouvain.be> Date: Mon, 21 Jan 2013 09:26:31 +0000 Subject: [PATCH] hexahedra --- Mesh/yamakawa.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Mesh/yamakawa.h b/Mesh/yamakawa.h index 284573d19a..ba63403d5c 100755 --- a/Mesh/yamakawa.h +++ b/Mesh/yamakawa.h @@ -66,6 +66,27 @@ class Diagonal{ bool operator<(const Diagonal&) const; }; +class Tuple{ + private: + MVertex *v1,*v2,*v3; + MElement* element; + GFace* gf; + unsigned long long hash; + public: + Tuple(); + Tuple(MVertex*,MVertex*,MVertex*,MElement*,GFace*); + Tuple(MVertex*,MVertex*,MVertex*); + ~Tuple(); + MVertex* get_v1(); + MVertex* get_v2(); + MVertex* get_v3(); + MElement* get_element() const; + GFace* get_gf() const; + bool same_vertices(Tuple); + unsigned long long get_hash() const; + bool operator<(const Tuple&) const; +}; + class Recombinator{ private: std::vector<Hex> potential; @@ -75,6 +96,8 @@ class Recombinator{ std::multiset<Facet> hash_tableA; std::multiset<Diagonal> hash_tableB; std::multiset<Diagonal> hash_tableC; + std::multiset<Tuple> tuples; + std::set<MElement*> triangles; public: Recombinator(); ~Recombinator(); @@ -90,6 +113,9 @@ class Recombinator{ void improved_merge(GRegion*); void rearrange(GRegion*); void statistics(GRegion*); + void build_tuples(GRegion*); + void modify_surfaces(GRegion*); + void modify_surfaces(MVertex*,MVertex*,MVertex*,MVertex*); bool sliver(MElement*,Hex); double diagonal(MElement*,int&,int&); @@ -174,6 +200,8 @@ class Supplementary{ std::multiset<Facet> hash_tableA; std::multiset<Diagonal> hash_tableB; std::multiset<Diagonal> hash_tableC; + std::multiset<Tuple> tuples; + std::set<MElement*> triangles; public: Supplementary(); ~Supplementary(); @@ -186,6 +214,9 @@ class Supplementary{ void merge(GRegion*); void rearrange(GRegion*); void statistics(GRegion*); + void build_tuples(GRegion*); + void modify_surfaces(GRegion*); + void modify_surfaces(MVertex*,MVertex*,MVertex*,MVertex*); bool four(MElement*); bool five(MElement*); @@ -238,6 +269,8 @@ class PostOp{ std::map<MElement*,bool> markings; std::map<MVertex*,std::set<MElement*> > vertex_to_tetrahedra; std::map<MVertex*,std::set<MElement*> > vertex_to_pyramids; + std::multiset<Tuple> tuples; + std::set<MElement*> triangles; public: PostOp(); ~PostOp(); @@ -252,6 +285,9 @@ class PostOp{ void pyramids2(MVertex*,MVertex*,MVertex*,MVertex*,GRegion*); void rearrange(GRegion*); void statistics(GRegion*); + void build_tuples(GRegion*); + void modify_surfaces(GRegion*); + void modify_surfaces(MVertex*,MVertex*,MVertex*,MVertex*); bool four(MElement*); bool five(MElement*); -- GitLab