ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/mailleur_auto/src/mailleur3d.cpp
Revision: 190
Committed: Thu Jul 9 14:07:18 2009 UTC (15 years, 10 months ago) by francois
Original Path: magic/lib/mailleur/mailleur/src/mailleur3d.cpp
File size: 23444 byte(s)
Log Message:
Parametrage de la destruction du mailleur3D pour que la strategie puisse changer selon les besoins (mailleur bloc ou remailleur)

File Contents

# User Rev Content
1 5 //------------------------------------------------------------
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.cpp
16     //
17     //------------------------------------------------------------
18     //------------------------------------------------------------
19     // COPYRIGHT 2000
20     // Version du 02/03/2006 �11H23
21     //------------------------------------------------------------
22     //------------------------------------------------------------
23    
24    
25     #include "gestionversion.h"
26    
27    
28     //#pragma hdrstop
29     #include <time.h>
30     #include "tpl_set.h"
31     #include "mailleur3d.h"
32     #include "m3d_triangle.h"
33 francois 35 #include "mg_gestionnaire.h"
34 5 //---------------------------------------------------------------------------
35    
36     //#pragma package(smart_init)
37    
38    
39    
40 francois 190 MAILLEUR3D::MAILLEUR3D(MG_MAILLAGE* mgmai,MG_GEOMETRIE *mggeo,MG_VOLUME* mgvol,FCT_TAILLE* fct_taille,int destruction):MAILLEUR(),mg_maillage(mgmai),mg_geometrie(mggeo),mg_volume(mgvol),metrique(fct_taille),activelog(0),niveau_optimisation(2),type_mailleur(FRONTAL),typedestruction(destruction)
41 5 {
42    
43     for (int i=0;i<100;i++)
44     {
45     cpu[i]=0.;
46     nbfois[i]=0;
47     }
48     }
49    
50    
51 francois 190 MAILLEUR3D::MAILLEUR3D(FCT_GENERATEUR_3D<4> *carte,MG_MAILLAGE* mgmai,int destruction):metrique(carte),type_mailleur(OCTAL),mg_maillage(mgmai),coef(2.),typedestruction(destruction)
52 francois 78 {
53     }
54 5
55 francois 78
56 5 MAILLEUR3D::~MAILLEUR3D()
57     {
58     }
59    
60    
61    
62    
63     void MAILLEUR3D::maille(void)
64     {
65 francois 78 if (type_mailleur==FRONTAL)
66 5 {
67 francois 78 if (mg_volume!=NULL) maille(mg_volume);
68     else
69 5 {
70 francois 78 int nb_vol=mg_geometrie->get_nb_mg_volume();
71     for (int i=0;i<nb_vol;i++)
72     {
73     MG_VOLUME* mgvol=mg_geometrie->get_mg_volume(i);
74     maille(mgvol);
75     }
76 5 }
77     }
78 francois 78 if (type_mailleur==OCTAL)
79     {
80     FCT_GENERATEUR_3D<4> *carte=(FCT_GENERATEUR_3D<4> *)metrique;
81     maille(carte);
82     }
83 5
84     }
85    
86    
87    
88 francois 54 void MAILLEUR3D::maille(MG_VOLUME* mgvol,TPL_LISTE_ENTITE<MG_TRIANGLE*> *lsttri,TPL_LISTE_ENTITE<MG_TETRA*> *lsttet)
89 5 {
90     initialise_frontiere(mgvol);
91     cree_octree();
92     int creation_metrique=0;
93     if (metrique==NULL)
94     {
95     metrique=new FCT_TAILLE_VOLUME(distance_maximale,octree_de_frontiere);
96     creation_metrique=1;
97     }
98 francois 35 else distance_maximale=metrique->get_valeur_maximale(0);
99 francois 54 if (affichageactif==1) (*affiche)(" Construction du front");
100 francois 35 initialise_front(mgvol);
101 francois 54 if (lsttri!=NULL) insere_contrainte_triangle(mgvol,lsttri);
102     if (lsttet!=NULL) insere_contrainte_tetra(mgvol,lsttet);
103     if (affichageactif==1) (*affiche)(" Progression du front");
104 francois 61 //mg_maillage->get_gestionnaire()->enregistrer("c:\\void.magic");
105 5 progresse_front(mgvol);
106 francois 54 if (affichageactif==1) (*affiche)(" Construction du maillage final");
107 5 detruit_element_inactif();
108 francois 54 if (affichageactif==1) (*affiche)(" Optimisation du maillage final");
109 francois 61 int nbaoptimiser;
110     int nbaoptimiserapres=mg_maillage->get_nb_mg_tetra();
111     do
112     {
113     nbaoptimiser=nbaoptimiserapres;
114     optimise(mgvol,nbaoptimiserapres);
115     }
116     while (nbaoptimiserapres!=nbaoptimiser);
117 5 if (creation_metrique==1) delete metrique;
118    
119     delete octree_de_triangle;
120     delete octree_de_frontiere;
121     delete octree_de_front;
122    
123     triangle_frontiere.vide();
124     noeud_frontiere.vide();
125     noeud_arete_frontiere.vide();
126     }
127    
128     void MAILLEUR3D::initialise_frontiere(MG_VOLUME* mgvol)
129     {
130     clock_t cpu1=clock(); //debug
131     int nbcoq=mgvol->get_nb_mg_coquille();
132     for (int i=0;i<nbcoq;i++)
133     {
134     MG_COQUILLE* mgcoq=mgvol->get_mg_coquille(i);
135     int nbcoface=mgcoq->get_nb_mg_coface();
136     for (int j=0;j<nbcoface;j++)
137     {
138     MG_COFACE* coface=mgcoq->get_mg_coface(j);
139     MG_FACE* mgface=coface->get_face();
140     TPL_SET<MG_ELEMENT_MAILLAGE*> * lien_maillage = mgface->get_lien_maillage();
141     TPL_SET<MG_ELEMENT_MAILLAGE*>::ITERATEUR it;
142     MG_ELEMENT_MAILLAGE* element;
143     for (element = lien_maillage->get_premier(it); element; element = lien_maillage->get_suivant(it) )
144     {
145     MG_TRIANGLE* mgtri=(MG_TRIANGLE*)element;
146     MG_TRIANGLE* tritemp=mg_maillage->get_mg_triangleid(mgtri->get_id());
147     if (tritemp==NULL) continue;
148     triangle_frontiere.ajouter(mgtri);
149     noeud_frontiere.ajouter(mgtri->get_noeud1());
150     noeud_frontiere.ajouter(mgtri->get_noeud2());
151     noeud_frontiere.ajouter(mgtri->get_noeud3());
152     }
153     int nbbou=mgface->get_nb_mg_boucle();
154     for (int l=0;l<nbbou;l++)
155     {
156     MG_BOUCLE* mgbou=mgface->get_mg_boucle(l);
157     int nbcoarete=mgbou->get_nb_mg_coarete();
158     for (int m=0;m<nbcoarete;m++)
159     {
160     MG_COARETE* mgcoarete=mgbou->get_mg_coarete(m);
161     MG_ARETE* mgarete=mgcoarete->get_arete();
162     TPL_SET<MG_ELEMENT_MAILLAGE*> * lien_maillage = mgarete->get_lien_maillage();
163     TPL_SET<MG_ELEMENT_MAILLAGE*>::ITERATEUR it;
164     MG_ELEMENT_MAILLAGE* element;
165     for (element = lien_maillage->get_premier(it); element; element = lien_maillage->get_suivant(it) )
166     {
167     MG_SEGMENT* mgseg=(MG_SEGMENT*)element;
168     MG_SEGMENT* segtemp=mg_maillage->get_mg_segmentid(mgseg->get_id());
169     if (segtemp==NULL) continue;
170     noeud_arete_frontiere.ajouter(mgseg->get_noeud1());
171     noeud_arete_frontiere.ajouter(mgseg->get_noeud2());
172     }
173     }
174     }
175     }
176     }
177    
178     clock_t cpu2=clock(); //debug
179     cpu[0]=cpu[0]+(cpu2-cpu1)/CLK_TCK; //debug
180     nbfois[0]++; //debug
181     }
182    
183     void MAILLEUR3D::cree_octree(void)
184     {
185 francois 129 /*double xmin,ymin,zmin;
186 5 double xmax,ymax,zmax;
187    
188     clock_t cpu1=clock(); // debug
189     int nb_noeud=noeud_arete_frontiere.get_nb();
190     for (int i=0;i<nb_noeud;i++)
191     {
192     MG_NOEUD* mgnoeud=noeud_arete_frontiere.get(i);
193     if (i==0)
194     {
195     xmin=mgnoeud->get_x();
196     xmax=mgnoeud->get_x();
197     ymin=mgnoeud->get_y();
198     ymax=mgnoeud->get_y();
199     zmin=mgnoeud->get_z();
200     zmax=mgnoeud->get_z();
201     }
202     else
203     {
204     xmin=std::min(xmin,mgnoeud->get_x());
205     ymin=std::min(ymin,mgnoeud->get_y());
206     zmin=std::min(zmin,mgnoeud->get_z());
207     xmax=std::max(xmax,mgnoeud->get_x());
208     ymax=std::max(ymax,mgnoeud->get_y());
209     zmax=std::max(zmax,mgnoeud->get_z());
210     }
211 francois 129 }
212 5 double xdiff=xmax-xmin;
213     double ydiff=ymax-ymin;
214     double zdiff=zmax-zmin;
215 francois 129 double xcentre=0.5*(xmax+xmin);
216     double ycentre=0.5*(ymax+ymin);
217     double zcentre=0.5*(zmax+zmin);
218     xmin=xcentre-10.25*xdiff;
219     xmax=xcentre+10.25*xdiff;
220     ymin=ycentre-10.25*ydiff;
221     ymax=ycentre+10.25*ydiff;
222     zmin=zcentre-10.25*zdiff;
223     zmax=zcentre+10.25*zdiff; */
224     FCT_GENERATEUR_3D<4> *carte=(FCT_GENERATEUR_3D<4> *)metrique;
225     int nb_cellule=carte->get_nb_cellule();
226     double param[32];
227     carte->get_information(0,0,param);
228     double xmin=param[0]+0.005*(param[1]-param[0]);
229     double ymin=param[8]+0.005*(param[10]-param[8]);
230     double zmin=param[16]+0.005*(param[20]-param[16]);
231     carte->get_information(nb_cellule-1,0,param);
232     double xmax=param[1]-0.005*(param[1]-param[0]);
233     double ymax=param[10]-0.005*(param[10]-param[8]);
234     double zmax=param[20]-0.005*(param[20]-param[16]);
235     octree_de_triangle=new TPL_OCTREE_FCT<MG_TRIANGLE*,FCT_GENERATEUR_3D<4> >;
236 5 octree_de_frontiere=new TPL_OCTREE<MG_TRIANGLE*,MG_NOEUD*>;
237     octree_de_front=new TPL_OCTREE<MG_FRONT_3D*,MG_NOEUD*>;
238 francois 129 octree_de_triangle->initialiser(*carte,xmin,ymin,zmin,xmax,ymax,zmax);
239 5 octree_de_frontiere->initialiser(octree_de_triangle);
240     octree_de_front->initialiser(octree_de_triangle);
241    
242     int nb_triangle=triangle_frontiere.get_nb();
243     for (int j=0;j<nb_triangle;j++)
244     {
245     octree_de_frontiere->inserer(triangle_frontiere.get(j));
246     octree_de_triangle->inserer(triangle_frontiere.get(j));
247     }
248 francois 129 /*clock_t cpu2=clock(); //debug
249 5 cpu[1]=cpu[1]+(cpu2-cpu1)/CLK_TCK; //debug
250 francois 129 nbfois[1]++; //debug*/
251 5 }
252    
253     void MAILLEUR3D::initialise_front(MG_VOLUME* mgvol)
254     {
255     clock_t cpu1=clock(); //debug
256     // constitution du front
257     int nbcoq=mgvol->get_nb_mg_coquille();
258     for (int i=0;i<nbcoq;i++)
259     {
260     MG_COQUILLE* mgcoq=mgvol->get_mg_coquille(i);
261     int nbcoface=mgcoq->get_nb_mg_coface();
262     for (int j=0;j<nbcoface;j++)
263     {
264     MG_COFACE* coface=mgcoq->get_mg_coface(j);
265     MG_FACE* mgface=coface->get_face();
266    
267     TPL_SET<MG_ELEMENT_MAILLAGE*> * lien_maillage = mgface->get_lien_maillage();
268     TPL_SET<MG_ELEMENT_MAILLAGE*>::ITERATEUR it;
269     MG_ELEMENT_MAILLAGE* element;
270     for (element = lien_maillage->get_premier(it); element; element = lien_maillage->get_suivant(it) )
271     {
272     MG_TRIANGLE* mgtri=(MG_TRIANGLE*)element;
273     MG_TRIANGLE* tritemp=mg_maillage->get_mg_triangleid(mgtri->get_id());
274     if (tritemp==NULL) continue;
275     if (coface->get_orientation()==1) ajouter_front_courant(NONFORCE,mgtri->get_noeud1(),mgtri->get_noeud2(),mgtri->get_noeud3(),mgtri);
276     else ajouter_front_courant(NONFORCE,mgtri->get_noeud1(),mgtri->get_noeud3(),mgtri->get_noeud2(),mgtri);
277     }
278     }
279     }
280    
281     // recherche des voisins
282     for (int l=0;l<11;l++)
283     {
284     int nb_front=get_nb_front(front_courant[l]);
285     for (int i=0;i<nb_front;i++)
286     {
287     MG_FRONT_3D* ft=get_front(front_courant[l],i);
288     MG_NOEUD* mgnoeud1=ft->get_noeud1();
289     MG_NOEUD* mgnoeud2=ft->get_noeud2();
290     MG_NOEUD* mgnoeud3=ft->get_noeud3();
291     ft->changer_front_voisin(NULL,0);
292     ft->changer_front_voisin(NULL,1);
293     ft->changer_front_voisin(NULL,2);
294     for (int j=0;j<mgnoeud1->get_lien_triangle()->get_nb();j++)
295     for (int k=0;k<mgnoeud2->get_lien_triangle()->get_nb();k++)
296     {
297     M3D_TRIANGLE* tri1=(M3D_TRIANGLE*)mgnoeud1->get_lien_triangle()->get(j);
298     M3D_TRIANGLE* tri2=(M3D_TRIANGLE*)mgnoeud2->get_lien_triangle()->get(k);
299     if (tri1==tri2)
300     if (tri1->get_etat_front()==FRONT_ACTIF)
301     if (tri1->get_mgfront()!=ft)
302     {
303     MG_FRONT_3D* ft2=tri1->get_mgfront();
304     if (ft->get_front_voisin(0)==NULL)
305     {
306     ft->changer_front_voisin(ft2,0);
307     ft->changer_angle_voisin(angle_front(ft,ft2),0);
308     }
309     else
310     {
311     double angle=angle_front(ft,ft2);
312     if (angle<ft->get_angle_voisin(0))
313     {
314     ft->changer_front_voisin(ft2,0);
315     ft->changer_angle_voisin(angle,0);
316     }
317     }
318     }
319     }
320     for (int j=0;j<mgnoeud1->get_lien_triangle()->get_nb();j++)
321     for (int k=0;k<mgnoeud3->get_lien_triangle()->get_nb();k++)
322     {
323     M3D_TRIANGLE* tri1=(M3D_TRIANGLE*)mgnoeud1->get_lien_triangle()->get(j);
324     M3D_TRIANGLE* tri2=(M3D_TRIANGLE*)mgnoeud3->get_lien_triangle()->get(k);
325     if (tri1==tri2)
326     if (tri1->get_etat_front()==FRONT_ACTIF)
327     if (tri1->get_mgfront()!=ft)
328     {
329     MG_FRONT_3D* ft2=tri1->get_mgfront();
330     if (ft->get_front_voisin(1)==NULL)
331     {
332     ft->changer_front_voisin(ft2,1);
333     ft->changer_angle_voisin(angle_front(ft,ft2),1);
334     }
335     else
336     {
337     double angle=angle_front(ft,ft2);
338     if (angle<ft->get_angle_voisin(1))
339     {
340     ft->changer_front_voisin(ft2,1);
341     ft->changer_angle_voisin(angle,1);
342     }
343     }
344     }
345     }
346     for (int j=0;j<mgnoeud2->get_lien_triangle()->get_nb();j++)
347     for (int k=0;k<mgnoeud3->get_lien_triangle()->get_nb();k++)
348     {
349     M3D_TRIANGLE* tri1=(M3D_TRIANGLE*)mgnoeud2->get_lien_triangle()->get(j);
350     M3D_TRIANGLE* tri2=(M3D_TRIANGLE*)mgnoeud3->get_lien_triangle()->get(k);
351     if (tri1==tri2)
352     if (tri1->get_etat_front()==FRONT_ACTIF)
353     if (tri1->get_mgfront()!=ft)
354     {
355     MG_FRONT_3D* ft2=tri1->get_mgfront();
356     if (ft->get_front_voisin(2)==NULL)
357     {
358     ft->changer_front_voisin(ft2,2);
359     ft->changer_angle_voisin(angle_front(ft,ft2),2);
360     }
361     else
362     {
363     double angle=angle_front(ft,ft2);
364     if (angle<ft->get_angle_voisin(2))
365     {
366     ft->changer_front_voisin(ft2,2);
367     ft->changer_angle_voisin(angle,2);
368     }
369     }
370     }
371     }
372     if ( (ft->get_front_voisin(0)==NULL) || (ft->get_front_voisin(1)==NULL)|| (ft->get_front_voisin(2)==NULL))
373     refresh();
374     }
375    
376     }
377     clock_t cpu2=clock(); //debug
378     cpu[2]=cpu[2]+(cpu2-cpu1)/CLK_TCK; //debug
379     nbfois[2]++; //debug
380     }
381    
382    
383    
384     // FONCTIONS GERANT L ENTITE FRONT (ajout suppression et tout le bordel)
385     MG_FRONT_3D* MAILLEUR3D::ajouter_front_courant(int numero_front,MG_NOEUD* noeud1,MG_NOEUD* noeud2,MG_NOEUD* noeud3,MG_TRIANGLE* triangle)
386     {
387     int numfront;
388     if (numero_front==NONFORCE)
389     {
390     numfront=(int)(triangle->get_longueur()/distance_maximale*10.);
391     if (numfront>10) numfront=10;
392     }
393     else numfront=numero_front;
394     MG_FRONT_3D* mgfront;
395     if (numfront>11) mgfront=ajouter_front(front_attente,noeud1,noeud2,noeud3,triangle);
396     else mgfront=ajouter_front(front_courant[numfront],noeud1,noeud2,noeud3,triangle);
397     mgfront->changer_numero_front(numfront);
398     if (triangle->get_type_entite()==IDM3D_TRIANGLE)
399     {
400     M3D_TRIANGLE* mtri=(M3D_TRIANGLE*)triangle;
401     mtri->change_etat_front(FRONT_ACTIF);
402     mtri->change_mgfront(mgfront);
403     }
404     return mgfront;
405     }
406    
407     MG_FRONT_3D* MAILLEUR3D::ajouter_front(FRONT& front,MG_NOEUD* noeud1,MG_NOEUD* noeud2,MG_NOEUD* noeud3,MG_TRIANGLE* triangle)
408     {
409     MG_FRONT_3D* ft=new MG_FRONT_3D(noeud1,noeud2,noeud3,triangle);
410     ajouter_front(front,ft);
411     octree_de_front->inserer(ft);
412     return ft;
413     }
414    
415     void MAILLEUR3D::ajouter_front(FRONT& front,MG_FRONT_3D *ft)
416     {
417     std::pair<const double,MG_FRONT_3D*> tmp(ft->get_triangle()->get_longueur(),ft);
418     front.insert(tmp);
419     }
420    
421     MG_FRONT_3D* MAILLEUR3D::get_front(FRONT& front,unsigned int num)
422     {
423     FRONT::iterator i=front.begin();
424     for (unsigned long j=0;j<num;j++) i++;
425     return ((*i).second);
426     }
427    
428    
429     unsigned int MAILLEUR3D::get_nb_front(FRONT& front)
430     {
431     return front.size();
432     }
433    
434     unsigned int MAILLEUR3D::get_nb_front_courant(void)
435     {
436    
437     return front_courant[0].size()+front_courant[1].size()+front_courant[2].size()+front_courant[3].size()+front_courant[4].size()+front_courant[5].size()+front_courant[6].size()+front_courant[7].size()+front_courant[8].size()+front_courant[9].size()+front_courant[10].size();
438     }
439    
440     void MAILLEUR3D::supprimer_front_en_avancant(MG_FRONT_3D* ft)
441     {
442 francois 129 supprimer_front_en_avancant_sans_delete(ft);
443     delete ft;
444     }
445    
446     void MAILLEUR3D::supprimer_front_en_avancant_sans_delete(MG_FRONT_3D* ft)
447     {
448 5 octree_de_front->supprimer(ft);
449     int numfront=ft->get_numero_front();
450     FRONT* front_original;
451     if (numfront==ATTENTE)
452     front_original=&front_attente;
453     else
454     front_original=front_courant+numfront;
455     FRONT::iterator j=front_original->lower_bound(ft->get_triangle()->get_longueur());
456     while (ft!=(*j).second) j++;
457     front_original->erase(j);
458     MG_TRIANGLE* mgtri=ft->get_triangle();
459     if (mgtri->get_type_entite()==IDM3D_TRIANGLE)
460     {
461     M3D_TRIANGLE* m3dtri=(M3D_TRIANGLE*)mgtri;
462     m3dtri->change_etat_front(FRONT_PASSE);
463     m3dtri->change_mgfront(NULL);
464     }
465     }
466    
467     void MAILLEUR3D::supprimer_front_en_reculant(MG_FRONT_3D* ft)
468     {
469     octree_de_front->supprimer(ft);
470     int numfront=ft->get_numero_front();
471     FRONT* front_original;
472     if (numfront==ATTENTE)
473     front_original=&front_attente;
474     else
475     front_original=front_courant+numfront;
476     FRONT::iterator j=front_original->lower_bound(ft->get_triangle()->get_longueur());
477     while (ft!=(*j).second) j++;
478     front_original->erase(j);
479     MG_TRIANGLE* mgtri=ft->get_triangle();
480     if (mgtri->get_type_entite()==IDM3D_TRIANGLE)
481     {
482     M3D_TRIANGLE* m3dtri=(M3D_TRIANGLE*)mgtri;
483     m3dtri->change_etat_front(FRONT_NONACTIF);
484     m3dtri->change_mgfront(NULL);
485     }
486     delete ft;
487     }
488    
489     void MAILLEUR3D::echange_de_front(FRONT& front_original,FRONT& front_destination,MG_FRONT_3D* ft)
490     {
491     FRONT::iterator j=front_original.lower_bound(ft->get_triangle()->get_longueur());
492     while (ft!=(*j).second) j++;
493     front_original.erase(j);
494     ajouter_front(front_destination,ft);
495     }
496    
497     void MAILLEUR3D::echange_de_front(MG_FRONT_3D* ft,int num)
498     {
499     int numfront;
500     if (num==NONFORCE)
501     {
502     numfront=(int)(ft->get_triangle()->get_longueur()/distance_maximale*10.);
503     if (numfront>10) numfront=10;
504     }
505     else if (num==ATTENTE) numfront=ATTENTE;
506     else numfront=num;
507     if (numfront>10) numfront=ATTENTE;
508     FRONT* front_original;
509     int num_front_original=ft->get_numero_front();
510     if (num_front_original==ATTENTE)
511     front_original=&front_attente;
512     else
513     front_original=front_courant+num_front_original;
514     FRONT* front_destination;
515     if (numfront==ATTENTE)
516     front_destination=&front_attente;
517     else
518     front_destination=front_courant+numfront;
519    
520    
521    
522     FRONT::iterator j=front_original->lower_bound(ft->get_triangle()->get_longueur());
523     while (ft!=(*j).second) j++;
524     front_original->erase(j);
525     ft->changer_numero_front(numfront);
526     ajouter_front(*front_destination,ft);
527    
528     }
529    
530    
531     void MAILLEUR3D::swap_front(FRONT& front_original,FRONT& front_destination)
532     {
533     front_original.swap(front_destination);
534     }
535    
536    
537    
538     int MAILLEUR3D::premier_front_courant(void)
539     {
540     int num=-1;
541     if (front_courant[0].size()>0) num=0;
542     else if (front_courant[1].size()>0) num=1;
543     else if (front_courant[2].size()>0) num=2;
544     else if (front_courant[3].size()>0) num=3;
545     else if (front_courant[4].size()>0) num=4;
546     else if (front_courant[5].size()>0) num=5;
547     else if (front_courant[6].size()>0) num=6;
548     else if (front_courant[7].size()>0) num=7;
549     else if (front_courant[8].size()>0) num=8;
550     else if (front_courant[9].size()>0) num=9;
551     else if (front_courant[10].size()>0) num=10;
552     return num;
553     }
554    
555    
556    
557     void MAILLEUR3D::active_log(char* nomfile)
558     {
559     activelog=1;
560     nomlog=nomfile;
561     }
562    
563     void MAILLEUR3D::desactive_log(void)
564     {
565     activelog=0;
566     }
567    
568 francois 35
569 francois 54