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
MAILLEUR2D::traite_front
int traite_front(int type_front, MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
Definition: mailleur2d_traite_front.cpp:31
MAILLEUR2D::niveau_optimisation
int niveau_optimisation
Definition: mailleur2d.h:116
MAILLEUR2D::~MAILLEUR2D
~MAILLEUR2D()
Definition: mailleur2d.cpp:42
MAILLEUR2D::vmax
double vmax
Definition: mailleur2d.h:125
MAILLEUR2D::umax
double umax
Definition: mailleur2d.h:125
MG_SEGMENT
Definition: mg_segment.h:38
mg_geometrie.h
MAILLEUR2D::periode_u
double periode_u
Definition: mailleur2d.h:114
MAILLEUR2D::supprimer_front
void supprimer_front(MG_FRONT_2D *ft)
Definition: mailleur2d.cpp:1648
MAILLEUR2D::front_courant
FRONT front_courant
Definition: mailleur2d.h:123
MAILLEUR2D::supprime_segment
void supprime_segment(MG_SEGMENT *mgsegment)
Definition: mailleur2d_outil.cpp:140
MAILLEUR2D::verifie_coin_sommet
void verifie_coin_sommet(MG_FACE *mgface, TPL_LISTE_ENTITE< MG_TRIANGLE * > *lstaffectecoin)
Definition: mailleur2d.cpp:432
MAILLEUR2D::front_attente
FRONT front_attente
Definition: mailleur2d.h:124
fct_taille.h
MAILLEUR2D::noeud_frontiere
TPL_LISTE_ENTITE< MG_NOEUD * > noeud_frontiere
Definition: mailleur2d.h:120
MAILLEUR2D::insere_contrainte_segment
void insere_contrainte_segment(MG_FACE *mgface, TPL_LISTE_ENTITE< MG_SEGMENT * > *lstseg)
Definition: mailleur2d.cpp:984
MG_FRONT_2D
Definition: mg_front_2D.h:32
MAILLEUR2D::get_nb_front
unsigned int get_nb_front(FRONT &front)
Definition: mailleur2d.cpp:1642
MAILLEUR2D::insere_triangle
MG_TRIANGLE * insere_triangle(MG_ELEMENT_TOPOLOGIQUE *topo, class MG_NOEUD *mgnoeud1, class MG_NOEUD *mgnoeud2, class MG_NOEUD *mgnoeud3)
Definition: mailleur2d_outil.cpp:301
TPL_MAP_ENTITE
Definition: tpl_map_entite.h:35
MAILLEUR2D::ajouter_front
MG_FRONT_2D * ajouter_front(FRONT &front, MG_NOEUD *noeud1, MG_NOEUD *noeud2, MG_SEGMENT *segment)
Definition: mailleur2d.cpp:1620
MAILLEUR2D::mg_maillage
MG_MAILLAGE * mg_maillage
Definition: mailleur2d.h:110
mg_front_2D.h
MAILLEUR2D::enregistre_front
void enregistre_front(char *nom, int dimension=3)
Definition: mailleur2d.cpp:1680
MG_TRIANGLE
Definition: mg_triangle.h:38
FCT_TAILLE
Definition: fct_taille.h:30
MAILLEUR2D::insere_segment
int insere_segment(MG_FACE *mgface, MG_SEGMENT **nv_segment, MG_NOEUD *noeud1, MG_NOEUD *noeud2, int type_verication)
Definition: mailleur2d_outil.cpp:77
TPL_NTREE_FCT< MG_SEGMENT *, FCT_TAILLE >
MAILLEUR2D
Definition: mailleur2d.h:49
MAILLEUR2D::noeud_est_dans_triangle
int noeud_est_dans_triangle(MG_NOEUD *noeud, MG_TRIANGLE *triangle)
Definition: mailleur2d_outil.cpp:37
MAILLEUR2D::mg_geometrie
MG_GEOMETRIE * mg_geometrie
Definition: mailleur2d.h:111
MAILLEUR2D::insere_contrainte_triangle
void insere_contrainte_triangle(MG_FACE *mgface, TPL_LISTE_ENTITE< MG_TRIANGLE * > *lsttri)
Definition: mailleur2d.cpp:1195
ot_decalage_parametre.h
MAILLEUR2D::vmin
double vmin
Definition: mailleur2d.h:125
MG_ELEMENT_TOPOLOGIQUE
Definition: mg_element_topologique.h:51
MAILLEUR2D::mg_face
MG_FACE * mg_face
Definition: mailleur2d.h:112
MAILLEUR2D::examine_solution
int examine_solution(double sol1, double sol2, int type)
Definition: mailleur2d_outil.cpp:466
mailleur.h
MAILLEUR2D::cree_ntree
void cree_ntree(MG_FACE *mgface)
Definition: mailleur2d.cpp:617
MAILLEUR2D::traite_front_cas_front_4
int traite_front_cas_front_4(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
Definition: mailleur2d_traite_front.cpp:72
MAILLEUR2D::ntree_de_segment
TPL_NTREE_FCT< MG_SEGMENT *, FCT_TAILLE > * ntree_de_segment
Definition: mailleur2d.h:121
MAILLEUR2D::traite_front_cas_ferme_cavite_p
int traite_front_cas_ferme_cavite_p(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
Definition: mailleur2d_traite_front.cpp:213
MAILLEUR2D::echange_de_front
void echange_de_front(FRONT &front_original, FRONT &front_destination, MG_FRONT_2D *ft)
Definition: mailleur2d.cpp:1672
MAILLEUR2D::traite_front_cas_general
int traite_front_cas_general(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
Definition: mailleur2d_traite_front.cpp:258
MG_NOEUD
Definition: mg_noeud.h:41
MAILLEUR2D::segment_frontiere
TPL_LISTE_ENTITE< MG_SEGMENT * > segment_frontiere
Definition: mailleur2d.h:119
MAILLEUR2D::traite_front_cas_ferme_cavite_s
int traite_front_cas_ferme_cavite_s(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
Definition: mailleur2d_traite_front.cpp:235
MAILLEUR2D::MAILLEUR2D
MAILLEUR2D(MG_MAILLAGE *mgmai, MG_GEOMETRIE *mggeo, FCT_TAILLE *fct_taille, MG_FACE *mgface=NULL)
Definition: mailleur2d.cpp:36
MAILLEUR2D::traite_pole
void traite_pole(MG_FACE *mgface, TPL_MAP_ENTITE< MG_SOMMET * > &liste_pole)
Definition: mailleur2d.cpp:118
MAILLEUR2D::traite_front_cas_ferme_cavite
int traite_front_cas_ferme_cavite(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
Definition: mailleur2d_traite_front.cpp:143
tpl_octree.h
MAILLEUR2D::get_niveau_optimisation
int get_niveau_optimisation(void)
Definition: mailleur2d.cpp:1614
MAILLEUR2D::metrique
FCT_TAILLE * metrique
Definition: mailleur2d.h:113
MAILLEUR2D::decalage
OT_DECALAGE_PARAMETRE * decalage
Definition: mailleur2d.h:117
MAILLEUR2D::traite_front_cas_front_3
int traite_front_cas_front_3(MG_FACE *mgface, MG_FRONT_2D *ftp, MG_FRONT_2D *ft, MG_FRONT_2D *fts)
Definition: mailleur2d_traite_front.cpp:57
MAILLEUR2D::initialise_front
void initialise_front(MG_FACE *mgface, TPL_MAP_ENTITE< MG_SOMMET * > &liste_pole)
Definition: mailleur2d.cpp:643
MAILLEUR2D::triangle_est_dans_bon_sens
int triangle_est_dans_bon_sens(MG_FACE *face, MG_NOEUD *noeud1, MG_NOEUD *noeud2, MG_NOEUD *noeud3)
Definition: mailleur2d_outil.cpp:317
MAILLEUR2D::periode_v
double periode_v
Definition: mailleur2d.h:115
mg_maillage.h
MAILLEUR2D::intersection_segment_segment
int intersection_segment_segment(MG_NOEUD *noeud1, MG_NOEUD *noeud2, MG_NOEUD *noeud3, MG_NOEUD *noeud4)
Definition: mailleur2d_outil.cpp:346
MAILLEUR2D::ntree_de_front
TPL_OCTREE< MG_FRONT_2D *, MG_NOEUD * > * ntree_de_front
Definition: mailleur2d.h:122
MAILLEUR2D::progresse_front
int progresse_front(MG_FACE *mgface)
Definition: mailleur2d.cpp:885
MG_GROUPE_TOPOLOGIQUE
Definition: mg_groupe_topologique.h:31
MAILLEUR2D::maille
int maille(MG_GROUPE_TOPOLOGIQUE *mggt=NULL)
Definition: mailleur2d.cpp:49
MAILLEUR2D::initialise_frontiere
void initialise_frontiere(MG_FACE *mgface)
Definition: mailleur2d.cpp:537
MAILLEUR
Definition: mailleur.h:33
MG_GEOMETRIE
Definition: mg_geometrie.h:84
MG_MAILLAGE
Definition: mg_maillage.h:62
TPL_LISTE_ENTITE< MG_SEGMENT * >
MAILLEUR2D::umin
double umin
Definition: mailleur2d.h:125
MG_FACE
Definition: mg_face.h:34
MAILLEUR2D::genere_noeud
int genere_noeud(MG_FACE *mgface, MG_FRONT_2D *front, MG_FRONT_2D **front_rencontre, MG_NOEUD **noeud)
Definition: mailleur2d_outil.cpp:147
MAILLEUR2D::FRONT
std::multimap< double, MG_FRONT_2D *, std::less< double > > FRONT
Definition: mailleur2d.h:52
MAILLEUR2D::change_niveau_optimisation
void change_niveau_optimisation(int num)
Definition: mailleur2d.cpp:1609
mg_face.h
tpl_liste_entite.h
OT_DECALAGE_PARAMETRE
Definition: ot_decalage_parametre.h:28
TPL_OCTREE< MG_FRONT_2D *, MG_NOEUD * >
MAILLEUR2D::get_front
MG_FRONT_2D * get_front(FRONT &front, unsigned int num)
Definition: mailleur2d.cpp:1634