ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mailleur/src/remailleur.h
Revision: 1189
Committed: Tue Feb 4 17:26:49 2025 UTC (3 months ago) by francois
Content type: text/plain
File size: 4822 byte(s)
Log Message:
Version 5.0 de MAGIC. Integration de ALGLIB pour faire de l'optimisation. ALGLIB se download automatiquement en executant un script dans le repertoire config update_magic.bash


File Contents

# User Rev Content
1 francois 1158 //####//------------------------------------------------------------
2     //####//------------------------------------------------------------
3     //####// MAGiC
4     //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5     //####// Departement de Genie Mecanique - UQTR
6     //####//------------------------------------------------------------
7     //####// MAGIC est un projet de recherche de l equipe ERICCA
8     //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9     //####// http://www.uqtr.ca/ericca
10     //####// http://www.uqtr.ca/
11     //####//------------------------------------------------------------
12     //####//------------------------------------------------------------
13     //####//
14     //####// remailleur.h
15     //####//
16     //####//------------------------------------------------------------
17     //####//------------------------------------------------------------
18     //####// COPYRIGHT 2000-2024
19     //####// jeu 13 jun 2024 11:58:55 EDT
20     //####//------------------------------------------------------------
21     //####//------------------------------------------------------------
22 francois 147
23     #ifndef remailleurH
24     #define remailleurH
25    
26    
27    
28    
29 francois 1158
30 francois 147 #include "mailleur.h"
31     #include "tpl_octree.h"
32     #include "tpl_quadtree.h"
33 francois 481 #include "fct_generateur_3d.h"
34 francois 147 #include "vct_comparaison_resultat.h"
35     #include "mg_volume.h"
36 francois 149 #include "mg_segment_frontiere.h"
37 francois 147 #include <map>
38    
39    
40     class CORRESPONDANCENOEUD
41     {
42     public :
43     CORRESPONDANCENOEUD(class MG_NOEUD*n1,class MG_NOEUD*n2):noeudori(n1),noeudmod(n2) {};
44    
45     class MG_NOEUD* noeudori;
46     class MG_NOEUD* noeudmod;
47     };
48    
49    
50 francois 1158 class REMAILLEUR:public MAILLEUR
51 francois 147 {
52     public:
53     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);
54     ~REMAILLEUR();
55    
56 couturad 966 int maille(int etape);
57     int maille(class MG_GROUPE_TOPOLOGIQUE* mggt=NULL);
58 francois 147
59     private:
60     void initialise_octree(void);
61 francois 168 void detruit_noeud(MG_ELEMENT_MAILLAGE* elebase,double distance,int type=0);
62 francois 147
63    
64    
65     int point_appartient_volume(double *xyz,int numvol);
66     int inter_droite_triangle(double *xyz,double *dir,MG_TRIANGLE* tri,double *t);
67     void ajouter_liste_correspondance_noeud(MG_NOEUD* n1,MG_NOEUD* n2);
68     MG_NOEUD* get_liste_correspondance(MG_NOEUD* n1);
69     MG_NOEUD* transfert_noeud(MG_NOEUD* no,MG_ELEMENT_TOPOLOGIQUE* ele);
70     void transfert_coord(double *xyz,double *xyz2);
71 couturad 951 void cree_bloc_maille(std::multimap<unsigned long,MG_SEGMENT*,std::less <unsigned long> > &lst,MG_ARETE* arete);
72     void cree_bloc_maille(std::multimap<unsigned long,MG_TRIANGLE*,std::less <unsigned long> > &lst,MG_FACE* face);
73     void cree_bloc_maille(std::multimap<unsigned long,MG_TETRA*,std::less <unsigned long> > &lst,MG_VOLUME* face);
74     MG_SEGMENT* trouve_segment(std::multimap<unsigned long,MG_SEGMENT*,std::less <unsigned long> > &lst,MG_NOEUD* no);
75     MG_TRIANGLE* trouve_triangle(std::multimap<unsigned long,MG_TRIANGLE*,std::less <unsigned long> > &lst,MG_NOEUD* no);
76     MG_TETRA* trouve_tetra(std::multimap<unsigned long,MG_TETRA*,std::less <unsigned long> > &lst,MG_NOEUD* no);
77 francois 147 void cree_liste_frontiere(MG_MAILLAGE* mai);
78    
79     class MG_GESTIONNAIRE* gestorigine,*gestmodifie;
80     class MG_GEOMETRIE* geoorigine,*geomodifie;
81     class FCT_TAILLE* carteori;
82     class FCT_TAILLE* cartemod;
83     class MG_MAILLAGE* maiorigine;
84     class MG_MAILLAGE* maimodifie;
85 francois 467 TPL_OCTREE_FCT<MG_NOEUD*,FCT_TAILLE > *octree;
86 francois 147 TPL_LISTE_ENTITE<MG_TRIANGLE*> *lsttrifront;
87     VCT_COMPARAISON_RESULTAT& rescmp;
88 couturad 951 std::map<unsigned long,CORRESPONDANCENOEUD> lstcorrnoeud;
89     std::multimap<unsigned long,class BLOC_MAILLE_1D*,std::less <unsigned long> > lstb1d;
90     std::multimap<unsigned long,class BLOC_MAILLE_2D*,std::less <unsigned long> > lstb2d;
91     std::multimap<unsigned long,class BLOC_MAILLE_3D*,std::less <unsigned long> > lstb3d;
92 francois 165
93 francois 164 int nbfacemod;
94 francois 257
95    
96    
97     public:
98     enum attache{CONSERVE=154,DETRUIT=155,NONTRAITE=156,TRAITE=157,NONATTACHE=158,ATTACHE=159};
99 francois 147 };
100    
101    
102    
103    
104    
105    
106    
107 francois 257 class BLOC_MAILLE_1D
108     {
109     public:
110     BLOC_MAILLE_1D(class MG_ARETE* are,int ty):arete(are),etat(REMAILLEUR::NONATTACHE),type(ty) {};
111     ~BLOC_MAILLE_1D() {};
112    
113     MG_ARETE* arete;
114 couturad 951 std::vector<MG_SEGMENT*> lst;
115 francois 257 unsigned long get_id(void) {return arete->get_id();};
116     int etat;
117     int type;
118     };
119    
120     class BLOC_MAILLE_2D
121     {
122     public:
123     BLOC_MAILLE_2D(class MG_FACE* fac,int ty):face(fac),etat(REMAILLEUR::NONATTACHE),type(ty) {};
124     ~BLOC_MAILLE_2D() {};
125    
126     MG_FACE* face;
127 couturad 951 std::vector<MG_TRIANGLE*> lst;
128 francois 257 unsigned long get_id(void) {return face->get_id();};
129     int etat;
130     int type;
131     };
132    
133     class BLOC_MAILLE_3D
134     {
135     public:
136     BLOC_MAILLE_3D(class MG_VOLUME* vol):volume(vol),etat(REMAILLEUR::NONATTACHE) {};
137     ~BLOC_MAILLE_3D() {};
138    
139     MG_VOLUME* volume;
140 couturad 951 std::vector<MG_TETRA*> lst;
141 francois 257 unsigned long get_id(void) {return volume->get_id();};
142     int etat;
143     };
144    
145    
146    
147    
148 francois 147 #endif