48 for (
int i=0;i<
tab.size();i++)
50 bool essaivalide=
false;
51 if (verif==
false) essaivalide=
true;
53 if ((essaivalide==
true) && (nbessai==0))
62 if (essaivalide==
true)
106 for (
int i=0;i<3;i++)
107 for (
int j=0;j<3;j++)
112 for (
int i=0;i<nbph;i++)
137 for (
int j=0;j<nbph;j++)
144 for (
int ii=0;ii<3;ii++)
145 for (
int jj=0;jj<3;jj++)
161 for (
int j=0;j<nbph;j++)
167 for (
int ii=0;ii<3;ii++)
168 for (
int jj=0;jj<3;jj++)
187 for (
int j=0;j<nbph;j++)
195 for (
int ii=0;ii<3;ii++)
196 for (
int jj=0;jj<3;jj++)
216 for (
int j=0;j<nbph;j++)
224 for (
int ii=0;ii<3;ii++)
225 for (
int jj=0;jj<3;jj++)
235 strcpy(nom,nomcumul.c_str());
246 strcpy(nom,nomcumul.c_str());
249 FILE* in=fopen(nom,
"rt");
252 while (feof(in)==
false)
255 if (feof(in)==
true)
continue;
258 std::vector<double> valeurs;
262 sscanf(p,
"%lf;" ,&val);
263 valeurs.push_back(val);
270 res.nbcristaux=(int)(valeurs[0]);
271 res.degre=(int)(valeurs[1]);
279 res.tens1(0,0)=valeurs[9];
280 res.tens1(1,0)=valeurs[10];
281 res.tens1(2,0)=valeurs[11];
282 res.tens1(0,1)=valeurs[12];
283 res.tens1(1,1)=valeurs[13];
284 res.tens1(2,1)=valeurs[14];
285 res.tens1(0,2)=valeurs[15];
286 res.tens1(1,2)=valeurs[16];
287 res.tens1(2,2)=valeurs[17];
288 res.tens2(0,0)=valeurs[18];
289 res.tens2(1,0)=valeurs[19];
290 res.tens2(2,0)=valeurs[20];
291 res.tens2(0,1)=valeurs[21];
292 res.tens2(1,1)=valeurs[22];
293 res.tens2(2,1)=valeurs[23];
294 res.tens2(0,2)=valeurs[24];
295 res.tens2(1,2)=valeurs[25];
296 res.tens2(2,2)=valeurs[26];
297 res.tens3(0,0)=valeurs[27];
298 res.tens3(1,0)=valeurs[28];
299 res.tens3(2,0)=valeurs[29];
300 res.tens3(0,1)=valeurs[30];
301 res.tens3(1,1)=valeurs[31];
302 res.tens3(2,1)=valeurs[32];
303 res.tens3(0,2)=valeurs[33];
304 res.tens3(1,2)=valeurs[34];
305 res.tens3(2,2)=valeurs[35];
306 res.nbphase=(int)(valeurs[36]);
307 for (
int i=0;i<
res.nbphase;i++)
309 res.cristauxphase.push_back((
int)valeurs[37+i*6]);
310 res.volumephase.push_back(valeurs[38+i*6]);
311 res.massephase.push_back(valeurs[39+i*6]);
312 OT_VECTEUR_3D cdm(valeurs[40+i*6],valeurs[41+i*6],valeurs[42+i*6]);
313 res.cdmphase.push_back(cdm);
315 res.volume=valeurs[42+(
res.nbphase-1)*6+1];
316 res.masse=valeurs[42+(
res.nbphase-1)*6+2];
317 OT_VECTEUR_3D cdm(valeurs[42+(
res.nbphase-1)*6+3],valeurs[42+(
res.nbphase-1)*6+4],valeurs[42+(
res.nbphase-1)*6+5]);
319 res.Kvoigt=valeurs[42+(
res.nbphase-1)*6+6];
320 res.Gvoigt=valeurs[42+(
res.nbphase-1)*6+7];
321 res.Evoigt=valeurs[42+(
res.nbphase-1)*6+8];
322 res.nuvoigt=valeurs[42+(
res.nbphase-1)*6+9];
323 res.Kreuss=valeurs[42+(
res.nbphase-1)*6+10];
324 res.Greuss=valeurs[42+(
res.nbphase-1)*6+11];
325 res.Ereuss=valeurs[42+(
res.nbphase-1)*6+12];
326 res.nureuss=valeurs[42+(
res.nbphase-1)*6+13];
337 sprintf(nomout,
"%s%d.txt",nom,nbessai+1);
338 FILE* out=fopen(nomout,
"wt");
339 fprintf(out,
"----------------------------------------------------------\n");
340 fprintf(out,
"nb cristaux = %d\n",
tab[
listeessai[nbessai][0]].nbcristaux);
341 fprintf(out,
"nb phases = %d\n",
tab[
listeessai[nbessai][0]].nbphase);
342 fprintf(out,
"degre = %d\n",
tab[
listeessai[nbessai][0]].degre);
349 fprintf(out,
"masse phase %d = %lf +- %lf \n",i+1,
masseph[i].moyenne,
masseph[i].ecart);
350 fprintf(out,
"volume phase %d = %lf +- %lf \n",i+1,
volumeph[i].moyenne,
volumeph[i].ecart);
351 fprintf(out,
"CDM phase %d : x=%lf +- %lf ,y=%lf +- %lf ,z=%lf +- %lf \n",i+1,
cdmphase[i].get_x(),
cdmephase[i].get_x(),
cdmphase[i].get_y(),
cdmephase[i].get_y(),
cdmphase[i].get_z(),
cdmephase[i].get_z());
353 fprintf(out,
"----------------------------------------------------------\n");
360 fprintf(out,
"----------------------------------------------------------\n");
361 fprintf(out,
"tenseur orientation axe 1\n");
362 for (
int ii=0;ii<3;ii++)
364 for (
int jj=0;jj<3;jj++)
365 fprintf(out,
"%lf +- %lf ",
tens1m(ii,jj).get_x(),
tens1e(ii,jj).get_x());
368 fprintf(out,
"----------------------------------------------------------\n");
369 fprintf(out,
"tenseur orientation axe 2\n");
370 for (
int ii=0;ii<3;ii++)
372 for (
int jj=0;jj<3;jj++)
373 fprintf(out,
"%lf +- %lf ",
tens2m(ii,jj).get_x(),
tens2e(ii,jj).get_x());
376 fprintf(out,
"----------------------------------------------------------\n");
377 fprintf(out,
"tenseur orientation axe 3\n");
378 for (
int ii=0;ii<3;ii++)
380 for (
int jj=0;jj<3;jj++)
381 fprintf(out,
"%lf +- %lf ",
tens3m(ii,jj).get_x(),
tens3e(ii,jj).get_x());
384 fprintf(out,
"----------------------------------------------------------\n");
395 fprintf(out,
";;;;;;;;;%d;%lf;%lf;%lf;%lf;%lf;%lf;;%lf;%lf;;",i+1,
tab[n].
KDH,
tab[n].
GDH,
tab[n].
EDH,
tab[n].
KCH,
tab[n].
GCH,
tab[n].
ECH,
cumEDH[i],
cumECH[i]);
403 for (
int ii=0;ii<3;ii++)
404 for (
int jj=0;jj<3;jj++)
406 ecartiso1=ecartiso1+(
tab[n].tens1(ii,jj).get_x()-t(ii,jj).get_x())*(
tab[n].tens1(ii,jj).get_x()-t(ii,jj).get_x());
407 ecartiso2=ecartiso2+(
tab[n].tens2(ii,jj).get_x()-t(ii,jj).get_x())*(
tab[n].tens2(ii,jj).get_x()-t(ii,jj).get_x());
408 ecartiso3=ecartiso3+(
tab[n].tens3(ii,jj).get_x()-t(ii,jj).get_x())*(
tab[n].tens3(ii,jj).get_x()-t(ii,jj).get_x());
410 double ecartiso=1.-(
sqrt(ecartiso1)+
sqrt(ecartiso2)+
sqrt(ecartiso3))/27.;
412 fprintf(out,
"%lf;%lf;;",ecartiso,
cumiso[i]/((
double)i+1));
416 fprintf(out,
";;%lf;%lf;%lf;%lf;%lf;%lf",
tab[n].Evoigt,
tab[n].Ereuss,
tab[n].Kvoigt,
tab[n].Kreuss,
tab[n].Gvoigt,
tab[n].Greuss);
435 char typecalcul[500];
436 if (degre==1) strcpy(typecalcul,
"Linéaire");
437 if (degre==2) strcpy(typecalcul,
"Quadratique");
438 double xcible=0.5*(xmin+xmax);
439 double ycible=0.5*(ymin+ymax);
440 double zcible=0.5*(zmin+zmax);
444 char nomoutsvg[5000];
446 sprintf(nomdata,
"%s%d.txt",nom,nbessai+1);
447 sprintf(nomout,
"%s%dK.gnu",nom,nbessai+1);
448 sprintf(nomoutsvg,
"%s%dK.svg",nom,nbessai+1);
449 FILE *out=fopen((
char*)nomout,
"wt");
450 fprintf(out,
"set terminal svg\n");
451 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
452 fprintf(out,
"set datafile separator \";\"\n");
453 fprintf(out,
"set key on outside bottom center horizontal\n");
454 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
455 fprintf(out,
"set ylabel 'Module de compressibilité K (GPa)'\n");
456 fprintf(out,
"set y2label 'Écart à l''isotropie'\n");
457 fprintf(out,
"set pointsize 1\n");
458 fprintf(out,
"set autoscale x\n");
460 fprintf(out,
"stats '%s' using ($%d/1e9) name 'YX'\n",nomdata,37+9*
tab[
listeessai[nbessai][0]].nbphase);
461 fprintf(out,
"stats '%s' using ($%d/1e9) name 'YN'\n",nomdata,38+9*
tab[
listeessai[nbessai][0]].nbphase);
462 fprintf(out,
"delta = (YX_max - YN_min) * 0.05\n");
463 fprintf(out,
"ymin_zoom = YN_min - delta\n");
464 fprintf(out,
"ymax_zoom = YX_max + delta\n");
465 fprintf(out,
"set yrange [ymin_zoom:ymax_zoom]\n");
466 fprintf(out,
"set y2tics 0.5,0.1,1\n");
467 fprintf(out,
"set y2r [0.8:1]\n");
468 fprintf(out,
"set ytics nomirror\n");
469 fprintf(out,
"set xtics nomirror\n");
471 fprintf(out,
"d(x)=dd\n");
472 fprintf(out,
"fit d(x) '%s' u :($11/1e9) via dd\n",nomdata);
473 fprintf(out,
"c(x)=cc\n");
474 fprintf(out,
"fit c(x) '%s' u :($14/1e9) via cc\n",nomdata);
475 fprintf(out,
"is(x)=is\n");
476 fprintf(out,
"fit is(x) '%s' u :($21) via is\n",nomdata);
478 fprintf(out,
"set title \"Résultat Homogéinisation \\n %s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
479 fprintf(out,
"plot '%s' u 10 :($11/1e9) title 'KDH' pointtype 7 lc rgb \"blue\", '%s' u 10 :($14/1e9) title 'KCH' pointtype 7 lc rgb \"red\",'%s' u 10 : ($%d/1e9) title 'Borne Voigt' w l lc rgb \"brown\" lw 2,'%s' u 10 : ($%d/1e9) title 'Borne Reuss' w l lc rgb \"orange\" lw 2, '%s' u 10:21 axis x1y2 title 'Isotropie' lc rgb \"green\" pointtype 3,c(x) title sprintf(\"moyenne %%.1f\",cc) lc rgb \"red\" dt 2 ,d(x) title sprintf(\"moyenne %%.1f\",dd) lc rgb \"blue\" dt 2, is(x) title sprintf(\"moyenne %%.2f\",is) axis x1y2 lc rgb \"green\" dt 2\n", nomdata,nomdata, nomdata,37+9*
tab[
listeessai[nbessai][0]].nbphase, nomdata,38+9*
tab[
listeessai[nbessai][0]].nbphase,nomdata);
481 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
484 sprintf(nomdata,
"%s%d.txt",nom,nbessai+1);
485 sprintf(nomout,
"%s%dG.gnu",nom,nbessai+1);
486 sprintf(nomoutsvg,
"%s%dG.svg",nom,nbessai+1);
487 out=fopen((
char*)nomout,
"wt");
488 fprintf(out,
"set terminal svg\n");
489 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
490 fprintf(out,
"set datafile separator \";\"\n");
491 fprintf(out,
"set key on outside bottom center horizontal\n");
492 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
493 fprintf(out,
"set ylabel 'Module de Coulomb G (GPa)'\n");
494 fprintf(out,
"set y2label 'Écart à l''isotropie'\n");
495 fprintf(out,
"set pointsize 1\n");
496 fprintf(out,
"set autoscale x\n");
498 fprintf(out,
"stats '%s' using ($%d/1e9) name 'YX'\n",nomdata,39+9*
tab[
listeessai[nbessai][0]].nbphase);
499 fprintf(out,
"stats '%s' using ($%d/1e9) name 'YN'\n",nomdata,40+9*
tab[
listeessai[nbessai][0]].nbphase);
500 fprintf(out,
"delta = (YX_max - YN_min) * 0.05\n");
501 fprintf(out,
"ymin_zoom = YN_min - delta\n");
502 fprintf(out,
"ymax_zoom = YX_max + delta\n");
503 fprintf(out,
"set yrange [ymin_zoom:ymax_zoom]\n");
504 fprintf(out,
"set y2tics 0.5,0.1,1\n");
505 fprintf(out,
"set y2r [0.8:1]\n");
506 fprintf(out,
"set ytics nomirror\n");
507 fprintf(out,
"set xtics nomirror\n");
509 fprintf(out,
"d(x)=dd\n");
510 fprintf(out,
"fit d(x) '%s' u :($12/1e9) via dd\n",nomdata);
511 fprintf(out,
"c(x)=cc\n");
512 fprintf(out,
"fit c(x) '%s' u :($15/1e9) via cc\n",nomdata);
513 fprintf(out,
"is(x)=is\n");
514 fprintf(out,
"fit is(x) '%s' u :($21) via is\n",nomdata);
516 fprintf(out,
"set title \"Résultat Homogéinisation \\n %s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
517 fprintf(out,
"plot '%s' u 10 :($12/1e9) title 'GDH' pointtype 7 lc rgb \"blue\", '%s' u 10 :($15/1e9) title 'GCH' pointtype 7 lc rgb \"red\",'%s' u 10 : ($%d/1e9) title 'Borne Voigt' w l lc rgb \"brown\" lw 2,'%s' u 10 : ($%d/1e9) title 'Borne Reuss' w l lc rgb \"orange\" lw 2, '%s' u 10:21 axis x1y2 title 'Isotropie' lc rgb \"green\" pointtype 3,c(x) title sprintf(\"moyenne %%.1f\",cc) lc rgb \"red\" dt 2 ,d(x) title sprintf(\"moyenne %%.1f\",dd) lc rgb \"blue\" dt 2, is(x) title sprintf(\"moyenne %%.2f\",is) axis x1y2 lc rgb \"green\" dt 2\n", nomdata,nomdata, nomdata,39+9*
tab[
listeessai[nbessai][0]].nbphase, nomdata,40+9*
tab[
listeessai[nbessai][0]].nbphase,nomdata);
519 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
522 sprintf(nomdata,
"%s%d.txt",nom,nbessai+1);
523 sprintf(nomout,
"%s%dE.gnu",nom,nbessai+1);
524 sprintf(nomoutsvg,
"%s%dE.svg",nom,nbessai+1);
525 out=fopen((
char*)nomout,
"wt");
526 fprintf(out,
"set terminal svg\n");
527 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
528 fprintf(out,
"set datafile separator \";\"\n");
529 fprintf(out,
"set key on outside bottom center horizontal\n");
530 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
531 fprintf(out,
"set ylabel 'Module d''Young E (GPa)'\n");
532 fprintf(out,
"set y2label 'Écart à l''isotropie'\n");
533 fprintf(out,
"set pointsize 1\n");
534 fprintf(out,
"set autoscale x\n");
536 fprintf(out,
"stats '%s' using ($%d/1e9) name 'YX'\n",nomdata,35+9*
tab[
listeessai[nbessai][0]].nbphase);
537 fprintf(out,
"stats '%s' using ($%d/1e9) name 'YN'\n",nomdata,36+9*
tab[
listeessai[nbessai][0]].nbphase);
538 fprintf(out,
"delta = (YX_max - YN_min) * 0.05\n");
539 fprintf(out,
"ymin_zoom = YN_min - delta\n");
540 fprintf(out,
"ymax_zoom = YX_max + delta\n");
541 fprintf(out,
"set yrange [ymin_zoom:ymax_zoom]\n");
542 fprintf(out,
"set y2tics 0.5,0.1,1\n");
543 fprintf(out,
"set y2r [0.8:1]\n");
544 fprintf(out,
"set ytics nomirror\n");
545 fprintf(out,
"set xtics nomirror\n");
547 fprintf(out,
"d(x)=dd\n");
548 fprintf(out,
"fit d(x) '%s' u :($13/1e9) via dd\n",nomdata);
549 fprintf(out,
"c(x)=cc\n");
550 fprintf(out,
"fit c(x) '%s' u :($16/1e9) via cc\n",nomdata);
551 fprintf(out,
"is(x)=is\n");
552 fprintf(out,
"fit is(x) '%s' u :($21) via is\n",nomdata);
554 fprintf(out,
"set title \"Résultat Homogéinisation \\n %s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
555 fprintf(out,
"plot '%s' u 10 :($13/1e9) title 'EDH' pointtype 7 lc rgb \"blue\", '%s' u 10 :($16/1e9) title 'ECH' pointtype 7 lc rgb \"red\",'%s' u 10 : ($%d/1e9) title 'Borne Voigt' w l lc rgb \"brown\" lw 2,'%s' u 10 : ($%d/1e9) title 'Borne Reuss' w l lc rgb \"orange\" lw 2, '%s' u 10:21 axis x1y2 title 'Isotropie' lc rgb \"green\" pointtype 3,c(x) title sprintf(\"moyenne %%.1f\",cc) lc rgb \"red\" dt 2 ,d(x) title sprintf(\"moyenne %%.1f\",dd) lc rgb \"blue\" dt 2, is(x) title sprintf(\"moyenne %%.2f\",is) axis x1y2 lc rgb \"green\" dt 2\n", nomdata,nomdata, nomdata,35+9*
tab[
listeessai[nbessai][0]].nbphase, nomdata,36+9*
tab[
listeessai[nbessai][0]].nbphase,nomdata);
557 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
560 sprintf(nomout,
"%s%dcum.gnu",nom,nbessai+1);
561 sprintf(nomoutsvg,
"%s%dcum.svg",nom,nbessai+1);
562 out=fopen((
char*)nomout,
"wt");
563 fprintf(out,
"set terminal svg\n");
564 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
565 fprintf(out,
"set multiplot layout 2,1\n");
566 fprintf(out,
"set datafile separator \";\"\n");
567 fprintf(out,
"set key on outside bottom center horizontal\n");
568 fprintf(out,
"set ylabel 'Module d''Young E (GPa)'\n");
569 fprintf(out,
"set pointsize 1\n");
570 fprintf(out,
"set autoscale x\n");
571 fprintf(out,
"set autoscale y\n");
572 fprintf(out,
"set ytics nomirror\n");
573 fprintf(out,
"set xtics nomirror\n");
575 fprintf(out,
"d(x)=dd\n");
576 fprintf(out,
"fit d(x) '%s' u :($13/1e9) via dd\n",nomdata);
577 fprintf(out,
"c(x)=cc\n");
578 fprintf(out,
"fit c(x) '%s' u :($16/1e9) via cc\n",nomdata);
579 fprintf(out,
"is(x)=is\n");
580 fprintf(out,
"fit is(x) '%s' u :($21) via is\n",nomdata);
582 fprintf(out,
"set title \"Résultat Homogéinisation - Moyenne des n premiers échantillons\\n %s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
583 fprintf(out,
"set size 1,0.70\n");
584 fprintf(out,
"set origin 0,0.3\n");
585 fprintf(out,
"plot '%s' u 10 :($18/1e9) title 'EDH' w l lc rgb \"blue\", '%s' u 10 :($19/1e9) title 'ECH' w l lc rgb \"red\",c(x) title sprintf(\"moyenne %%.1f\",cc) lc rgb \"red\" dt 2 ,d(x) title sprintf(\"moyenne %%.1f\",dd) lc rgb \"blue\" dt 2\n", nomdata,nomdata);
586 fprintf(out,
"unset title\n");
587 fprintf(out,
"set size 1,0.3\n");
588 fprintf(out,
"set origin 0,0\n");
590 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
591 fprintf(out,
"set ytics 0.9,0.02,1\n");
592 fprintf(out,
"stats '%s' using 22 nooutput\n",nomdata);
593 fprintf(out,
"if (STATS_min < 0.96) {\n");
594 fprintf(out,
" set yrange [*:1]\n");
595 fprintf(out,
"} else {\n");
596 fprintf(out,
" set yrange [0.96:1]\n");
599 fprintf(out,
"set ylabel 'Écart à l''isotropie'\n");
600 fprintf(out,
"plot '%s' u 10:22 w l axis x1y1 title 'Isotropie' lc rgb \"green\",is(x) title sprintf(\"moyenne %%.2f\",is) axis x1y1 lc rgb \"green\" dt 2\n", nomdata);
601 fprintf(out,
"unset multiplot\n");
603 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
606 sprintf(nomoutsvg,
"%s%dmv.svg",nom,nbessai+1);
607 sprintf(nomout,
"%s%dmv.gnu",nom,nbessai+1);
608 out=fopen((
char*)nomout,
"wt");
609 fprintf(out,
"set terminal svg\n");
610 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
611 fprintf(out,
"set datafile separator \";\"\n");
612 fprintf(out,
"set key on outside bottom center horizontal\n");
613 fprintf(out,
"set pointsize 1\n");
614 fprintf(out,
"set autoscale x\n");
615 fprintf(out,
"set autoscale y\n");
616 fprintf(out,
"set autoscale y2\n");
617 fprintf(out,
"set y2tics\n");
618 fprintf(out,
"set ytics nomirror\n");
619 fprintf(out,
"set title \"Volume et masse des échantillons \\n%s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
620 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
621 fprintf(out,
"set ylabel 'Volume'\n");
622 fprintf(out,
"set y2label 'Masse'\n");
623 fprintf(out,
"d(x)=dd\n");
624 fprintf(out,
"fit d(x) '%s' u : 25 via dd\n",nomdata);
626 std::vector<double> deno(nbphase),cible(nbphase);
628 for (
int i=0;i<nbphase;i++)
630 for (
int i=0;i<nbphase;i++)
635 for (
int j=0;j<nbphase;j++)
636 if (i==j) deno[j]=deno[j]*cible[i];
else deno[j]=deno[j]*densite;
639 for (
int i=0;i<nbphase;i++)
642 fprintf(out,
"bb=%lf\n",
masse);
643 fprintf(out,
"b(x)=bb\n");
644 fprintf(out,
"plot '%s' u 10 : 24 title 'Volume' pointtype 6 lc rgb \"blue\", '%s' u 10 : 25 title 'Masse' axis x1y2 pointtype 6 lc rgb \"red\", d(x) title sprintf(\"moyenne masse %%.6f\",dd) axis x1y2 lc rgb \"red\" dt 2,b(x) title sprintf(\"masse cible %%.6f\",bb) axis x1y2 lc rgb \"green\" dt 2\n", nomdata,nomdata);
646 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
649 sprintf(nomoutsvg,
"%s%dcdm.svg",nom,nbessai+1);
650 sprintf(nomout,
"%s%dcdm.gnu",nom,nbessai+1);
651 out=fopen((
char*)nomout,
"wt");
652 fprintf(out,
"set terminal svg\n");
653 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
654 fprintf(out,
"set datafile separator \";\"\n");
655 fprintf(out,
"set key on outside bottom center horizontal\n");
656 fprintf(out,
"set pointsize 1\n");
657 fprintf(out,
"set autoscale x\n");
658 fprintf(out,
"set autoscale y\n");
659 fprintf(out,
"set title \"Centre de masse des échantillons \\n %s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
660 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
661 fprintf(out,
"set ylabel 'Volume'\n");
662 fprintf(out,
"plot '%s' u 10 : 26 title 'CDMx' pointtype 6 lc rgb \"blue\", '%s' u 10 : 27 title 'CDMy' pointtype 6 lc rgb \"red\", '%s' u 10 : 28 title 'CDMz' pointtype 6 lc rgb \"green\", %lf notitle dt 2 lc rgb \"blue\", %lf notitle dt 2 lc rgb \"red\", %lf notitle dt 2 lc rgb \"green\"\n",nomdata, nomdata,nomdata,xcible,ycible,zcible);
664 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
667 sprintf(nomoutsvg,
"%s%dcdmcum.svg",nom,nbessai+1);
668 sprintf(nomout,
"%s%dcdmcum.gnu",nom,nbessai+1);
669 out=fopen((
char*)nomout,
"wt");
670 fprintf(out,
"set terminal svg\n");
671 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
672 fprintf(out,
"set datafile separator \";\"\n");
673 fprintf(out,
"set key on outside bottom center horizontal\n");
674 fprintf(out,
"set pointsize 1\n");
675 fprintf(out,
"set autoscale x\n");
676 fprintf(out,
"set autoscale y\n");
677 fprintf(out,
"set title \"Position moyenne des CDM des n premiers échantillons\\n %s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
678 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
679 fprintf(out,
"set ylabel 'Volume'\n");
680 fprintf(out,
"plot '%s' u 10 : 29 title 'CDMx' w l lc rgb \"blue\", '%s' u 10 : 30 title 'CDMy' w l lc rgb \"red\", '%s' u 10 : 31 title 'CDMz' w l lc rgb \"green\", %lf notitle dt 2 lc rgb \"blue\", %lf notitle dt 2 lc rgb \"red\", %lf notitle dt 2 lc rgb \"green\"\n",nomdata, nomdata,nomdata,xcible,ycible,zcible);
682 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
688 sprintf(nomoutsvg,
"%s%dph%dmv.svg",nom,nbessai+1,j+1);
689 sprintf(nomout,
"%s%dph%dmv.gnu",nom,nbessai+1,j+1);
690 out=fopen((
char*)nomout,
"wt");
691 fprintf(out,
"set terminal svg \n");
692 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
693 fprintf(out,
"set datafile separator \";\"\n");
694 fprintf(out,
"set key on outside bottom center horizontal\n");
695 fprintf(out,
"set pointsize 1\n");
696 fprintf(out,
"set autoscale x\n");
697 fprintf(out,
"set autoscale y\n");
698 fprintf(out,
"set autoscale y2\n");
699 fprintf(out,
"set y2tics\n");
700 fprintf(out,
"set ytics nomirror\n");
701 fprintf(out,
"set title \"Volume et masse de la phase %s des échantillons \\n%s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"Nomphase",j).c_str(),
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
702 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
703 fprintf(out,
"set ylabel 'Volume'\n");
704 fprintf(out,
"set y2label 'Masse'\n");
705 fprintf(out,
"d(x)=dd\n");
706 fprintf(out,
"fit d(x) '%s' u : %d via dd\n",nomdata,34+9*j);
707 fprintf(out,
"bb=%lf\n",cible[j]*
masse);
708 fprintf(out,
"b(x)=%lf\n",cible[j]*
masse);
709 fprintf(out,
"plot '%s' u 10 : %d title 'Volume' pointtype 6 lc rgb \"blue\", '%s' u 10 : %d title 'Masse' axis x1y2 pointtype 6 lc rgb \"red\", d(x) title sprintf(\"moyenne masse %%.6f\",dd) axis x1y2 lc rgb \"red\" dt 2,b(x) title sprintf(\"masse cible %%.6f\",bb) axis x1y2 lc rgb \"green\" dt 2\n", nomdata,33+9*j,nomdata,34+9*j);
711 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
713 sprintf(nomoutsvg,
"%s%dph%dcdm.svg",nom,nbessai+1,j+1);
714 sprintf(nomout,
"%s%dph%dcdm.gnu",nom,nbessai+1,j+1);
715 out=fopen((
char*)nomout,
"wt");
716 fprintf(out,
"set terminal svg\n");
717 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
718 fprintf(out,
"set datafile separator \";\"\n");
719 fprintf(out,
"set key on outside bottom center horizontal\n");
720 fprintf(out,
"set pointsize 1\n");
721 fprintf(out,
"set autoscale x\n");
722 fprintf(out,
"set autoscale y\n");
723 fprintf(out,
"set title \"Centre de masse de la phase %s des échantillons \\n %s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"Nomphase",j).c_str(),
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
724 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
725 fprintf(out,
"set ylabel 'Volume'\n");
726 fprintf(out,
"plot '%s' u 10 : %d title 'CDMx' pointtype 6 lc rgb \"blue\", '%s' u 10 : %d title 'CDMy' pointtype 6 lc rgb \"red\", '%s' u 10 : %d title 'CDMz' pointtype 6 lc rgb \"green\", %lf notitle dt 2 lc rgb \"blue\", %lf notitle dt 2 lc rgb \"red\", %lf notitle dt 2 lc rgb \"green\"\n",nomdata,35+9*j,nomdata,36+9*j,nomdata,37+9*j,xcible,ycible,zcible);
728 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
730 sprintf(nomoutsvg,
"%s%dph%dcdmcum.svg",nom,nbessai+1,j+1);
731 sprintf(nomout,
"%s%dph%dcdmcum.gnu",nom,nbessai+1,j+1);
732 out=fopen((
char*)nomout,
"wt");
733 fprintf(out,
"set terminal svg\n");
734 fprintf(out,
"set output \"%s\"\n", nomoutsvg);
735 fprintf(out,
"set datafile separator \";\"\n");
736 fprintf(out,
"set key on outside bottom center horizontal\n");
737 fprintf(out,
"set pointsize 1\n");
738 fprintf(out,
"set autoscale x\n");
739 fprintf(out,
"set autoscale y\n");
740 fprintf(out,
"set title \"Position moyenne des CDM de la phase %s des n premiers échantillons\\n %s\\n %d cristaux - Calcul %s\"\n",
param.
get_nom(
"Nomphase",j).c_str(),
param.
get_nom(
"nommateriau").c_str(),
tab[
listeessai[nbessai][0]].nbcristaux,typecalcul);
741 fprintf(out,
"set xlabel 'Numéro d''essai'\n");
742 fprintf(out,
"set ylabel 'Volume'\n");
743 fprintf(out,
"plot '%s' u 10 : %d title 'CDMx' w l lc rgb \"blue\", '%s' u 10 : %d title 'CDMy' w l lc rgb \"red\", '%s' u 10 : %d title 'CDMz' w l lc rgb \"green\", %lf notitle dt 2 lc rgb \"blue\", %lf notitle dt 2 lc rgb \"red\", %lf notitle dt 2 lc rgb \"green\"\n",nomdata,38+9*j, nomdata,39+9*j,nomdata,40+9*j,xcible,ycible,zcible);
745 sprintf(
execute,
"gnuplot %s > %s.log 2>&1",nomout,nomout);
std::vector< double > cumEDH
std::vector< nombre_statistique > volumeph
virtual ~MSTRUCT_POLY_ANALYSE_RESULTAT()
std::vector< int > listeessairatee
virtual void enregistrer(int nbessai, char *nom)
std::vector< OT_VECTEUR_3D > cdmphase
virtual int ident(bool verif=false)
MSTRUCT_POLY_ANALYSE_RESULTAT(char *nomparam)
virtual int get_nbechantillonratee(void)
virtual void enregistrer_gnu(int nbessai, char *nom)
std::vector< double > cumECH
std::vector< double > cumiso
nombre_statistique volume
std::vector< std::vector< OT_VECTEUR_3D > > cumcdmphase
virtual int get_nbechantillon(int nbessai)
virtual void execute(int nbessai)
std::vector< nombre_statistique > masseph
std::vector< OT_VECTEUR_3D > cumcdm
std::vector< std::vector< int > > listeessai
virtual int get_degreechantillon(int nbessai)
virtual int get_nbcristauxechantillon(int nbessai)
std::vector< OT_VECTEUR_3D > cdmephase
std::vector< MSTRUCT_POLY_RESULTAT > tab
virtual ~MSTRUCT_POLY_RESULTAT()
std::string get_nom(std::string chaine, int num=0)
double get_valeur(std::string chaine, int num=0)
void reinit(int n, int m)
virtual double get_z(void) const
virtual void change_x(double x)
virtual void change_z(double z)
virtual double get_y(void) const
virtual double get_x(void) const
virtual void change_y(double y)
double2 sqrt(double2 &val)