ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mailleur/src/mailleur3d_optimisation.h
Revision: 469
Committed: Wed Nov 27 20:02:22 2013 UTC (11 years, 5 months ago) by francois
Content type: text/plain
Original Path: magic/lib/mailleur_auto/src/mailleur3d_optimisation.h
File size: 3520 byte(s)
Log Message:
ajout d'un generateur de carte de taille constante pour les nouvelles cartes et decoupage de la librairie mailleur en 2 pour cause d'appel cyclique

File Contents

# User Rev Content
1 francois 287 //------------------------------------------------------------
2     //------------------------------------------------------------
3     // MAGiC
4     // Jean Christophe Cuilli�e et Vincent FRANCOIS
5     // D�artement de G�ie M�anique - UQTR
6     //------------------------------------------------------------
7     // Le projet MAGIC est un projet de recherche du d�artement
8     // de g�ie m�anique de l'Universit�du Qu�ec �
9     // Trois Rivi�es
10     // Les librairies ne peuvent �re utilis�s sans l'accord
11     // des auteurs (contact : francois@uqtr.ca)
12     //------------------------------------------------------------
13     //------------------------------------------------------------
14     //
15     // mailleur3d_optimisation.h
16     //
17     //------------------------------------------------------------
18     //------------------------------------------------------------
19     // COPYRIGHT 2000
20     // Version du 02/03/2006 �11H23
21     //------------------------------------------------------------
22     //------------------------------------------------------------
23    
24     #ifndef mailleur3d_optimisationH
25     #define mailleur3d_optimisationH
26    
27    
28    
29     #ifdef WINDOWS_VERSION
30     #ifdef BUILT_DLL_MAILLEUR
31     #define DLLPORTMAIL __declspec(dllexport)
32     #else
33     #define DLLPORTMAIL __declspec(dllimport)
34     #endif
35     #else
36     #define DLLPORTMAIL
37     #endif
38    
39    
40    
41     #ifdef BORLANDCPP
42     #include <map.h>
43     #else
44     #include <map>
45     #define CLK_TCK CLOCKS_PER_SEC
46     #endif
47    
48     #include <vector>
49     #include "mg_maillage.h"
50     #include "mg_geometrie.h"
51     #include "mg_volume.h"
52     #include "tpl_octree.h"
53 francois 445 #include "mailleur.h"
54 francois 287
55    
56    
57    
58    
59 francois 445 class DLLPORTMAIL MAILLEUR3D_OPTIMISATION: public MAILLEUR
60 francois 287 {
61     public:
62     typedef std::multimap<double,class M3D_TETRA*,std::less<double> > ORDRE_TETRA;
63     typedef std::map<unsigned long,ORDRE_TETRA::iterator,std::less<unsigned long> > ORDRE_TETRA_PARID;
64    
65     MAILLEUR3D_OPTIMISATION(MG_MAILLAGE* mgmai,int niv);
66     virtual ~MAILLEUR3D_OPTIMISATION();
67     void change_niveau_optimisation(int num);
68     int get_niveau_optimisation(void);
69    
70 francois 445
71 francois 288 void optimise(MG_VOLUME* mgvol);
72 francois 287
73 francois 288 protected:
74     void optimise(MG_VOLUME* mgvol,int& nbmauvais);
75 francois 287 int bouge_point(MG_VOLUME* mgvol,class M3D_NOEUD* noeud,double& crit,double& x,double& y, double& z);
76     void remaille_coquille(MG_NOEUD* noeud1,MG_NOEUD* noeud2, double& crit, class COQUILLE& coque);
77     void ajouter_ordre_tetra(M3D_TETRA* tet,int num=1);
78     void supprimer_ordre_tetra(M3D_TETRA* tet);
79     double get_volume(MG_TETRA* tet);
80     double get_volume(double *xyz1,double *xyz2,double *xyz3,double *xyz4);
81    
82     ORDRE_TETRA lst_tetra[2];
83     ORDRE_TETRA_PARID lst_tetraid[2];
84     int niveau_optimisation;
85    
86     class MG_TRIANGLE* insere_triangle(class MG_VOLUME* mgvol,MG_NOEUD* noeud1,MG_NOEUD* noeud2,MG_NOEUD* noeud3,int origine);
87     MG_TRIANGLE* cree_triangle(class MG_VOLUME* mgvol,MG_NOEUD* noeud1,MG_NOEUD* noeud2,MG_NOEUD* noeud3,MG_SEGMENT* segment1,MG_SEGMENT* segment2,MG_SEGMENT* segment3,int origine);
88     MG_SEGMENT* cree_segment(class MG_VOLUME* mgvol,MG_NOEUD* noeud1,MG_NOEUD* noeud2,int origine);
89    
90    
91     MG_MAILLAGE* mg_maillage;
92     void o3d_data(void);
93     void o3d_data2(void);
94     int tab_solution[7][1430][8];
95     int tab_face[7][120][3];
96     };
97    
98    
99    
100    
101     class COQUILLE
102     {
103     public:
104     COQUILLE():volume(0) {};
105     ~COQUILLE() {};
106    
107     int taille;
108     MG_TETRA* tet[10];
109     MG_NOEUD* new_tetra[64];
110     double volume;
111     };
112    
113    
114    
115    
116    
117    
118    
119    
120    
121    
122    
123    
124     //---------------------------------------------------------------------------
125     #endif