ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/geometrie/src/mg_arete.cpp
Revision: 879
Committed: Fri Mar 31 20:53:22 2017 UTC (8 years, 1 month ago) by francois
File size: 17447 byte(s)
Log Message:
mailleur d'une coquille mince. Des exe arriveront plus tard

File Contents

# User Rev Content
1 francois 283 //------------------------------------------------------------
2     //------------------------------------------------------------
3     // MAGiC
4     // Jean Christophe Cuilli�re et Vincent FRANCOIS
5     // D�partement de G�nie M�canique - UQTR
6     //------------------------------------------------------------
7     // Le projet MAGIC est un projet de recherche du d�partement
8     // de g�nie m�canique de l'Universit� du Qu�bec �
9     // Trois Rivi�res
10     // Les librairies ne peuvent �tre utilis�es sans l'accord
11     // des auteurs (contact : francois@uqtr.ca)
12     //------------------------------------------------------------
13     //------------------------------------------------------------
14     //
15     // mg_arete.cpp
16     //
17     //------------------------------------------------------------
18     //------------------------------------------------------------
19     // COPYRIGHT 2000
20     // Version du 02/03/2006 � 11H22
21     //------------------------------------------------------------
22     //------------------------------------------------------------
23    
24    
25     #include "gestionversion.h"
26     #include "mg_arete.h"
27     #include "vct_arete.h"
28     //#include "message.h"
29     //#include "affiche.h"
30 francois 375 #include "mg_definition.h"
31 francois 283 #include <math.h>
32     #include "ot_mathematique.h"
33     #include "constantegeo.h"
34 francois 604 #include "fem_solution.h"
35     #include "fem_maillage.h"
36 francois 283 #define PI 3.1415926535897932384626433832795
37    
38     MG_ARETE::MG_ARETE(std::string idori,unsigned long num,MG_COSOMMET* mgcosom1,MG_COSOMMET* mgcosom2,MG_COURBE* crb,int sens):MG_ELEMENT_TOPOLOGIQUE(num,idori),cosommet1(mgcosom1),cosommet2(mgcosom2),courbe(crb),orientation(sens),vect(NULL)
39     {
40     }
41    
42     MG_ARETE::MG_ARETE(std::string idori,MG_COSOMMET* mgcosom1,MG_COSOMMET* mgcosom2,MG_COURBE* crb,int sens):MG_ELEMENT_TOPOLOGIQUE(idori),cosommet1(mgcosom1),cosommet2(mgcosom2),courbe(crb),orientation(sens),vect(NULL)
43     {
44     }
45    
46     MG_ARETE::MG_ARETE(MG_ARETE& mdd):MG_ELEMENT_TOPOLOGIQUE(mdd),cosommet1(mdd.cosommet1),cosommet2(mdd.cosommet2),courbe(mdd.courbe),orientation(mdd.orientation),vect(NULL)
47     {
48     }
49    
50     MG_ARETE::MG_ARETE(std::string idori,unsigned long num,class MG_COURBE* crb,int sens):MG_ELEMENT_TOPOLOGIQUE(num,idori),courbe(crb),orientation(sens),vect(NULL)
51     {
52     }
53     MG_ARETE::MG_ARETE(std::string idori,class MG_COURBE* crb,int sens):MG_ELEMENT_TOPOLOGIQUE(idori),courbe(crb),orientation(sens),vect(NULL)
54     {
55     }
56     void MG_ARETE::get_topologie_sousjacente(TPL_MAP_ENTITE<MG_ELEMENT_TOPOLOGIQUE*> *lst)
57     {
58     MG_SOMMET* som1=cosommet1->get_sommet();
59     MG_SOMMET* som2=cosommet2->get_sommet();
60     lst->ajouter(som1);
61     lst->ajouter(som2);
62     som1->get_topologie_sousjacente(lst);
63     som2->get_topologie_sousjacente(lst);
64     }
65    
66     MG_ARETE::~MG_ARETE()
67     {
68     // if (lst_coarete.size()!=0) afficheur << WARCOARETE << this->get_id()<< enderr;
69     if (vect!=NULL) delete vect;
70     }
71    
72     void MG_ARETE::changer_cosommet1(class MG_COSOMMET* cosom)
73     {
74     cosommet1=cosom;
75     }
76     void MG_ARETE::changer_cosommet2(class MG_COSOMMET* cosom)
77     {
78     cosommet2=cosom;
79     }
80     MG_COSOMMET* MG_ARETE::get_cosommet1(void)
81     {
82     return cosommet1;
83     }
84     MG_COSOMMET* MG_ARETE::get_cosommet2(void)
85     {
86     return cosommet2;
87     }
88     MG_COURBE* MG_ARETE::get_courbe(void)
89     {
90     return courbe;
91     }
92     int MG_ARETE::get_orientation(void)
93     {
94     return orientation;
95     }
96    
97    
98    
99    
100     void MG_ARETE::ajouter_mg_coarete(class MG_COARETE* coarete)
101     {
102     lst_coarete.insert(lst_coarete.end(),coarete);
103     }
104    
105     int MG_ARETE::get_nb_mg_coarete(void)
106     {
107     return lst_coarete.size();
108     }
109    
110 francois 576 bool MG_ARETE::est_une_arete_element(void)
111     {
112     return false;
113     }
114 francois 283
115     void MG_ARETE::evaluer(double t,double *xyz)
116     {
117     if (orientation!=MEME_SENS) t=courbe->get_tmin()+courbe->get_tmax()-t;
118     courbe->evaluer(t,xyz);
119     }
120    
121     void MG_ARETE::deriver(double t,double *xyz)
122     {
123     if (orientation!=MEME_SENS) t=courbe->get_tmin()+courbe->get_tmax()-t;
124     courbe->deriver(t,xyz);
125     if (orientation!=MEME_SENS)
126     {
127     xyz[0]=-xyz[0];
128     xyz[1]=-xyz[1];
129     xyz[2]=-xyz[2];
130     }
131     }
132    
133     void MG_ARETE::deriver_seconde(double t,double *ddxyz,double* dxyz,double* xyz)
134     {
135     if (orientation!=MEME_SENS) t=courbe->get_tmin()+courbe->get_tmax()-t;
136     courbe->deriver_seconde(t,ddxyz,dxyz,xyz);
137     if (orientation!=MEME_SENS)
138     {
139     dxyz[0]=-dxyz[0];
140     dxyz[1]=-dxyz[1];
141     dxyz[2]=-dxyz[2];
142     }
143     }
144    
145     void MG_ARETE::inverser(double& t,double *xyz,double precision)
146     {
147     courbe->inverser(t,xyz,precision);
148     if (orientation!=MEME_SENS) t=courbe->get_tmin()+courbe->get_tmax()-t;
149     }
150    
151     double MG_ARETE::get_tmin(void)
152     {
153     return cosommet1->get_t();
154     }
155    
156     double MG_ARETE::get_tmax(void)
157     {
158     if (!courbe->est_periodique()) return cosommet2->get_t();
159     double tmin=cosommet1->get_t();
160     double tmax=cosommet2->get_t();
161     if (tmax<tmin+1e-6) tmax=tmax+courbe->get_periode();
162     return tmax;
163     }
164    
165     double MG_ARETE::get_longueur(double t1,double t2,double precis)
166     {
167     if (orientation!=MEME_SENS)
168     {
169     t1=courbe->get_tmin()+courbe->get_tmax()-t1;
170     t2=courbe->get_tmin()+courbe->get_tmax()-t2;
171     return (-courbe->get_longueur(t1,t2,precis));
172     }
173     return courbe->get_longueur(t1,t2,precis);
174    
175     }
176    
177     double MG_ARETE::get_M(double t)
178     {
179     if (orientation!=MEME_SENS) t=courbe->get_tmin()+courbe->get_tmax()-t;
180     return courbe->get_M(t);
181     }
182    
183    
184    
185     void MG_ARETE::supprimer_mg_coarete(class MG_COARETE* coarete)
186     {
187     std::vector<MG_COARETE*>::iterator i;
188     for (i=lst_coarete.begin();i!=lst_coarete.end();i++)
189     {
190     if ((*i)==coarete)
191     {
192     lst_coarete.erase(i);
193     return;
194     }
195     }
196     }
197    
198    
199    
200     MG_COARETE* MG_ARETE::get_mg_coarete(int num)
201     {
202     return lst_coarete[num];
203     }
204    
205    
206     int MG_ARETE::get_dimension(void)
207     {
208     return 1;
209     }
210    
211    
212     VCT& MG_ARETE::get_vectorisation(void)
213     {
214     if (vect==NULL) vect=new VCT_ARETE(this);
215     return *vect;
216     }
217    
218 francois 763 void MG_ARETE::enregistrer(std::ostream& o,double version)
219 francois 283 {
220     int nb=get_nb_ccf();
221 francois 763 o << "%" << get_id() << "=ARETE("<< get_idoriginal() << ",$" << courbe->get_id() << ",$"<<cosommet1->get_id() << ",$" <<cosommet2->get_id() << "," << orientation << "," ;
222     if (version<2)
223     {
224     o<< nb;
225 francois 283 if (nb!=0)
226     {
227     o << ",(";
228     for (int i=0;i<nb;i++)
229     {
230     char nom[3];
231     get_type_ccf(i,nom);
232     o << "(" << nom << "," << get_valeur_ccf(i) << ")";
233     if (i!=nb-1) o << "," ;
234     }
235     o << ")";
236     }
237 francois 763 }
238     else enregistrer_ccf(o,version);
239 francois 283 o << ");" << std::endl;
240     }
241    
242    
243     void MG_ARETE::get_intersection(double t1, double t2,double* point_iners)
244     {
245     OT_VECTEUR_3D P1_INTERSECTION;
246    
247     double U,W;
248    
249     double xyz2[3];
250     double xyz1[3];
251     double drv1[3];
252     double drv2[3];
253    
254     evaluer(t1,xyz1);
255     deriver(t1,drv1);
256    
257     evaluer(t2,xyz2);
258     deriver(t2,drv2);
259    
260     OT_VECTEUR_3D a(xyz1) ;
261     OT_VECTEUR_3D b(drv1) ;
262     OT_VECTEUR_3D c(xyz2) ;
263     OT_VECTEUR_3D d(drv2) ;
264     OT_VECTEUR_3D f=c-a;
265     d=-d;
266     double det1=b[0]*d[1]-b[1]*d[0];
267     double det2=b[0]*d[2]-b[2]*d[0];
268     double det3=b[1]*d[2]-b[2]*d[1];
269    
270     bool c_fait=false;
271    
272     if (fabs(det1)>=1e-10)
273     {
274     double u,w;
275     u=(d[1]*f[0]-d[0]*f[1])/det1;
276     w=(b[0]*f[1]-b[1]*f[0])/det1;
277     double verif_x=a[2] +u*b[2];
278     double verif_y=c[2]-w*d[2];
279     if (fabs(verif_x-verif_y)<0.000001)
280     {
281     U=u ;
282     W=w ;
283     c_fait=true;
284     }
285    
286     }
287    
288     if (!c_fait&&fabs(det2)>=1e-10)
289     {
290     double u,w;
291     u=(d[2]*f[0]-d[0]*f[2])/det2;
292     w=(b[0]*f[2]-b[2]*f[0])/det2;
293     double verif_x=a[1]+u*b[1];
294     double verif_y=c[1]-w*d[1];
295     if (fabs(verif_x-verif_y)<0.000001)
296     {
297     U=u ;
298     W=w ;
299     c_fait=true;
300     }
301     }
302    
303     if (!c_fait&&fabs(det3)>=1e-10)
304     {
305     double u,w;
306     u=(d[2]*f[1]-d[1]*f[2])/det3;
307     w=(b[1]*f[2]-b[2]*f[1])/det3;
308     double verif_x=a[0] +u*b[0];
309     double verif_y=c[0]-w*d[0];
310     if (fabs(verif_x-verif_y)<0.000001)
311     {
312     U=u ;
313     W=w ;
314     c_fait=true;
315     }
316     }
317    
318     P1_INTERSECTION=a+U*b;
319    
320     point_iners[0]=P1_INTERSECTION[0];
321     point_iners[1]=P1_INTERSECTION[1];
322     point_iners[2]=P1_INTERSECTION[2];
323    
324     }
325    
326    
327    
328     void MG_ARETE:: get_param_NURBS(int& indx_premier_ptctr,TPL_LISTE_ENTITE<double> &param)
329     {
330    
331     TPL_LISTE_ENTITE<double> param1;
332     int type=courbe->get_type_geometrique(param1);
333    
334     double tcs1=get_tmin();
335     double tcs2=get_tmax();
336     double angle=tcs1-tcs2;
337    
338     if ((type==MGCo_CIRCLE||type==MGCo_ELLIPSE)&&(tcs1!=tcs2)&&fabs(angle)!=2*PI)
339     {
340    
341     double xyz[3];
342     param.ajouter(1);
343     param.ajouter(4);
344     param.ajouter(0);
345     param.ajouter(7);
346     param.ajouter(0);
347    
348     double arc_lengh= get_longueur(tcs1,tcs2);
349     double rayon=arc_lengh/fabs(angle);
350    
351     double dif=fabs(fabs(angle)-PI);
352     if (fabs(fabs(angle)-PI)<=1e-6||fabs(angle)-PI<0.) //ouverture inf ou egale a PI
353     {
354    
355    
356     double request_lengh=arc_lengh/2;
357    
358     param.ajouter(0);
359     param.ajouter(0);
360     param.ajouter(0);
361     param.ajouter(0.5);
362     param.ajouter(0.5);
363     param.ajouter(1);
364     param.ajouter(1);
365     param.ajouter(1);
366    
367    
368     double xyz1[3];
369     double xyz1_inters[3];
370     double xyz2_inters[3];
371     double xyz2[3];
372     double xyz3[3];
373     double t_mid=get_t(tcs1,tcs2,request_lengh);
374    
375     evaluer(tcs1,xyz1);
376    
377     param.ajouter(xyz1[0]);
378     param.ajouter(xyz1[1]);
379     param.ajouter(xyz1[2]);
380     param.ajouter(1);
381    
382     get_intersection(tcs1, t_mid,xyz1_inters);
383    
384     param.ajouter(xyz1_inters[0]);
385     param.ajouter(xyz1_inters[1]);
386     param.ajouter(xyz1_inters[2]);
387     param.ajouter(0.5);
388    
389     get_intersection(t_mid, tcs2,xyz2_inters);
390    
391     param.ajouter(xyz2_inters[0]);
392     param.ajouter(xyz2_inters[1]);
393     param.ajouter(xyz2_inters[2]);
394     param.ajouter(0.5);
395    
396     evaluer(tcs2,xyz3);
397    
398     param.ajouter(xyz3[0]);
399     param.ajouter(xyz3[1]);
400     param.ajouter(xyz3[2]);
401     param.ajouter(1);
402    
403     indx_premier_ptctr=13;
404    
405     }
406    
407     if (fabs(fabs(angle)-PI)>1e-6&&fabs(angle)-PI>0.)
408     {
409    
410     double xyz[3];
411    
412 francois 290 double lengh_at_mid=arc_lengh;
413     double request_lengh=lengh_at_mid/2.;
414     double tmid=get_t(tcs1,tcs2,request_lengh);
415     double tmid1=get_t(tcs1,tmid,request_lengh/2.);
416     double tmid2=get_t(tmid,tcs2,request_lengh/2.);
417 francois 283
418     param.ajouter(0);
419     param.ajouter(0);
420     param.ajouter(0);
421     param.ajouter(0.25);
422     param.ajouter(0.25);
423     param.ajouter(0.5);
424     param.ajouter(0.5);
425     param.ajouter(0.75);
426     param.ajouter(0.75);
427     param.ajouter(1);
428     param.ajouter(1);
429     param.ajouter(1);
430    
431    
432    
433     evaluer(tcs1,xyz);
434    
435     param.ajouter(xyz[0]);
436     param.ajouter(xyz[1]);
437     param.ajouter(xyz[2]);
438     param.ajouter(1);
439    
440 francois 290
441     get_intersection(tcs1,tmid1,xyz);
442 francois 283
443     param.ajouter(xyz[0]);
444     param.ajouter(xyz[1]);
445     param.ajouter(xyz[2]);
446     param.ajouter(0.5);
447    
448 francois 290 get_intersection(tmid1, tmid,xyz);
449 francois 283
450     param.ajouter(xyz[0]);
451     param.ajouter(xyz[1]);
452     param.ajouter(xyz[2]);
453     param.ajouter(0.5);
454    
455 francois 290 evaluer(tmid,xyz);
456 francois 283
457     param.ajouter(xyz[0]);
458     param.ajouter(xyz[1]);
459     param.ajouter(xyz[2]);
460     param.ajouter(1);
461    
462 francois 290
463     get_intersection(tmid,tmid2,xyz);
464 francois 283
465     param.ajouter(xyz[0]);
466     param.ajouter(xyz[1]);
467     param.ajouter(xyz[2]);
468     param.ajouter(0.5);
469    
470    
471 francois 290 get_intersection(tmid2,tcs2,xyz);
472 francois 283
473     param.ajouter(xyz[0]);
474     param.ajouter(xyz[1]);
475     param.ajouter(xyz[2]);
476     param.ajouter(0.5);
477    
478     evaluer(tcs2,xyz);
479    
480     param.ajouter(xyz[0]);
481     param.ajouter(xyz[1]);
482     param.ajouter(xyz[2]);
483     param.ajouter(1);
484    
485     indx_premier_ptctr=17;
486     }
487    
488     }
489    
490    
491     if ((type==MGCo_ELLIPSE||type==MGCo_CIRCLE)&&OPERATEUR::egal(fabs(angle),2*PI,0.000001))
492     courbe->get_param_NURBS(indx_premier_ptctr,param);
493    
494     if (type==MGCo_BSPLINE)
495     courbe->get_param_NURBS(indx_premier_ptctr,param);
496    
497     if (type==MGCo_LINE)
498     {
499    
500     param.ajouter(1);
501     param.ajouter(2);
502     param.ajouter(0);
503     param.ajouter(2);
504     param.ajouter(0);
505    
506    
507     param.ajouter(0);
508     param.ajouter(0);
509     param.ajouter(1);
510     param.ajouter(1);
511    
512     double xyz1[3];
513     double xyz2[3];
514    
515     double tcs1=get_tmin();
516     double tcs2=get_tmax();
517    
518     evaluer(tcs1,xyz1);
519    
520     param.ajouter(xyz1[0]);
521     param.ajouter(xyz1[1]);
522     param.ajouter(xyz1[2]);
523     param.ajouter(1);
524    
525     evaluer(tcs2,xyz2);
526    
527     param.ajouter(xyz2[0]);
528     param.ajouter(xyz2[1]);
529     param.ajouter(xyz2[2]);
530     param.ajouter(1);
531    
532     indx_premier_ptctr=9;
533     }
534    
535     }
536    
537     struct integrale {
538     double ti;
539     double li;
540     };
541    
542     double MG_ARETE:: get_t(double t1,double t2,double longueur_voulue,double dt)
543     {
544     double pt[3];
545     double t,ti,tii;
546    
547     //double longueur_voulue,longueur=0;
548     double longueur=0;
549     std::vector<integrale> tab_integrale;
550     //longueur_voulue= alpha *get_longueur(t1,t2);
551    
552     integrale pas;
553     ti=t1;
554     do
555     {
556     tii=ti+(t2-t1)*dt;
557    
558     t=0.7886751345*ti+0.2113248654*tii;
559     deriver(t,pt);
560    
561     double facteur=pow(pt[0],2)+pow(pt[1],2)+pow(pt[2],2);
562     longueur=longueur+0.5*(tii-ti)*sqrt(facteur);
563     t=0.7886751345*tii+0.2113248654*ti;
564     deriver(t,pt);
565     facteur=pow(pt[0],2)+pow(pt[1],2)+pow(pt[2],2);
566     longueur=longueur+0.5*(tii-ti)*sqrt(facteur);
567     integrale pas;
568     pas.ti=ti;
569     pas.li=longueur;
570     tab_integrale.insert(tab_integrale.end(),pas);
571     ti=tii;
572     }
573     while (fabs(tab_integrale.back().li)<fabs(longueur_voulue));
574    
575     //double t_trouve=0.7886751345*tab_integrale.back().ti+0.2113248654*tab_integrale.back().ti+(t2-t1)*dt;
576     double tn_1=tab_integrale.back().ti;
577     double ln_1=tab_integrale[tab_integrale.size()-2].li;
578     double tn=ti;
579     double ln=tab_integrale.back().li;
580    
581    
582     double t_trouve=tn_1+(tn-tn_1)/(ln-ln_1)*(longueur_voulue-ln_1);
583     return t_trouve ;
584     }
585    
586 francois 604 void MG_ARETE::recupere_resultat(class FEM_SOLUTION* sol,int numchamps,char* fichier)
587     {
588     FEM_MAILLAGE *mai=sol->get_maillage();
589     MG_SOMMET* som1=cosommet1->get_sommet();
590     MG_SOMMET* som2=cosommet2->get_sommet();
591     sol->active_solution(numchamps);
592    
593     FEM_NOEUD* noeudcourant=NULL;
594     for (int i=0;i<som1->get_lien_fem_maillage()->get_nb();i++)
595     {
596     FEM_NOEUD* no=(FEM_NOEUD*)som1->get_lien_fem_maillage()->get(i);
597     if (mai->get_fem_noeudid(no->get_id())==no) noeudcourant=no;
598     }
599     FEM_NOEUD* noeudfin=NULL;
600     for (int i=0;i<som2->get_lien_fem_maillage()->get_nb();i++)
601     {
602     FEM_NOEUD* no=(FEM_NOEUD*)som2->get_lien_fem_maillage()->get(i);
603     if (mai->get_fem_noeudid(no->get_id())==no) noeudfin=no;
604     }
605     int n1=0;
606     int n2;
607     if (mai->get_degre()==1) n2=1;
608     if (mai->get_degre()==2) n2=2;
609     double *xyz=noeudcourant->get_coord();
610     double t;
611     inverser(t,xyz);
612     std::vector<double> resultat;
613     double tprec=t;
614     resultat.push_back(t);
615     resultat.push_back(0.);
616     resultat.push_back(noeudcourant->get_solution());
617     while (noeudcourant!=noeudfin)
618     {
619     FEM_ELEMENT1 *segcourant=NULL;
620     for (int i=0;i<get_lien_fem_maillage()->get_nb();i++)
621     {
622     FEM_ELEMENT1* seg=(FEM_ELEMENT1*)get_lien_fem_maillage()->get(i);
623     if (mai->get_fem_element1id(seg->get_id())==seg)
624     {
625     if ((seg->get_fem_noeud(n1)==noeudcourant)||(seg->get_fem_noeud(n2)==noeudcourant))
626     if (seg!=segcourant)
627     segcourant=seg;
628     }
629     }
630     FEM_NOEUD* autrenoeud=NULL;
631     if (segcourant->get_fem_noeud(n1)==noeudcourant) autrenoeud=segcourant->get_fem_noeud(n2);
632     if (segcourant->get_fem_noeud(n2)==noeudcourant) autrenoeud=segcourant->get_fem_noeud(n1);
633     FEM_NOEUD *noprec=noeudcourant;
634     for (int i=1;i<segcourant->get_nb_fem_noeud();i++)
635     {
636     FEM_NOEUD* no=segcourant->get_fem_noeud(i);
637     double *xyz=no->get_coord();
638     double t2;
639     inverser(t2,xyz);
640 francois 672 if (get_courbe()->est_periodique())
641     if (t2<tprec) t2=t2+get_courbe()->get_periode();
642 francois 604 double s=resultat[resultat.size()-2];
643     int pas=32;
644     for (int j=0;j<pas;j++)
645     {
646     double ti=tprec+1.0*j*(t2-tprec)/pas;
647     double tii=tprec+1.0*(j+1)*(t2-tprec)/pas;
648     double tgauss1=0.7886751345*tii+0.2113248654*ti;
649     double dxyz[3];
650     deriver(tgauss1,dxyz);
651     s=s+0.5*(tii-ti)*sqrt(dxyz[0]*dxyz[0]+dxyz[1]*dxyz[1]+dxyz[2]*dxyz[2]);
652     double tgauss2=0.7886751345*ti+0.2113248654*tii;
653     deriver(tgauss2,dxyz);
654     s=s+0.5*(tii-ti)*sqrt(dxyz[0]*dxyz[0]+dxyz[1]*dxyz[1]+dxyz[2]*dxyz[2]);
655     }
656     resultat.push_back(t2);
657     resultat.push_back(s);
658     resultat.push_back(no->get_solution());
659     noprec=no;
660     tprec=t2;
661     }
662     noeudcourant=autrenoeud;
663     }
664     FILE *in=fopen(fichier,"wt");
665     char mess[500];
666     sprintf(mess,"%s_%s",(char*)sol->get_nom().c_str(),(char*)sol->get_legende(numchamps).c_str());
667     fprintf(in,"t;s;%s;\n",mess);
668     for (int i=0;i<resultat.size();i=i+3)
669     fprintf(in,"%lf;%lf;%lf;\n",resultat[i],resultat[i+1],resultat[i+2]);
670     fclose(in);
671     }