MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
mailleur2d.h
Aller à la documentation de ce fichier.
1 //####//------------------------------------------------------------
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 //####// mailleur2d.h
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:56 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 #ifndef _MAILLEUR2D_
23 #define _MAILLEUR2D_
24 
25 
26 
27 
28 
29 #include <map>
30 
31 
32 #include "mg_front_2D.h"
33 #include "ot_decalage_parametre.h"
34 #include "mg_geometrie.h"
35 #include "mg_maillage.h"
36 #include "mg_face.h"
37 #include "mailleur.h"
38 #include "tpl_octree.h"
39 #include "tpl_liste_entite.h"
40 #include "fct_taille.h"
41 
42 
43 
44 
45 
46 
47 
48 
49 class MAILLEUR2D:public MAILLEUR
50 {
51 public :
52  typedef std::multimap<double,MG_FRONT_2D*,std::less<double> > FRONT;
53 
54 
55  MAILLEUR2D(MG_MAILLAGE* mgmai,MG_GEOMETRIE *mggeo,FCT_TAILLE* fct_taille,MG_FACE* mgface=NULL);
56  ~MAILLEUR2D();
57 
58 
59 
60  int maille(MG_GROUPE_TOPOLOGIQUE* mggt=NULL);
61  int maille(MG_FACE* mgface,TPL_LISTE_ENTITE<MG_SEGMENT*> *lstseg=NULL,TPL_LISTE_ENTITE<MG_TRIANGLE*> *lsttri=NULL);
62  void change_niveau_optimisation(int num);
63  int get_niveau_optimisation(void);
64 
65 
66 private :
67 
68 
69  void initialise_frontiere(MG_FACE* mgface);
70  void cree_ntree(MG_FACE* mgface);
71  void initialise_front(MG_FACE* mgface,TPL_MAP_ENTITE<MG_SOMMET*> &liste_pole);
72  int progresse_front(MG_FACE* mgface);
73  void traite_pole(MG_FACE* mgface,TPL_MAP_ENTITE<MG_SOMMET*> &liste_pole);
74 
75  void verifie_coin_sommet(MG_FACE* mgface,TPL_LISTE_ENTITE<MG_TRIANGLE*> *lstaffectecoin);
76 
79 
80  int traite_front(int type_front,MG_FACE *mgface,MG_FRONT_2D* ftp,MG_FRONT_2D* ft,MG_FRONT_2D* fts);
87 
88  int noeud_est_dans_triangle(MG_NOEUD* noeud,MG_TRIANGLE *triangle);
89  int noeud_est_dans_triangle(MG_NOEUD* noeud,MG_NOEUD *noeud1,MG_NOEUD *noeud2,MG_NOEUD *noeud3);
90  int triangle_est_dans_bon_sens(MG_FACE* face,MG_NOEUD* noeud1,MG_NOEUD *noeud2,MG_NOEUD *noeud3);
91  int genere_noeud(MG_FACE* mgface,MG_FRONT_2D* front,MG_FRONT_2D **front_rencontre,MG_NOEUD **noeud);
92  int insere_segment(MG_FACE *mgface,MG_SEGMENT **nv_segment,MG_NOEUD* noeud1,MG_NOEUD* noeud2,int type_verication);
93  void supprime_segment(MG_SEGMENT* mgsegment);
94  MG_TRIANGLE* insere_triangle(MG_ELEMENT_TOPOLOGIQUE* topo,class MG_NOEUD *mgnoeud1,class MG_NOEUD *mgnoeud2,class MG_NOEUD *mgnoeud3);
95 
96 
97  int intersection_segment_segment(MG_NOEUD* noeud1,MG_NOEUD* noeud2,MG_NOEUD* noeud3,MG_NOEUD* noeud4);
98  int examine_solution(double sol1,double sol2,int type);
99 
100 
101 
102  MG_FRONT_2D* ajouter_front(FRONT& front,MG_NOEUD* noeud1,MG_NOEUD* noeud2,MG_SEGMENT* segment);
103  void ajouter_front(FRONT& front,MG_FRONT_2D *ft);
104  MG_FRONT_2D* get_front(FRONT& front,unsigned int num);
105  unsigned int get_nb_front(FRONT& front);
106  void supprimer_front(MG_FRONT_2D* ft);
107  void echange_de_front(FRONT& front_original,FRONT& front_destination,MG_FRONT_2D* ft);
108  void enregistre_front(char *nom,int dimension=3);
109 
114  double periode_u;
115  double periode_v;
118 
125  double umin,vmin,umax,vmax;
126 
127 
128 };
129 
130 
131 
132 
133 
134 
135 #endif
MG_MAILLAGE * mg_maillage
Definition: mailleur2d.h:110
void insere_contrainte_triangle(MG_FACE *mgface, TPL_LISTE_ENTITE< MG_TRIANGLE * > *lsttri)
double vmin
Definition: mailleur2d.h:125
MG_FRONT_2D * ajouter_front(FRONT &front, MG_NOEUD *noeud1, MG_NOEUD *noeud2, MG_SEGMENT *segment)
void supprime_segment(MG_SEGMENT *mgsegment)
double umin
Definition: mailleur2d.h:125
MG_GEOMETRIE * mg_geometrie
Definition: mailleur2d.h:111
OT_DECALAGE_PARAMETRE * decalage
Definition: mailleur2d.h:117
void cree_ntree(MG_FACE *mgface)
Definition: mailleur2d.cpp:617
int examine_solution(double sol1, double sol2, int type)
TPL_LISTE_ENTITE< MG_NOEUD * > noeud_frontiere
Definition: mailleur2d.h:120
FRONT front_attente
Definition: mailleur2d.h:124
void supprimer_front(MG_FRONT_2D *ft)
int get_niveau_optimisation(void)
std::multimap< double, MG_FRONT_2D *, std::less< double > > FRONT
Definition: mailleur2d.h:52
void initialise_frontiere(MG_FACE *mgface)
Definition: mailleur2d.cpp:537
void echange_de_front(FRONT &front_original, FRONT &front_destination, MG_FRONT_2D *ft)
int traite_front_cas_ferme_cavite_p(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
double periode_u
Definition: mailleur2d.h:114
int maille(MG_GROUPE_TOPOLOGIQUE *mggt=NULL)
Definition: mailleur2d.cpp:49
int traite_front_cas_ferme_cavite(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
int genere_noeud(MG_FACE *mgface, MG_FRONT_2D *front, MG_FRONT_2D **front_rencontre, MG_NOEUD **noeud)
int traite_front_cas_front_3(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
int traite_front_cas_front_4(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
MG_FACE * mg_face
Definition: mailleur2d.h:112
int niveau_optimisation
Definition: mailleur2d.h:116
MAILLEUR2D(MG_MAILLAGE *mgmai, MG_GEOMETRIE *mggeo, FCT_TAILLE *fct_taille, MG_FACE *mgface=NULL)
Definition: mailleur2d.cpp:36
int traite_front(int type_front, MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
TPL_LISTE_ENTITE< MG_SEGMENT * > segment_frontiere
Definition: mailleur2d.h:119
FCT_TAILLE * metrique
Definition: mailleur2d.h:113
unsigned int get_nb_front(FRONT &front)
MG_FRONT_2D * get_front(FRONT &front, unsigned int num)
void traite_pole(MG_FACE *mgface, TPL_MAP_ENTITE< MG_SOMMET * > &liste_pole)
Definition: mailleur2d.cpp:118
double vmax
Definition: mailleur2d.h:125
void insere_contrainte_segment(MG_FACE *mgface, TPL_LISTE_ENTITE< MG_SEGMENT * > *lstseg)
Definition: mailleur2d.cpp:984
int noeud_est_dans_triangle(MG_NOEUD *noeud, MG_TRIANGLE *triangle)
double umax
Definition: mailleur2d.h:125
int traite_front_cas_ferme_cavite_s(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
void enregistre_front(char *nom, int dimension=3)
double periode_v
Definition: mailleur2d.h:115
int insere_segment(MG_FACE *mgface, MG_SEGMENT **nv_segment, MG_NOEUD *noeud1, MG_NOEUD *noeud2, int type_verication)
void change_niveau_optimisation(int num)
void initialise_front(MG_FACE *mgface, TPL_MAP_ENTITE< MG_SOMMET * > &liste_pole)
Definition: mailleur2d.cpp:643
TPL_NTREE_FCT< MG_SEGMENT *, FCT_TAILLE > * ntree_de_segment
Definition: mailleur2d.h:121
TPL_OCTREE< MG_FRONT_2D *, MG_NOEUD * > * ntree_de_front
Definition: mailleur2d.h:122
int progresse_front(MG_FACE *mgface)
Definition: mailleur2d.cpp:885
int triangle_est_dans_bon_sens(MG_FACE *face, MG_NOEUD *noeud1, MG_NOEUD *noeud2, MG_NOEUD *noeud3)
void verifie_coin_sommet(MG_FACE *mgface, TPL_LISTE_ENTITE< MG_TRIANGLE * > *lstaffectecoin)
Definition: mailleur2d.cpp:432
MG_TRIANGLE * insere_triangle(MG_ELEMENT_TOPOLOGIQUE *topo, class MG_NOEUD *mgnoeud1, class MG_NOEUD *mgnoeud2, class MG_NOEUD *mgnoeud3)
FRONT front_courant
Definition: mailleur2d.h:123
int intersection_segment_segment(MG_NOEUD *noeud1, MG_NOEUD *noeud2, MG_NOEUD *noeud3, MG_NOEUD *noeud4)
int traite_front_cas_general(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)