MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
fct_taille_fem_solution.cpp
Aller à la documentation de ce fichier.
1 //####//------------------------------------------------------------
2 //####//------------------------------------------------------------
3 //####// MAGiC
4 //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5 //####// Departement de Genie Mecanique - UQTR
6 //####//------------------------------------------------------------
7 //####// MAGIC est un projet de recherche de l equipe ERICCA
8 //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9 //####// http://www.uqtr.ca/ericca
10 //####// http://www.uqtr.ca/
11 //####//------------------------------------------------------------
12 //####//------------------------------------------------------------
13 //####//
14 //####// fct_taille_fem_solution.cpp
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:52 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
22 #include "gestionversion.h"
24 #include "mg_file.h"
25 #include "fem_hexa8.h"
26 #include "fem_tetra4.h"
27 #include "fem_maillage_outils.h"
28 #include <stdio.h>
29 #include "mailleur3d_structure.h"
30 #include "tpl_grille.h"
31 
32 
33 
34 
35 
36 
37 
39 {
40 lire(nom);
43 if (fem->get_est_structure()==false)
44  cree_octree();
45 else
46  {
51  LISTE_FEM_ELEMENT3::iterator ite3;
52  for (FEM_ELEMENT3* ele=fem->get_premier_element3(ite3);ele!=NULL;ele=fem->get_suivant_element3(ite3))
53  element_structure.push_back(ele);
54  }
55 }
56 
57 
58 FCT_TAILLE_FEM_SOLUTION::FCT_TAILLE_FEM_SOLUTION(MG_GESTIONNAIRE* gesttmp,FEM_MAILLAGE* femtmp):gest(gesttmp),fem(femtmp),gest_alloue(false)
59 {
60 if (fem->get_est_structure()==false)
61  cree_octree();
62 else
63  {
68  LISTE_FEM_ELEMENT3::iterator ite3;
69  for (FEM_ELEMENT3* ele=fem->get_premier_element3(ite3);ele!=NULL;ele=fem->get_suivant_element3(ite3))
70  element_structure.push_back(ele);
71  }
72 }
73 
74 
75 FCT_TAILLE_FEM_SOLUTION::FCT_TAILLE_FEM_SOLUTION(MG_GESTIONNAIRE* gesttmp, int nnx, int nny, int nnz):FCT_TAILLE_METRIQUE(),gest(gesttmp),nx(nnx),ny(nny),nz(nnz),gest_alloue(false)
76 {
77 }
78 
79 
80 FCT_TAILLE_FEM_SOLUTION::FCT_TAILLE_FEM_SOLUTION(FCT_TAILLE_FEM_SOLUTION& mdd):FCT_TAILLE_METRIQUE(mdd),gest(mdd.gest),nx(mdd.nx),ny(mdd.ny),nz(mdd.nz)
81 {
82 
83 }
84 
85 
86 
88 {
89 if (gest_alloue==true) delete gest;
90 }
91 
92 
93 
95 {
96 if (isotrope==true)
97  {
98  if (boite_englobante.contient(param[0],param[1],param[2]))
99  return 1;
100  else
101  return 0;
102  }
103 return 0;
104 }
105 
106 
107 void FCT_TAILLE_FEM_SOLUTION::evaluer(double *param,double *resultat)
108 {
109 double uvw[3];
110 FEM_ELEMENT3* ele=get_element3(param,uvw);
111 int nbnoeud=ele->get_nb_fonction_interpolation();
112 if (isotrope==false)
113  {
114  resultat[0]=0.;
115  resultat[1]=0.;
116  resultat[2]=0.;
117  resultat[4]=0.;
118  resultat[5]=0.;
119  resultat[8]=0.;
120  for (int j=0;j<nbnoeud;j++)
121  {
122  resultat[0]=resultat[0]+ele->get_fonction_interpolation(j+1,uvw)*ele->get_fem_noeud(j)->get_solution(0);
123  resultat[1]=resultat[1]+ele->get_fonction_interpolation(j+1,uvw)*ele->get_fem_noeud(j)->get_solution(1);
124  resultat[2]=resultat[2]+ele->get_fonction_interpolation(j+1,uvw)*ele->get_fem_noeud(j)->get_solution(2);
125  resultat[4]=resultat[4]+ele->get_fonction_interpolation(j+1,uvw)*ele->get_fem_noeud(j)->get_solution(4);
126  resultat[5]=resultat[5]+ele->get_fonction_interpolation(j+1,uvw)*ele->get_fem_noeud(j)->get_solution(5);
127  resultat[8]=resultat[8]+ele->get_fonction_interpolation(j+1,uvw)*ele->get_fem_noeud(j)->get_solution(8);
128  }
129  resultat[3]=resultat[1];
130  resultat[6]=resultat[2];
131  resultat[7]=resultat[5];
132  }
133 else
134  {
135  resultat[0]=0.;
136  for (int j=0;j<nbnoeud;j++)
137  resultat[0]=resultat[0]+ele->get_fonction_interpolation(j+1,uvw)*ele->get_fem_noeud(j)->get_solution(0);
138  resultat[1]=0.;
139  resultat[2]=0.;
140  resultat[3]=0.;
141  resultat[4]=resultat[0];
142  resultat[5]=0.;
143  resultat[6]=0.;
144  resultat[7]=0.;
145  resultat[8]=resultat[0];
146  }
147 }
148 
149 
150 void FCT_TAILLE_FEM_SOLUTION::deriver(double *param,double *resultat,int num_param)
151 {
152 double uvw[3];
153 FEM_ELEMENT3* ele=get_element3(param,uvw);
154 int nbnoeud=ele->get_nb_fonction_interpolation();
155 if (isotrope==false)
156  {
157  resultat[0]=0.;
158  resultat[1]=0.;
159  resultat[2]=0.;
160  resultat[4]=0.;
161  resultat[5]=0.;
162  resultat[8]=0.;
163  for (int j=0;j<nbnoeud;j++)
164  {
165  resultat[0]=resultat[0]+ele->get_fonction_derive_interpolation(j+1,num_param,uvw)*ele->get_fem_noeud(j)->get_solution(0);
166  resultat[1]=resultat[1]+ele->get_fonction_derive_interpolation(j+1,num_param,uvw)*ele->get_fem_noeud(j)->get_solution(1);
167  resultat[2]=resultat[2]+ele->get_fonction_derive_interpolation(j+1,num_param,uvw)*ele->get_fem_noeud(j)->get_solution(2);
168  resultat[4]=resultat[4]+ele->get_fonction_derive_interpolation(j+1,num_param,uvw)*ele->get_fem_noeud(j)->get_solution(4);
169  resultat[5]=resultat[5]+ele->get_fonction_derive_interpolation(j+1,num_param,uvw)*ele->get_fem_noeud(j)->get_solution(5);
170  resultat[8]=resultat[8]+ele->get_fonction_derive_interpolation(j+1,num_param,uvw)*ele->get_fem_noeud(j)->get_solution(8);
171  }
172  resultat[3]=resultat[1];
173  resultat[6]=resultat[2];
174  resultat[7]=resultat[5];
175  }
176 else
177  {
178  resultat[0]=0.;
179  for (int j=0;j<nbnoeud;j++)
180  resultat[0]=resultat[0]+ele->get_fonction_derive_interpolation(j+1,num_param,uvw)*ele->get_fem_noeud(j)->get_solution(0);
181  resultat[1]=0.;
182  resultat[2]=0.;
183  resultat[3]=0.;
184  resultat[4]=resultat[0];
185  resultat[5]=0.;
186  resultat[6]=0.;
187  resultat[7]=0.;
188  resultat[8]=resultat[0];
189  }
190 }
191 
193 {
194 return numchamp;
195 }
196 
197 
199 {
200 double max=0.;
201 LISTE_FEM_NOEUD::iterator it;
202 for (FEM_NOEUD* no=fem->get_premier_noeud(it);no!=NULL;no=fem->get_suivant_noeud(it))
203  {
204  double metrique[9];
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];
215  evaluer_decompose(metrique,valeur_propre,vecteur_propre);
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]);
219  }
220 return max;
221 }
222 
223 
224 
225 
226 
227 
229 {
230 if (fem->get_est_structure()==true)
231  {
232  int nnx=(int)((param[0]-boite_englobante.get_xmin())/pasx);
233  int nny=(int)((param[1]-boite_englobante.get_ymin())/pasy);
234  int nnz=(int)((param[2]-boite_englobante.get_zmin())/pasz);
235  int num=nnx+nny*nx+nnz*ny*nx;
237  return element_structure[num];
238  }
239 else
240  {
241  static FEM_ELEMENT3* eleref=NULL;
242  double eps=0.00000001;
243  if (eleref!=NULL)
244  {
245  get_param_element_fini(eleref,param,uvw);
246  if (uvw[0]>-eps)
247  if (uvw[1]>-eps)
248  if (uvw[2]>-eps)
249  if (uvw[0]+uvw[1]+uvw[2]<1+eps)
250  return eleref;
251  }
252  eleref=NULL;
253  double xc=0.25,yc=0.25,zc=0.25;
255  double longref=0.;
256  while (lstcherche.get_nb()==0)
257  {
258  octree.rechercher(param[0],param[1],param[2],longref,lstcherche);
259  longref=longref+0.0001*octree.get_dimension_caracteristique();
260  }
262  double distref=1e308;
263  double uvwref[3];
264  for (FEM_ELEMENT3* ele=lstcherche.get_premier(it);ele!=NULL;ele=lstcherche.get_suivant(it))
265  {
266  BOITE_3D b(param[0],param[1],param[2],param[0],param[1],param[2]);
267  if (b*ele->get_boite_3D())
268  {
269  get_param_element_fini(ele,param,uvw);
270  if (uvw[0]>-eps)
271  if (uvw[1]>-eps)
272  if (uvw[2]>-eps)
273  if (uvw[0]+uvw[1]+uvw[2]<1+eps)
274  {
275  eleref=ele;
276  return eleref;
277  }
278  }
279 
280 
281  double centre[3]={ele->get_boite_3D().get_xcentre(),ele->get_boite_3D().get_ycentre(),ele->get_boite_3D().get_zcentre()};
282  OT_VECTEUR_3D vec(param,centre);
283  if (vec.get_longueur2()<distref)
284  {
285  distref=vec.get_longueur2();
286  eleref=ele;
287  }
288  }
289  get_param_element_fini(eleref,param,uvw);
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.)
294  {
295  double deno=uvw[0]+uvw[1]+uvw[2];
296  uvw[0]=uvw[0]/deno;
297  uvw[1]=uvw[1]/deno;
298  uvw[2]=uvw[2]/deno;
299  }
300  return eleref;
301  }
302  return NULL;
303 
304 }
305 
306 
307 
309 {
310 return boite_englobante;
311 }
312 
314 {
315 LISTE_FEM_NOEUD::iterator itn;
317 double xmin=1e308,ymin=1e308,zmin=1e308,xmax=-1e308,ymax=-1e308,zmax=-1e308;
318 for (FEM_NOEUD* no=fem->get_premier_noeud(itn);no!=NULL;no=fem->get_suivant_noeud(itn))
319  {
320  lstnoeud.ajouter(no);
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();
327  }
328 boite_englobante.reinit(xmin,ymin,zmin,xmax,ymax,zmax);
331 LISTE_FEM_ELEMENT3::iterator ite3;
332 for (FEM_ELEMENT3* ele=fem->get_premier_element3(ite3);ele!=NULL;ele=fem->get_suivant_element3(ite3))
333  octree.inserer(ele);
334 }
335 
336 
338 {
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());
343 fprintf(out,"%lu %d\n",sol->get_id(),numchamp);
344 if (isotrope==true) fprintf(out,"Isotrope 1\n");
345 else fprintf(out,"Isotrope 0\n");
346 fclose(out);
347 gest->enregistrer(nomfich2.c_str());
348 }
349 
350 void FCT_TAILLE_FEM_SOLUTION::get_fichier_dependant(std::vector<std::string> &liste_fichier)
351 {
352 liste_fichier.push_back(nomfich);
353 }
354 
356 {
357 FILE *in=fopen(nom,"rt");
358 char message[1000],nomtmp[500];
359 fgets(message,1000,in);
360 sscanf(message,"%s",nomfich);
361 fgets(message,1000,in);
362 unsigned long id;
363 sscanf(message,"%lu %d",&id,&numchamp);
364 gest=new MG_FILE(nomfich);
365 gest_alloue=true;
367 fgets(message,1000,in);
368 int isotro;
369 sscanf(message,"%s %d",nomtmp,&isotro);
370 isotrope=isotro;
371 fclose(in);
372 }
373 
374 
376 {
377 return gest;
378 }
379 
381 {
382 return fem;
383 }
384 
386 {
387 return sol;
388 }
389 
391 {
392 return isotrope;
393 }
394 
395 
396 void FCT_TAILLE_FEM_SOLUTION::structure_support(int nnx,int nny,int nnz,bool avecverif)
397 {
398 if (fem->get_est_structure()==true) return;
399 double valmax=get_valeur_maximale();
401 mail.maille();
403 char nom[255];
404 strcpy(nom,sol->get_nom_fichier().c_str());
405 nom[strchr(nom,'.')-nom]=0;
406 strcat(nom,"_structure.sol");
409 sol2->change_legende(0,"metrique");
410 sol2->active_solution(0);
413 LISTE_FEM_NOEUD::iterator itn;
414 for (FEM_NOEUD *no=fem->get_premier_noeud(itn);no!=NULL;no=fem->get_suivant_noeud(itn))
415  grille.inserer(no);
416 nx=nnx;
417 ny=nny;
418 nz=nnz;
422 int i=0;
423 for (FEM_NOEUD *no=fem2->get_premier_noeud(itn);no!=NULL;no=fem2->get_suivant_noeud(itn))
424  {
425  TPL_MAP_ENTITE<FEM_NOEUD*> listeproche;
426  BOITE_3D b(no->get_x()-pasx,no->get_y()-pasy,no->get_z()-pasz,no->get_x()+pasx,no->get_y()+pasy,no->get_z()+pasz);
427  grille.rechercher(b,listeproche);
429  double res[9]={0.,0.,0.,0.,0.,0.,0.,0.,0.};
430  double deno=0;
431  for (FEM_NOEUD* no2=listeproche.get_premier(it);no2!=NULL;no2=listeproche.get_suivant(it))
432  {
433  OT_VECTEUR_3D vec(no->get_coord(),no2->get_coord());
434  double dist=vec.get_longueur();
435  dist=1./dist;
436  deno=deno+dist;
437  res[0]=res[0]+dist*no2->get_solution(0);
438  if (!isotrope)
439  {
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);
448  }
449  }
450  if (listeproche.get_nb()==0)
451  res[0]=1./valmax/valmax;
452  else
453  res[0]=res[0]/deno;
454  if (!isotrope)
455  {
456  res[1]=res[1]/deno;
457  res[2]=res[2]/deno;
458  res[3]=res[3]/deno;
459  res[4]=res[4]/deno;
460  res[5]=res[5]/deno;
461  res[6]=res[6]/deno;
462  res[7]=res[7]/deno;
463  res[8]=res[8]/deno;
464  }
465  else
466  {
467  res[4]=res[0];
468  res[8]=res[0];
469  res[1]=0.;
470  res[2]=0.;
471  res[3]=0.;
472  res[5]=0.;
473  res[6]=0.;
474  res[7]=0.;
475  }
476 
477  for (int tenseur=0;tenseur<9;tenseur++)
478  sol2->ecrire(res[tenseur],i,0,tenseur);
479  i++;
480  }
481 
482 char nomtmp1[100];
483 char nomtmp2[100];
484 
485 
486 if (avecverif)
487  {
488  sprintf(nomtmp1,"%sec.sol",sol->get_nom_fichier().c_str());
489  sprintf(nomtmp2,"%sec.sol",sol2->get_nom_fichier().c_str());
490  FEM_SOLUTION* sol2b=new FEM_SOLUTION(fem2,1,nomtmp2,1,(char*)"Écart nodal",MAGIC::ENTITE_SOLUTION::ENTITE_NOEUD,MAGIC::TYPE_SOLUTION::SCALAIRE);
492  gest->ajouter_fem_solution(sol1b);
493  gest->ajouter_fem_solution(sol2b);
494  LISTE_FEM_NOEUD::iterator it;
495  i=0;
496  for (FEM_NOEUD* no=fem->get_premier_noeud(it);no!=NULL;no=fem->get_suivant_noeud(it))
497  {
498  double val=sol->lire(i,0,0);
499  sol1b->ecrire(1/sqrt(val),i,0,0);
500  i++;
501  }
502  i=0;
503  for (FEM_NOEUD* no=fem2->get_premier_noeud(it);no!=NULL;no=fem2->get_suivant_noeud(it))
504  {
505  double val=sol2->lire(i,0,0);
506  sol2b->ecrire(1/sqrt(val),i,0,0);
507  i++;
508  }
509 
510 
511  FEM_MAILLAGE_OUTILS otfem;
512  otfem.projete_solution_maillage(sol2b,0,fem);
514  otfem.compare_champs_solution(solproj,0,sol1b,0);
515  }
516 fem=fem2;
517 sol=sol2;
518 element_structure.clear();
519 LISTE_FEM_ELEMENT3::iterator ite3;
520 for (FEM_ELEMENT3* ele=fem->get_premier_element3(ite3);ele!=NULL;ele=fem->get_suivant_element3(ite3))
521  element_structure.push_back(ele);
522 
523 
524 }
525 
526 
527 
529 {
530 if (fem->get_est_structure()==true)
531  {
533  {
534  double xmin=ele->get_fem_noeud(0)->get_x();
535  double ymin=ele->get_fem_noeud(0)->get_y();
536  double zmin=ele->get_fem_noeud(0)->get_z();
537  double xmax=ele->get_fem_noeud(6)->get_x();
538  double ymax=ele->get_fem_noeud(6)->get_y();
539  double zmax=ele->get_fem_noeud(6)->get_z();
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);
543  }
544  }
545 else
547  {
548  double x1=ele->get_fem_noeud(0)->get_x();
549  double y1=ele->get_fem_noeud(0)->get_y();
550  double z1=ele->get_fem_noeud(0)->get_z();
551  double x2=ele->get_fem_noeud(1)->get_x();
552  double y2=ele->get_fem_noeud(1)->get_y();
553  double z2=ele->get_fem_noeud(1)->get_z();
554  double x3=ele->get_fem_noeud(2)->get_x();
555  double y3=ele->get_fem_noeud(2)->get_y();
556  double z3=ele->get_fem_noeud(2)->get_z();
557  double x4=ele->get_fem_noeud(3)->get_x();
558  double y4=ele->get_fem_noeud(3)->get_y();
559  double z4=ele->get_fem_noeud(3)->get_z();
560  double x=xyz[0];
561  double y=xyz[1];
562  double z=xyz[2];
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);
566  }
567 
568 }
569 
MG_GESTIONNAIRE::enregistrer
virtual void enregistrer(std::ostream &o, double version=MAGIC_VERSION_FICHIER_DOUBLE)
Definition: mg_gestionnaire.cpp:1070
TPL_MAP_ENTITE::get_premier
virtual X get_premier(ITERATEUR &it)
Definition: tpl_map_entite.h:112
fem_hexa8.h
FEM_SOLUTION
Definition: fem_solution.h:40
FCT_TAILLE_FEM_SOLUTION::nx
int nx
Definition: fct_taille_fem_solution.h:77
FEM_MAILLAGE::get_suivant_element3
FEM_ELEMENT3 * get_suivant_element3(LISTE_FEM_ELEMENT3::iterator &it)
Definition: fem_maillage.cpp:680
TPL_OCTREE::get_dimension_caracteristique
virtual double get_dimension_caracteristique()
Definition: tpl_octree.h:992
MAGIC::TYPE_ENTITE::IDFEM_HEXA8
@ IDFEM_HEXA8
Definition: mg_definition.h:70
FCT_TAILLE_FEM_SOLUTION::get_maillage
virtual FEM_MAILLAGE * get_maillage(void)
Definition: fct_taille_fem_solution.cpp:380
gestionversion.h
FCT_TAILLE_FEM_SOLUTION::element_structure
std::vector< FEM_ELEMENT3 * > element_structure
Definition: fct_taille_fem_solution.h:79
TPL_MAP_ENTITE
Definition: tpl_map_entite.h:35
FCT_TAILLE_FEM_SOLUTION
Definition: fct_taille_fem_solution.h:37
BOITE_3D::get_xmin
double get_xmin(void)
Definition: ot_boite_3d.cpp:104
FCT_TAILLE_FEM_SOLUTION::get_fichier_dependant
virtual void get_fichier_dependant(std::vector< std::string > &liste_fichier)
Definition: fct_taille_fem_solution.cpp:350
FEM_ELEMENT3::get_fem_noeud
virtual class FEM_NOEUD * get_fem_noeud(int num)=0
MG_IDENTIFICATEUR::get_id
unsigned long get_id()
Definition: mg_identificateur.cpp:53
FCT_TAILLE_FEM_SOLUTION::get_solution
virtual FEM_SOLUTION * get_solution(void)
Definition: fct_taille_fem_solution.cpp:385
FCT_TAILLE_FEM_SOLUTION::structure_support
virtual void structure_support(int nnx, int nny, int nnz, bool avecverif=false)
Definition: fct_taille_fem_solution.cpp:396
TPL_GRILLE::inserer
virtual void inserer(A a)
Definition: tpl_grille.h:274
FEM_SOLUTION::ecrire
void ecrire(double val, int i, int j, int coord=0, int num_no=0)
Definition: fem_solution.cpp:411
OT_VECTEUR_3D::get_longueur2
virtual double get_longueur2(void) const
Definition: ot_mathematique.cpp:488
BOITE_3D::get_xcentre
double get_xcentre(void)
Definition: ot_boite_3d.cpp:156
FCT_TAILLE_FEM_SOLUTION::sol
FEM_SOLUTION * sol
Definition: fct_taille_fem_solution.h:69
FCT_TAILLE_FEM_SOLUTION::FCT_TAILLE_FEM_SOLUTION
FCT_TAILLE_FEM_SOLUTION(char *nom)
Definition: fct_taille_fem_solution.cpp:38
mg_file.h
TPL_GRILLE
Definition: tpl_grille.h:121
FEM_ELEMENT3
Definition: fem_element3.h:34
FEM_MAILLAGE::get_premier_noeud
FEM_NOEUD * get_premier_noeud(LISTE_FEM_NOEUD::iterator &it)
Definition: fem_maillage.cpp:174
FEM_MAILLAGE_OUTILS::projete_solution_maillage
int projete_solution_maillage(class FEM_SOLUTION *sol, int numchamp, FEM_MAILLAGE *fem)
Definition: fem_maillage_outils.cpp:665
FEM_SOLUTION::get_nom_fichier
std::string get_nom_fichier(void)
Definition: fem_solution.cpp:839
FEM_MAILLAGE::get_param_structure
bool get_param_structure(BOITE_3D &btmp, int &nxtmp, int &nytmp, int &nztmp)
Definition: fem_maillage.cpp:1807
MG_GESTIONNAIRE
Definition: mg_gestionnaire.h:57
FEM_SOLUTION::get_maillage
FEM_MAILLAGE * get_maillage(void)
Definition: fem_solution.cpp:472
MG_GESTIONNAIRE::ajouter_fem_solution
int ajouter_fem_solution(FEM_SOLUTION *mgsol)
Definition: mg_gestionnaire.cpp:902
FEM_MAILLAGE_OUTILS::compare_champs_solution
void compare_champs_solution(class FEM_SOLUTION *sol1, int numchamp1, FEM_SOLUTION *sol2, int numchamps2)
Definition: fem_maillage_outils.cpp:486
FCT_TAILLE_FEM_SOLUTION::lire
virtual void lire(char *nom)
Definition: fct_taille_fem_solution.cpp:355
FEM_ELEMENT3::get_nb_fonction_interpolation
virtual int get_nb_fonction_interpolation(void)=0
FCT_TAILLE_FEM_SOLUTION::get_param_element_fini
void get_param_element_fini(FEM_ELEMENT3 *ele, double *xyz, double *uvw)
Definition: fct_taille_fem_solution.cpp:528
FCT_TAILLE_FEM_SOLUTION::~FCT_TAILLE_FEM_SOLUTION
virtual ~FCT_TAILLE_FEM_SOLUTION()
Definition: fct_taille_fem_solution.cpp:87
MAGIC::TYPE_SOLUTION::TENSEUR
@ TENSEUR
Definition: mg_definition.h:93
MG_GESTIONNAIRE::get_fem_solution
FEM_SOLUTION * get_fem_solution(unsigned int num)
Definition: mg_gestionnaire.cpp:930
FCT_TAILLE_FEM_SOLUTION::fem
FEM_MAILLAGE * fem
Definition: fct_taille_fem_solution.h:71
TPL_OCTREE::inserer
virtual void inserer(BOITE_3D &boite, A a, TPL_CELLULE_OCTREE< A, CONDITION > *cellule)
Definition: tpl_octree.h:897
MAGIC::TYPE_ENTITE::IDFEM_TETRA4
@ IDFEM_TETRA4
Definition: mg_definition.h:70
BOITE_3D::get_zmax
double get_zmax(void)
Definition: ot_boite_3d.cpp:129
BOITE_3D::get_ymin
double get_ymin(void)
Definition: ot_boite_3d.cpp:114
FCT_TAILLE_FEM_SOLUTION::get_valeur_maximale
virtual double get_valeur_maximale(int num=0)
Definition: fct_taille_fem_solution.cpp:198
FEM_NOEUD::get_y
virtual double get_y(double coef=0.)
Definition: fem_noeud.cpp:210
MG_GESTIONNAIRE::get_fem_solutionid
FEM_SOLUTION * get_fem_solutionid(unsigned long num)
Definition: mg_gestionnaire.cpp:918
FEM_SOLUTION::active_solution
void active_solution(int num)
Definition: fem_solution.cpp:490
FCT_TAILLE_FEM_SOLUTION::valide_parametre
virtual int valide_parametre(double *param)
Definition: fct_taille_fem_solution.cpp:94
FEM_NOEUD::get_solution
virtual double get_solution(int num=0)
Definition: fem_noeud.cpp:364
FEM_ELEMENT3::get_fonction_derive_interpolation
virtual double get_fonction_derive_interpolation(int num, int numvariable, double *uv)=0
BOITE_3D::get_xmax
double get_xmax(void)
Definition: ot_boite_3d.cpp:109
FEM_MAILLAGE
Definition: fem_maillage.h:66
FCT_TAILLE_FEM_SOLUTION::gest
MG_GESTIONNAIRE * gest
Definition: fct_taille_fem_solution.h:70
FCT_TAILLE_FEM_SOLUTION::numchamp
int numchamp
Definition: fct_taille_fem_solution.h:72
TPL_MAP_ENTITE::get_nb
virtual int get_nb(void)
Definition: tpl_map_entite.h:83
TPL_GRILLE::rechercher
virtual void rechercher(BOITE_3D bt, TPL_MAP_ENTITE< A > &liste_entite_trouve)
Definition: tpl_grille.h:202
FCT_TAILLE_FEM_SOLUTION::get_element3
FEM_ELEMENT3 * get_element3(double *param, double *uvw)
Definition: fct_taille_fem_solution.cpp:228
FEM_ELEMENT3::get_fonction_interpolation
virtual double get_fonction_interpolation(int num, double *uv)=0
tpl_grille.h
TPL_OCTREE::rechercher
virtual void rechercher(BOITE_3D &boite, TPL_MAP_ENTITE< A > &liste_entite_trouve, TPL_CELLULE_OCTREE< A, CONDITION > *cellule)
Definition: tpl_octree.h:606
FCT_TAILLE_FEM_SOLUTION::isotrope
bool isotrope
Definition: fct_taille_fem_solution.h:73
MG_GESTIONNAIRE::get_fem_maillage
FEM_MAILLAGE * get_fem_maillage(unsigned int num)
Definition: mg_gestionnaire.cpp:670
TPL_LISTE_ENTITE::ajouter
virtual void ajouter(X x)
Definition: tpl_liste_entite.h:38
MG_GESTIONNAIRE::get_nb_fem_maillage
unsigned int get_nb_fem_maillage(void)
Definition: mg_gestionnaire.cpp:683
FCT_TAILLE_FEM_SOLUTION::get_boite_3D
virtual BOITE_3D get_boite_3D(void)
Definition: fct_taille_fem_solution.cpp:308
TPL_MAP_ENTITE::ITERATEUR
std::map< unsigned long, X, std::less< unsigned long > >::iterator ITERATEUR
Definition: tpl_map_entite.h:38
FCT_TAILLE_FEM_SOLUTION::pasz
double pasz
Definition: fct_taille_fem_solution.h:78
BOITE_3D::reinit
void reinit(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)
Definition: ot_boite_3d.cpp:55
FEM_SOLUTION::lire
double lire(int i, int j, int coord=0, int num_no=0)
Definition: fem_solution.cpp:398
FCT_TAILLE_FEM_SOLUTION::evaluer
virtual void evaluer(double *param, double *resultat)
Definition: fct_taille_fem_solution.cpp:107
MG_FILE
Definition: mg_file.h:31
FEM_NOEUD::get_x
virtual double get_x(double coef=0.)
Definition: fem_noeud.cpp:205
BOITE_3D::get_ymax
double get_ymax(void)
Definition: ot_boite_3d.cpp:119
FEM_MAILLAGE::get_est_structure
bool get_est_structure(void)
Definition: fem_maillage.cpp:1820
FEM_NOEUD
Definition: fem_noeud.h:35
FCT_TAILLE_FEM_SOLUTION::enregistrer
virtual void enregistrer(char *nom)
Definition: fct_taille_fem_solution.cpp:337
OT_VECTEUR_3D
Definition: ot_mathematique.h:94
FCT_TAILLE_FEM_SOLUTION::boite_englobante
BOITE_3D boite_englobante
Definition: fct_taille_fem_solution.h:76
mailleur3d_structure.h
BOITE_3D
Definition: ot_boite_3d.h:27
FCT_TAILLE_FEM_SOLUTION::get_gestionnaire
virtual MG_GESTIONNAIRE * get_gestionnaire(void)
Definition: fct_taille_fem_solution.cpp:375
FCT_TAILLE_FEM_SOLUTION::nomfich
char nomfich[100]
Definition: fct_taille_fem_solution.h:81
FCT_TAILLE_FEM_SOLUTION::deriver
virtual void deriver(double *param, double *resultat, int num_param=0)
Definition: fct_taille_fem_solution.cpp:150
FCT_TAILLE_METRIQUE::evaluer_decompose
virtual void evaluer_decompose(double *metrique_depart, double *valeur_propre, double *vecteur_propre)
Definition: fct_taille_metrique.cpp:31
FEM_NOEUD::get_z
virtual double get_z(double coef=0.)
Definition: fem_noeud.cpp:215
FEM_MAILLAGE_OUTILS
Definition: fem_maillage_outils.h:56
sqrt
double2 sqrt(double2 &val)
Definition: ot_doubleprecision.cpp:345
FCT_TAILLE_FEM_SOLUTION::pasx
double pasx
Definition: fct_taille_fem_solution.h:78
fem_tetra4.h
FEM_ELEMENT3::get_type_entite
virtual int get_type_entite(void)=0
fct_taille_fem_solution.h
MAILLEUR3D_STRUCTURE::maille
virtual int maille(class MG_GROUPE_TOPOLOGIQUE *mggt=NULL)
Definition: mailleur3d_structure.cpp:116
FCT_TAILLE_FEM_SOLUTION::gest_alloue
bool gest_alloue
Definition: fct_taille_fem_solution.h:80
FCT_TAILLE_FEM_SOLUTION::get_num_champ
virtual int get_num_champ(void)
Definition: fct_taille_fem_solution.cpp:192
BOITE_3D::get_zmin
double get_zmin(void)
Definition: ot_boite_3d.cpp:124
BOITE_3D::contient
int contient(double x, double y, double z)
Definition: ot_boite_3d.cpp:270
OT_VECTEUR_3D::get_longueur
virtual double get_longueur(void) const
Definition: ot_mathematique.cpp:483
FEM_MAILLAGE::get_suivant_noeud
FEM_NOEUD * get_suivant_noeud(LISTE_FEM_NOEUD::iterator &it)
Definition: fem_maillage.cpp:182
TPL_LISTE_ENTITE
Definition: tpl_liste_entite.h:32
FCT_TAILLE_FEM_SOLUTION::ny
int ny
Definition: fct_taille_fem_solution.h:77
res
#define res(i, j)
FEM_ELEMENT3::get_boite_3D
virtual BOITE_3D & get_boite_3D(void)=0
MG_GESTIONNAIRE::get_nb_fem_solution
unsigned int get_nb_fem_solution(void)
Definition: mg_gestionnaire.cpp:960
BOITE_3D::change_grosseur
void change_grosseur(double f)
Definition: ot_boite_3d.cpp:176
MAGIC::TYPE_SOLUTION::SCALAIRE
@ SCALAIRE
Definition: mg_definition.h:93
TPL_MAP_ENTITE::get_suivant
virtual X get_suivant(ITERATEUR &it)
Definition: tpl_map_entite.h:120
FCT_TAILLE_FEM_SOLUTION::cree_octree
void cree_octree(void)
Definition: fct_taille_fem_solution.cpp:313
FCT_TAILLE_METRIQUE
Definition: fct_taille_metrique.h:29
TPL_GRILLE::initialiser
virtual void initialiser(double xmin, double ymin, double zmin, double xmax, double ymax, double zmax, int nb_pasx, int nb_pasy, int nb_pasz)
Definition: tpl_grille.h:142
FCT_TAILLE_FEM_SOLUTION::nz
int nz
Definition: fct_taille_fem_solution.h:77
FCT_TAILLE_FEM_SOLUTION::pasy
double pasy
Definition: fct_taille_fem_solution.h:78
FCT_TAILLE_FEM_SOLUTION::get_isotrope
virtual bool get_isotrope(void)
Definition: fct_taille_fem_solution.cpp:390
FEM_SOLUTION::change_legende
void change_legende(int num, std::string val)
Definition: fem_solution.cpp:457
TPL_OCTREE::initialiser
virtual void initialiser(TPL_LISTE_ENTITE< CONDITION > *lst_entite, int nombre, double xmin, double ymin, double zmin, double xmax, double ymax, double zmax)
Definition: tpl_octree.h:366
MAILLEUR3D_STRUCTURE
Definition: mailleur3d_structure.h:35
FCT_TAILLE_FEM_SOLUTION::octree
TPL_OCTREE< FEM_ELEMENT3 *, FEM_NOEUD * > octree
Definition: fct_taille_fem_solution.h:75
FEM_MAILLAGE::get_premier_element3
FEM_ELEMENT3 * get_premier_element3(LISTE_FEM_ELEMENT3::iterator &it)
Definition: fem_maillage.cpp:672
fem_maillage_outils.h
MAGIC::ENTITE_SOLUTION::ENTITE_NOEUD
@ ENTITE_NOEUD
Definition: mg_definition.h:86