ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mailleur/src/remailleur.h
Revision: 425
Committed: Tue Sep 24 22:01:46 2013 UTC (11 years, 11 months ago) by francois
Content type: text/plain
File size: 4818 byte(s)
Log Message:
ajout d'une procedure d'analyse de qualité de maillage + amelioration de la sortie sur terminal des informations dans les mailleurs

File Contents

# Content
1 //---------------------------------------------------------------------------
2
3 #ifndef remailleurH
4 #define remailleurH
5 //---------------------------------------------------------------------------
6
7
8
9 #ifdef WINDOWS_VERSION
10 #ifdef BUILT_DLL_MAILLEUR
11 #define DLLPORTMAIL __declspec(dllexport)
12 #else
13 #define DLLPORTMAIL __declspec(dllimport)
14 #endif
15 #else
16 #define DLLPORTMAIL
17 #endif
18
19 #include "mailleur.h"
20 #include "tpl_octree.h"
21 #include "tpl_quadtree.h"
22 #include "fct_generateur_3D.h"
23 #include "vct_comparaison_resultat.h"
24 #include "mg_volume.h"
25 #include "mg_segment_frontiere.h"
26 #include <map>
27
28
29 class CORRESPONDANCENOEUD
30 {
31 public :
32 CORRESPONDANCENOEUD(class MG_NOEUD*n1,class MG_NOEUD*n2):noeudori(n1),noeudmod(n2) {};
33
34 class MG_NOEUD* noeudori;
35 class MG_NOEUD* noeudmod;
36 };
37
38
39 class DLLPORTMAIL REMAILLEUR:public MAILLEUR
40 {
41 public:
42 REMAILLEUR(class MG_GESTIONNAIRE* gentier,MG_GESTIONNAIRE* gbloc,class MG_GEOMETRIE* geo1,MG_GEOMETRIE* geo2,class FCT_TAILLE* fct_taille1,class FCT_TAILLE* fct_taille2,MG_MAILLAGE* mori,MG_MAILLAGE* mmodi,VCT_COMPARAISON_RESULTAT& cmp);
43 ~REMAILLEUR();
44
45 void maille(int etape);
46 void maille(class MG_GROUPE_TOPOLOGIQUE* mggt=NULL);
47
48 private:
49 void initialise_octree(void);
50 void detruit_noeud(MG_ELEMENT_MAILLAGE* elebase,double distance,int type=0);
51
52 //void cree_quadtree(class MG_MAILLAGE* mai,TPL_QUADTREE<class MG_SEGMENT_FRONTIERE*,class MG_NOEUD*> **quad,TPL_MAP_ENTITE<MG_SEGMENT_FRONTIERE*> *lstsegfront);
53
54
55 //double calcule_distance_contour_face(double *uv,class MG_FACE* face,int num,TPL_QUADTREE<MG_SEGMENT_FRONTIERE*,MG_NOEUD*> **quad);
56 //double distance_pt_segment(double *uv,MG_NOEUD* noeud1,MG_NOEUD* noeud2,MG_FACE* face,int *type,double *longueur_ref);
57 //double distance_pt_segment(double *uv,double *uv1,double *uv2,MG_FACE* face,int *type,double *longueur_ref);
58 int point_appartient_volume(double *xyz,int numvol);
59 int inter_droite_triangle(double *xyz,double *dir,MG_TRIANGLE* tri,double *t);
60 //int angle_contour(double *uv,MG_SEGMENT_FRONTIERE* seg1,MG_SEGMENT_FRONTIERE* seg2,MG_FACE* face);
61 void ajouter_liste_correspondance_noeud(MG_NOEUD* n1,MG_NOEUD* n2);
62 MG_NOEUD* get_liste_correspondance(MG_NOEUD* n1);
63 MG_NOEUD* transfert_noeud(MG_NOEUD* no,MG_ELEMENT_TOPOLOGIQUE* ele);
64 void transfert_coord(double *xyz,double *xyz2);
65 void cree_bloc_maille(multimap<unsigned long,MG_SEGMENT*,less <unsigned long> > &lst,MG_ARETE* arete);
66 void cree_bloc_maille(multimap<unsigned long,MG_TRIANGLE*,less <unsigned long> > &lst,MG_FACE* face);
67 void cree_bloc_maille(multimap<unsigned long,MG_TETRA*,less <unsigned long> > &lst,MG_VOLUME* face);
68 MG_SEGMENT* trouve_segment(multimap<unsigned long,MG_SEGMENT*,less <unsigned long> > &lst,MG_NOEUD* no);
69 MG_TRIANGLE* trouve_triangle(multimap<unsigned long,MG_TRIANGLE*,less <unsigned long> > &lst,MG_NOEUD* no);
70 MG_TETRA* trouve_tetra(multimap<unsigned long,MG_TETRA*,less <unsigned long> > &lst,MG_NOEUD* no);
71 void cree_liste_frontiere(MG_MAILLAGE* mai);
72
73 class MG_GESTIONNAIRE* gestorigine,*gestmodifie;
74 class MG_GEOMETRIE* geoorigine,*geomodifie;
75 class FCT_TAILLE* carteori;
76 class FCT_TAILLE* cartemod;
77 class MG_MAILLAGE* maiorigine;
78 class MG_MAILLAGE* maimodifie;
79 //class TPL_QUADTREE<class MG_SEGMENT_FRONTIERE*,MG_NOEUD*> **quad;
80 TPL_OCTREE_FCT<MG_NOEUD*,FCT_GENERATEUR_3D<4> > *octree;
81 TPL_LISTE_ENTITE<MG_TRIANGLE*> *lsttrifront;
82 //TPL_MAP_ENTITE<class MG_SEGMENT_FRONTIERE*> lstsegfront;
83 VCT_COMPARAISON_RESULTAT& rescmp;
84 map<unsigned long,CORRESPONDANCENOEUD> lstcorrnoeud;
85 multimap<unsigned long,class BLOC_MAILLE_1D*,less <unsigned long> > lstb1d;
86 multimap<unsigned long,class BLOC_MAILLE_2D*,less <unsigned long> > lstb2d;
87 multimap<unsigned long,class BLOC_MAILLE_3D*,less <unsigned long> > lstb3d;
88
89 int nbfacemod;
90
91
92
93 public:
94 enum attache{CONSERVE=154,DETRUIT=155,NONTRAITE=156,TRAITE=157,NONATTACHE=158,ATTACHE=159};
95 };
96
97
98
99
100
101
102
103 class BLOC_MAILLE_1D
104 {
105 public:
106 BLOC_MAILLE_1D(class MG_ARETE* are,int ty):arete(are),etat(REMAILLEUR::NONATTACHE),type(ty) {};
107 ~BLOC_MAILLE_1D() {};
108
109 MG_ARETE* arete;
110 vector<MG_SEGMENT*> lst;
111 unsigned long get_id(void) {return arete->get_id();};
112 int etat;
113 int type;
114 };
115
116 class BLOC_MAILLE_2D
117 {
118 public:
119 BLOC_MAILLE_2D(class MG_FACE* fac,int ty):face(fac),etat(REMAILLEUR::NONATTACHE),type(ty) {};
120 ~BLOC_MAILLE_2D() {};
121
122 MG_FACE* face;
123 vector<MG_TRIANGLE*> lst;
124 unsigned long get_id(void) {return face->get_id();};
125 int etat;
126 int type;
127 };
128
129 class BLOC_MAILLE_3D
130 {
131 public:
132 BLOC_MAILLE_3D(class MG_VOLUME* vol):volume(vol),etat(REMAILLEUR::NONATTACHE) {};
133 ~BLOC_MAILLE_3D() {};
134
135 MG_VOLUME* volume;
136 vector<MG_TETRA*> lst;
137 unsigned long get_id(void) {return volume->get_id();};
138 int etat;
139 };
140
141
142
143
144 #endif