51 LISTE_FEM_ELEMENT3::iterator ite3;
68 LISTE_FEM_ELEMENT3::iterator ite3;
120 for (
int j=0;j<nbnoeud;j++)
129 resultat[3]=resultat[1];
130 resultat[6]=resultat[2];
131 resultat[7]=resultat[5];
136 for (
int j=0;j<nbnoeud;j++)
141 resultat[4]=resultat[0];
145 resultat[8]=resultat[0];
163 for (
int j=0;j<nbnoeud;j++)
172 resultat[3]=resultat[1];
173 resultat[6]=resultat[2];
174 resultat[7]=resultat[5];
179 for (
int j=0;j<nbnoeud;j++)
184 resultat[4]=resultat[0];
188 resultat[8]=resultat[0];
201 LISTE_FEM_NOEUD::iterator it;
205 metrique[0]=no->get_solution(0);
206 metrique[1]=no->get_solution(1);
207 metrique[2]=no->get_solution(2);
208 metrique[3]=no->get_solution(3);
209 metrique[4]=no->get_solution(4);
210 metrique[5]=no->get_solution(5);
211 metrique[6]=no->get_solution(6);
212 metrique[7]=no->get_solution(7);
213 metrique[8]=no->get_solution(8);
214 double valeur_propre[3],vecteur_propre[9];
216 if (1./
sqrt(valeur_propre[0])>max) max=1./
sqrt(valeur_propre[0]);
217 if (1./
sqrt(valeur_propre[1])>max) max=1./
sqrt(valeur_propre[1]);
218 if (1./
sqrt(valeur_propre[2])>max) max=1./
sqrt(valeur_propre[2]);
235 int num=nnx+nny*
nx+nnz*
ny*
nx;
242 double eps=0.00000001;
249 if (uvw[0]+uvw[1]+uvw[2]<1+eps)
253 double xc=0.25,yc=0.25,zc=0.25;
256 while (lstcherche.
get_nb()==0)
262 double distref=1e308;
266 BOITE_3D b(param[0],param[1],param[2],param[0],param[1],param[2]);
267 if (b*ele->get_boite_3D())
273 if (uvw[0]+uvw[1]+uvw[2]<1+eps)
281 double centre[3]={ele->
get_boite_3D().
get_xcentre(),ele->get_boite_3D().get_ycentre(),ele->get_boite_3D().get_zcentre()};
290 if (uvw[0]<0.) uvw[0]=0.;
291 if (uvw[1]<0.) uvw[1]=0.;
292 if (uvw[2]<0.) uvw[2]=0.;
293 if (uvw[0]+uvw[1]+uvw[2]>1.)
295 double deno=uvw[0]+uvw[1]+uvw[2];
315 LISTE_FEM_NOEUD::iterator itn;
317 double xmin=1e308,ymin=1e308,zmin=1e308,xmax=-1e308,ymax=-1e308,zmax=-1e308;
321 if (no->get_x()>xmax) xmax=no->get_x();
322 if (no->get_y()>ymax) ymax=no->get_y();
323 if (no->get_z()>zmax) zmax=no->get_z();
324 if (no->get_x()<xmin) xmin=no->get_x();
325 if (no->get_y()<ymin) ymin=no->get_y();
326 if (no->get_z()<zmin) zmin=no->get_z();
331 LISTE_FEM_ELEMENT3::iterator ite3;
339 std::string nomfich1=nom;nomfich1=nomfich1+
".ctt";
340 std::string nomfich2=nom;nomfich2=nomfich2+
"ctt.magic";
341 FILE *out=fopen(nomfich1.c_str(),
"wt");
342 fprintf(out,
"%s\n",nomfich2.c_str());
344 if (
isotrope==
true) fprintf(out,
"Isotrope 1\n");
345 else fprintf(out,
"Isotrope 0\n");
352 liste_fichier.push_back(
nomfich);
357 FILE *in=fopen(nom,
"rt");
358 char message[1000],nomtmp[500];
359 fgets(message,1000,in);
361 fgets(message,1000,in);
363 sscanf(message,
"%lu %d",&
id,&
numchamp);
367 fgets(message,1000,in);
369 sscanf(message,
"%s %d",nomtmp,&isotro);
405 nom[strchr(nom,
'.')-nom]=0;
406 strcat(nom,
"_structure.sol");
413 LISTE_FEM_NOEUD::iterator itn;
429 double res[9]={0.,0.,0.,0.,0.,0.,0.,0.,0.};
437 res[0]=
res[0]+dist*no2->get_solution(0);
440 res[1]=
res[1]+dist*no2->get_solution(1);
441 res[2]=
res[2]+dist*no2->get_solution(2);
442 res[3]=
res[3]+dist*no2->get_solution(3);
443 res[4]=
res[4]+dist*no2->get_solution(4);
444 res[5]=
res[5]+dist*no2->get_solution(5);
445 res[6]=
res[6]+dist*no2->get_solution(6);
446 res[7]=
res[7]+dist*no2->get_solution(7);
447 res[8]=
res[8]+dist*no2->get_solution(8);
450 if (listeproche.
get_nb()==0)
451 res[0]=1./valmax/valmax;
477 for (
int tenseur=0;tenseur<9;tenseur++)
494 LISTE_FEM_NOEUD::iterator it;
505 double val=sol2->
lire(i,0,0);
519 LISTE_FEM_ELEMENT3::iterator ite3;
540 uvw[0]=-1+2*(xyz[0]-xmin)/(xmax-xmin);
541 uvw[1]=-1+2*(xyz[1]-ymin)/(ymax-ymin);
542 uvw[2]=-1+2*(xyz[2]-zmin)/(zmax-zmin);
563 uvw[0] = -(x3 * y1 * z4 - x3 * y1 * z - y1 * z4 * x - z3 * y1 * x4 + z3 * y1 * x + y1 * z * x4 - y3 * x1 * z4 - z1 * y * x4 + z1 * y3 * x4 - z3 * x1 * y - z1 * y3 * x + y3 * x1 * z - z * x1 * y4 + z * x3 * y4 + z4 * y3 * x + z4 * x1 * y - z4 * x3 * y - z3 * y4 * x + z1 * y4 * x - z1 * x3 * y4 - y3 * z * x4 + z3 * x1 * y4 + z3 * y * x4 + z1 * x3 * y) / (-z1 * y2 * x3 - z1 * x2 * y4 - z1 * y3 * x4 + z1 * x2 * y3 + z1 * x3 * y4 + z3 * y1 * x4 + y2 * z3 * x1 + x2 * y1 * z4 - y1 * z2 * x4 + y1 * z2 * x3 + z1 * y2 * x4 + y3 * z2 * x4 + x1 * z2 * y4 - x1 * z2 * y3 - x3 * y1 * z4 - x3 * z2 * y4 - z3 * x1 * y4 + y2 * x3 * z4 - x2 * y3 * z4 + x2 * z3 * y4 - x2 * z3 * y1 - y2 * z3 * x4 - y2 * x1 * z4 + y3 * x1 * z4);
564 uvw[1] = (z1 * y4 * x + z1 * y2 * x4 - z1 * y2 * x + z1 * x2 * y - z1 * x2 * y4 - z1 * y * x4 + z4 * x1 * y - z * x1 * y4 + y2 * x1 * z - y1 * z4 * x + y1 * z * x4 + z * x2 * y4 - z * y2 * x4 + z4 * y2 * x - y4 * z2 * x + y * z2 * x4 - z4 * x2 * y + y1 * z2 * x - x2 * y1 * z - x1 * z2 * y + x2 * y1 * z4 - y1 * z2 * x4 + x1 * z2 * y4 - y2 * x1 * z4) / (-z1 * y2 * x3 - z1 * x2 * y4 - z1 * y3 * x4 + z1 * x2 * y3 + z1 * x3 * y4 + z3 * y1 * x4 + y2 * z3 * x1 + x2 * y1 * z4 - y1 * z2 * x4 + y1 * z2 * x3 + z1 * y2 * x4 + y3 * z2 * x4 + x1 * z2 * y4 - x1 * z2 * y3 - x3 * y1 * z4 - x3 * z2 * y4 - z3 * x1 * y4 + y2 * x3 * z4 - x2 * y3 * z4 + x2 * z3 * y4 - x2 * z3 * y1 - y2 * z3 * x4 - y2 * x1 * z4 + y3 * x1 * z4);
565 uvw[2] = -(-y2 * x3 * z - y2 * z3 * x1 + y2 * z3 * x + y2 * x1 * z - z3 * y1 * x + y1 * z2 * x - y1 * z2 * x3 - y3 * x1 * z - y3 * z2 * x + x2 * y3 * z + x2 * z3 * y1 - x2 * z3 * y - x2 * y1 * z - x1 * z2 * y + x1 * z2 * y3 + z1 * x2 * y + x3 * z2 * y + z3 * x1 * y + z1 * y2 * x3 + z1 * y3 * x - z1 * y2 * x - z1 * x2 * y3 + x3 * y1 * z - z1 * x3 * y) / (-z1 * y2 * x3 - z1 * x2 * y4 - z1 * y3 * x4 + z1 * x2 * y3 + z1 * x3 * y4 + z3 * y1 * x4 + y2 * z3 * x1 + x2 * y1 * z4 - y1 * z2 * x4 + y1 * z2 * x3 + z1 * y2 * x4 + y3 * z2 * x4 + x1 * z2 * y4 - x1 * z2 * y3 - x3 * y1 * z4 - x3 * z2 * y4 - z3 * x1 * y4 + y2 * x3 * z4 - x2 * y3 * z4 + x2 * z3 * y4 - x2 * z3 * y1 - y2 * z3 * x4 - y2 * x1 * z4 + y3 * x1 * z4);