MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
fct_taille_fem_solution_generateur_microstructure.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_generateur_microstructure.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 "ot_geometrie.h"
25 #include "tpl_grille.h"
26 #include <stack>
28  MG_GEOMETRIE* geotmp,
29  double dg,
30  double dg_eps_particule,
31  int fechantillon,
32  int nb_cellule_direction,
33  char* nomsolution,
34  TPL_MAP_ENTITE<MG_VOLUME*>& tpl_map_volume_matrice,
35  long nb_couche_min,
36  long nb_pas,
37  double facteur_augmentation): FCT_TAILLE_FEM_SOLUTION_GENERATEUR_ISOTROPE(gesttmp,
38  geotmp,
39  dg,
40  fechantillon,
41  nb_cellule_direction,
42  nb_cellule_direction,
43  nb_cellule_direction,
44  nomsolution)
45 {
46  m_nb_couche_min=nb_couche_min;
47  m_nb_pas=nb_pas;
48  m_nb_cellule_direction=nb_cellule_direction;
49  m_facteur_augmentation=facteur_augmentation;
50  m_dg_eps_particule=dg_eps_particule;
52  for(MG_VOLUME* volume=tpl_map_volume_matrice.get_premier(it_volume);volume!=NULL;volume=tpl_map_volume_matrice.get_suivant(it_volume))
53  {
55  }
56 
57 }
58 
60 {
62  m_nb_pas=mdd.m_nb_pas;
67  for(MG_VOLUME* volume=mdd.m_tpl_map_volume_matrice.get_premier(it_volume);volume!=NULL;volume=mdd.m_tpl_map_volume_matrice.get_suivant(it_volume))
68  {
70  }
71 }
72 
73 
75 {
76 
77 }
78 
80 {
82 }
83 
85 {
86  TPL_MAP_ENTITE<MG_SOMMET*> map_sommet_volume1;
87  OT_GEOMETRIE::get_map_mg_sommet_sous_jacent(mg_ele_topo1,map_sommet_volume1);
88  TPL_MAP_ENTITE<MG_SOMMET*> map_sommet_volume2;
89  OT_GEOMETRIE::get_map_mg_sommet_sous_jacent(mg_ele_topo2,map_sommet_volume2);
91  for(MG_SOMMET* sommet=map_sommet_volume1.get_premier(it_sommet);sommet!=NULL;sommet=map_sommet_volume1.get_suivant(it_sommet))
92  {
93  if(map_sommet_volume2.existe(sommet)) return true;
94  }
95  return false;
96 }
97 
98 
100 {
101  char message[500];
102  sprintf(message,"Creation des TPL_GRILLE");affiche(message);
103  cree_grille();
104  LISTE_FEM_ELEMENT3::iterator it_ele3;
105  for(FEM_ELEMENT3* ele3=fem->get_premier_element3(it_ele3);ele3!=NULL;ele3=fem->get_suivant_element3(it_ele3))
106  {
107  ele3->change_solution(ecart_nodal);
108  }
109  BOITE_3D boite3d_microstructure;
110  TPL_MAP_ENTITE<MG_FACE*> tpl_map_face_matrice;
111  TPL_MAP_ENTITE<MG_VOLUME*>::ITERATEUR it_tpl_map_volume;
112  MG_VOLUME* volume_matrice=m_tpl_map_volume_matrice.get_premier(it_tpl_map_volume);
113  boite3d_microstructure=volume_matrice->get_boite_3D();
114  for(;volume_matrice!=NULL;volume_matrice=m_tpl_map_volume_matrice.get_suivant(it_tpl_map_volume))
115  {
116  OT_GEOMETRIE::get_map_mg_face_sous_jacent(volume_matrice,tpl_map_face_matrice);
117  boite3d_microstructure=boite3d_microstructure+volume_matrice->get_boite_3D();
118  }
119  TPL_GRILLE<ELE_TOPO_GRILLE*> grille_ele_topo;
120  grille_ele_topo.initialiser(boite3d_microstructure.get_xmin(),boite3d_microstructure.get_ymin(),boite3d_microstructure.get_zmin(),
121  boite3d_microstructure.get_xmax(),boite3d_microstructure.get_ymax(),boite3d_microstructure.get_zmax(),
122  nx,ny,nz);
123  long id_ele_topo=0;
124  std::stack<ELE_TOPO_GRILLE*> stack_ele_topo_grille;
125  LISTE_MG_FACE::iterator it_face;
126  for(MG_FACE* face=geo->get_premier_face(it_face);face!=NULL;face=geo->get_suivant_face(it_face))
127  {
128  ELE_TOPO_GRILLE* ele_topo_grille=new ELE_TOPO_GRILLE(face,id_ele_topo); id_ele_topo++;
129  grille_ele_topo.inserer(ele_topo_grille);
130  stack_ele_topo_grille.push(ele_topo_grille);
131  }
132  LISTE_MG_ARETE::iterator it_arete;
133  for(MG_ARETE* arete=geo->get_premier_arete(it_arete);arete!=NULL;arete=geo->get_suivant_arete(it_arete))
134  {
135  ELE_TOPO_GRILLE* ele_topo_grille=new ELE_TOPO_GRILLE(arete,id_ele_topo); id_ele_topo++;
136  grille_ele_topo.inserer(ele_topo_grille);
137  stack_ele_topo_grille.push(ele_topo_grille);
138  }
139  LISTE_MG_SOMMET::iterator it_sommet;
140  for(MG_SOMMET* sommet=geo->get_premier_sommet(it_sommet);sommet!=NULL;sommet=geo->get_suivant_sommet(it_sommet))
141  {
142  ELE_TOPO_GRILLE* ele_topo_grille=new ELE_TOPO_GRILLE(sommet,id_ele_topo); id_ele_topo++;
143  grille_ele_topo.inserer(ele_topo_grille);
144  stack_ele_topo_grille.push(ele_topo_grille);
145  }
146  sprintf(message,"Echantionnage : Topo - Topo");affiche(message);
147  double nb_ele_topo_grille=stack_ele_topo_grille.size();
148  while(!stack_ele_topo_grille.empty())
149  {
150  sprintf(message,"\033[1A\033[KEchantionnage : Topo - Topo [%.2lf%%]",((nb_ele_topo_grille-stack_ele_topo_grille.size())/nb_ele_topo_grille)*100.0);affiche(message);
151  ELE_TOPO_GRILLE* ele_topo_grille=stack_ele_topo_grille.top(); stack_ele_topo_grille.pop();
152  TPL_MAP_ENTITE<ELE_TOPO_GRILLE*> tpl_map_topo_grille_trouve;
153  BOITE_3D boite_recherche(ele_topo_grille->get_boite_3D().get_xmin()-m_nb_couche_min*ecart_nodal,
154  ele_topo_grille->get_boite_3D().get_ymin()-m_nb_couche_min*ecart_nodal,
155  ele_topo_grille->get_boite_3D().get_zmin()-m_nb_couche_min*ecart_nodal,
156  ele_topo_grille->get_boite_3D().get_xmax()+m_nb_couche_min*ecart_nodal,
157  ele_topo_grille->get_boite_3D().get_ymax()+m_nb_couche_min*ecart_nodal,
158  ele_topo_grille->get_boite_3D().get_zmax()+m_nb_couche_min*ecart_nodal);
159  grille_ele_topo.rechercher(boite_recherche,tpl_map_topo_grille_trouve);
161  for(ELE_TOPO_GRILLE* ele_topo_grille_trouve=tpl_map_topo_grille_trouve.get_premier(it_trouve);ele_topo_grille_trouve!=NULL;ele_topo_grille_trouve=tpl_map_topo_grille_trouve.get_suivant(it_trouve))
162  {
163  if(ele_topo_grille==ele_topo_grille_trouve) continue;
164  MG_ELEMENT_TOPOLOGIQUE* ele_topo=ele_topo_grille->get_mgeletopo();
165  MG_ELEMENT_TOPOLOGIQUE* ele_topo_trouve=ele_topo_grille_trouve->get_mgeletopo();
166  if(OT_GEOMETRIE::get_lien_topologique(ele_topo,ele_topo_trouve)==OT_GEOMETRIE::TYPE_LIEN_TOPOLOGIQUE::AUCUN)
167  {
168  echantillonnage_ele_topo_ele_topo(ele_topo,ele_topo_trouve);
169  }
170  }
171  grille_ele_topo.supprimer(ele_topo_grille);
172  delete ele_topo_grille;
173  }
174  sprintf(message,"\033[1A\033[KEchantionnage : Topo - Topo [%.2lf%%]",((nb_ele_topo_grille-stack_ele_topo_grille.size())/nb_ele_topo_grille)*100.0);affiche(message);
175  //if(fabs(ecart_nodal-m_dg_face_particule)>0.00001)
176  {
177  sprintf(message,"Echantionnage : Courbure");affiche(message);
179  long i_volume=0;
180  LISTE_MG_VOLUME::iterator it_volume;
181  for(MG_VOLUME* volume=geo->get_premier_volume(it_volume);volume!=NULL;volume=geo->get_suivant_volume(it_volume))
182  {
183  if(!m_tpl_map_volume_matrice.existe(volume))
184  {
185  sprintf(message,"\033[1A\033[KEchantionnage : Courbure [%.2lf%%]",100.0*i_volume/nb_volume);affiche(message);
186  TPL_MAP_ENTITE<MG_ARETE*> tpl_map_arete;
188  OT_GEOMETRIE::get_map_mg_arete_sous_jacent(volume,tpl_map_arete);
189  for(MG_ARETE* arete=tpl_map_arete.get_premier(it_a);arete!=NULL;arete=tpl_map_arete.get_suivant(it_a))
190  {
191  echantillonnage_arete(arete);
192  }
193  TPL_MAP_ENTITE<MG_FACE*> tpl_map_face;
195  OT_GEOMETRIE::get_map_mg_face_sous_jacent(volume,tpl_map_face);
196  for(MG_FACE* face=tpl_map_face.get_premier(it_f);face!=NULL;face=tpl_map_face.get_suivant(it_f))
197  {
198  echantillonnage_face(face);
199  }
200  i_volume++;
201  }
202  }
203  sprintf(message,"\033[1A\033[KEchantionnage : Courbure [%.2lf%%]",100.0*i_volume/nb_volume);affiche(message);
204  }
205  sprintf(message,"Lissage de la solution");affiche(message);
206  lisser_solution();
207  sprintf(message,"Extrapolation aux noeuds");affiche(message);
209  int i=0;
210  LISTE_FEM_NOEUD::iterator it;
211  for (FEM_NOEUD* nod=fem->get_premier_noeud(it);nod!=NULL;nod=fem->get_suivant_noeud(it))
212  {
213  double ecartt=nod->get_solution(0);
214  sol->ecrire(1.0/ecartt/ecartt,i,0,0);
215  sol->ecrire(0.0,i,0,1);
216  sol->ecrire(0.0,i,0,2);
217  sol->ecrire(0.0,i,0,3);
218  sol->ecrire(1./ecartt/ecartt,i,0,4);
219  sol->ecrire(0.0,i,0,5);
220  sol->ecrire(0.0,i,0,6);
221  sol->ecrire(0.0,i,0,7);
222  sol->ecrire(1./ecartt/ecartt,i,0,8);
223  i++;
224  }
225  return OK;
226 }
227 
228 
229 
230 
232 {
233  if(eletopo1->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::FACE && eletopo2->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::FACE)
234  {
235  echantillonnage_face_face((MG_FACE*)eletopo1,(MG_FACE*)eletopo2);
236  }
237  else if(eletopo1->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::ARETE && eletopo2->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::FACE)
238  {
239  echantillonnage_arete_face((MG_ARETE*)eletopo1,(MG_FACE*)eletopo2);
240  }
241  else if(eletopo1->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::FACE && eletopo2->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::ARETE)
242  {
243  echantillonnage_arete_face((MG_ARETE*)eletopo2,(MG_FACE*)eletopo1);
244  }
245  else if(eletopo1->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::SOMMET && eletopo2->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::FACE)
246  {
247  echantillonnage_sommet_face((MG_SOMMET*)eletopo1,(MG_FACE*)eletopo2);
248  }
249  else if(eletopo1->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::FACE && eletopo2->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::SOMMET)
250  {
251  echantillonnage_sommet_face((MG_SOMMET*)eletopo2,(MG_FACE*)eletopo1);
252  }
253  else if(eletopo1->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::ARETE && eletopo2->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::ARETE)
254  {
255  echantillonnage_arete_arete((MG_ARETE*)eletopo1,(MG_ARETE*)eletopo2);
256  }
257  else if(eletopo1->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::SOMMET && eletopo2->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::ARETE)
258  {
259  echantillonnage_sommet_arete((MG_SOMMET*)eletopo1,(MG_ARETE*)eletopo2);
260  }
261  else if(eletopo1->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::ARETE && eletopo2->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::SOMMET)
262  {
263  echantillonnage_sommet_arete((MG_SOMMET*)eletopo2,(MG_ARETE*)eletopo1);
264  }
265  else if(eletopo1->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::SOMMET && eletopo2->get_type()==MG_ELEMENT_TOPOLOGIQUE::TYPE_ELEMENT_TOPOLOGIQUE::SOMMET)
266  {
267  echantillonnage_sommet_sommet((MG_SOMMET*)eletopo1,(MG_SOMMET*)eletopo2);
268  }
269 }
270 
272 {
273  double distance_min;
274  if(OT_GEOMETRIE::get_distance_min_mg_face_mg_face(mgface1,mgface2,distance_min)==OK)
275  {
276  if((distance_min/ecart_nodal)>m_nb_couche_min) return;
277  }
278  double umin,umax,vmin,vmax;
279  OT_GEOMETRIE::get_param_face(mgface1,umin,umax,vmin,vmax);
280  if(mgface1->get_surface()->est_periodique_u())
281  {
282  umin=0;
283  umax=mgface1->get_surface()->get_periode_u();
284  }
285  if(mgface1->get_surface()->est_periodique_v())
286  {
287  vmin=0;
288  vmax=mgface1->get_surface()->get_periode_v();
289  }
290  double pas_u = (umax-umin)/m_nb_pas;
291  double pas_v = (vmax-vmin)/m_nb_pas;
292  double uv1[2];
293  /*for(long i=0;i<m_nb_pas;i++)
294  {
295  uv1[0]=umin+i*pas_u;
296  for(long j=0;j<m_nb_pas;j++)
297  {
298  uv1[1] = vmin+j*pas_v;
299  double xyz1[3];
300  mgface1->evaluer(uv1,xyz1);
301  if(OT_GEOMETRIE::est_dans_mg_face(xyz1,mgface1)==FAIL) continue;*/
302  std::vector<double> lstechan;
303  mgface1->get_echantillonnage(m_nb_pas*m_nb_pas,lstechan);
304  for(long i=0;i<lstechan.size()/5;i++)
305  {
306  double xyz1[3]={lstechan[5*i],lstechan[5*i+1],lstechan[5*i+2]};
307  double xyz2[3];
308  if(OT_GEOMETRIE::projection_au_plus_pres_sur_mg_face(xyz1,mgface1,mgface2,xyz2)==OK)
309  {
310  double dist = sqrt((xyz2[0]-xyz1[0])*(xyz2[0]-xyz1[0])+(xyz2[1]-xyz1[1])*(xyz2[1]-xyz1[1])+(xyz2[2]-xyz1[2])*(xyz2[2]-xyz1[2]));
311  if((dist/ecart_nodal)<m_nb_couche_min)
312  {
313  double En_local = dist/m_nb_couche_min;
314  TPL_MAP_ENTITE<FEM_ELEMENT3*> tpl_map_ele3;
315  get_fem_ele3_droite(xyz1,xyz2,tpl_map_ele3,8);
317  for(FEM_ELEMENT3* ele3=tpl_map_ele3.get_premier(it_ele3);ele3!=NULL;ele3=tpl_map_ele3.get_suivant(it_ele3))
318  {
319  if(ele3->get_solution(0)>En_local)
320  {
321  ele3->change_solution(En_local);
322  m_map_fem_ele3.insert(std::pair<FEM_ELEMENT3*,FEM_ELEMENT3*>(ele3,ele3));
323  }
324  }
325  }
326  }
327  }
328  //}
329 }
330 
332 {
333  double distance_min;
334  if(OT_GEOMETRIE::get_distance_min_mg_eletopo_mg_eletopo(mgarete,mgface,distance_min)==OK)
335  {
336  if((distance_min/ecart_nodal)>m_nb_couche_min) return;
337  }
338  double umin,umax,vmin,vmax;
339  OT_GEOMETRIE::get_param_face(mgface,umin,umax,vmin,vmax);
340  if(mgface->get_surface()->est_periodique_u())
341  {
342  umin=0;
343  umax=mgface->get_surface()->get_periode_u();
344  }
345  if(mgface->get_surface()->est_periodique_v())
346  {
347  vmin=0;
348  vmax=mgface->get_surface()->get_periode_v();
349  }
350  double pas_u = (umax-umin)/m_nb_pas;
351  double pas_v = (vmax-vmin)/m_nb_pas;
352  double uv1[2];
353  /*for(long i=0;i<m_nb_pas;i++)
354  {
355  uv1[0]=umin+i*pas_u;
356  for(long j=0;j<m_nb_pas;j++)
357  {
358  uv1[1] = vmin+j*pas_v;
359  double xyz1[3];
360  mgface->evaluer(uv1,xyz1);
361  if(OT_GEOMETRIE::est_dans_mg_face(xyz1,mgface)==FAIL) continue;*/
362  std::vector<double> lstechan;
363  mgface->get_echantillonnage(m_nb_pas*m_nb_pas,lstechan);
364  for(long i=0;i<lstechan.size()/5;i++)
365  {
366  double xyz1[3]={lstechan[5*i],lstechan[5*i+1],lstechan[5*i+2]};
367  double xyz2[3];
369  {
370  double dist = sqrt((xyz2[0]-xyz1[0])*(xyz2[0]-xyz1[0])+(xyz2[1]-xyz1[1])*(xyz2[1]-xyz1[1])+(xyz2[2]-xyz1[2])*(xyz2[2]-xyz1[2]));
371  if((dist/ecart_nodal)<m_nb_couche_min)
372  {
373  double En_local = dist/m_nb_couche_min;
374  TPL_MAP_ENTITE<FEM_ELEMENT3*> tpl_map_ele3;
375  get_fem_ele3_droite(xyz1,xyz2,tpl_map_ele3,8);
377  for(FEM_ELEMENT3* ele3=tpl_map_ele3.get_premier(it_ele3);ele3!=NULL;ele3=tpl_map_ele3.get_suivant(it_ele3))
378  {
379  if(ele3->get_solution(0)>En_local)
380  {
381  ele3->change_solution(En_local);
382  m_map_fem_ele3.insert(std::pair<FEM_ELEMENT3*,FEM_ELEMENT3*>(ele3,ele3));
383  }
384  }
385  }
386  }
387  }
388  //}
389 }
390 
392 {
393  double distance_min;
394  if(OT_GEOMETRIE::get_distance_min_mg_eletopo_mg_eletopo(mgsommet,mgface,distance_min)==OK)
395  {
396  if((distance_min/ecart_nodal)>m_nb_couche_min) return;
397  }
398  double umin,umax,vmin,vmax;
399  OT_GEOMETRIE::get_param_face(mgface,umin,umax,vmin,vmax);
400  if(mgface->get_surface()->est_periodique_u())
401  {
402  umin=0;
403  umax=mgface->get_surface()->get_periode_u();
404  }
405  if(mgface->get_surface()->est_periodique_v())
406  {
407  vmin=0;
408  vmax=mgface->get_surface()->get_periode_v();
409  }
410  double pas_u = (umax-umin)/m_nb_pas;
411  double pas_v = (vmax-vmin)/m_nb_pas;
412  double uv1[2];
413  double xyz2[3];
414  mgsommet->get_point()->evaluer(xyz2);
415  /* for(long i=0;i<m_nb_pas;i++)
416  {
417  uv1[0]=umin+i*pas_u;
418  for(long j=0;j<m_nb_pas;j++)
419  {
420  uv1[1] = vmin+j*pas_v;
421  double xyz1[3];
422  mgface->evaluer(uv1,xyz1);
423  if(OT_GEOMETRIE::est_dans_mg_face(xyz1,mgface)==FAIL) continue;*/
424  std::vector<double> lstechan;
425  mgface->get_echantillonnage(m_nb_pas*m_nb_pas,lstechan);
426  for(long i=0;i<lstechan.size()/5;i++)
427  {
428  double xyz1[3]={lstechan[5*i],lstechan[5*i+1],lstechan[5*i+2]};
429  double dist = sqrt((xyz2[0]-xyz1[0])*(xyz2[0]-xyz1[0])+(xyz2[1]-xyz1[1])*(xyz2[1]-xyz1[1])+(xyz2[2]-xyz1[2])*(xyz2[2]-xyz1[2]));
430  if((dist/ecart_nodal)<m_nb_couche_min || (mgsommet->est_pole() && (dist/ecart_nodal)<2.0))
431  {
432  double En_local;
433  if(mgsommet->est_pole())
434  {
435  En_local=dist/2.5;
436  if((dist/m_nb_couche_min)<En_local) En_local=dist/m_nb_couche_min;
437  }
438  else En_local=dist/m_nb_couche_min;
439  TPL_MAP_ENTITE<FEM_ELEMENT3*> tpl_map_ele3;
440  get_fem_ele3_droite(xyz1,xyz2,tpl_map_ele3,8);
442  for(FEM_ELEMENT3* ele3=tpl_map_ele3.get_premier(it_ele3);ele3!=NULL;ele3=tpl_map_ele3.get_suivant(it_ele3))
443  {
444  if(ele3->get_solution(0)>En_local)
445  {
446  ele3->change_solution(En_local);
447  m_map_fem_ele3.insert(std::pair<FEM_ELEMENT3*,FEM_ELEMENT3*>(ele3,ele3));
448  }
449  }
450  }
451  }
452  //}
453 }
454 
456 {
457  double distance_min;
458  if(OT_GEOMETRIE::get_distance_min_mg_eletopo_mg_eletopo(mgarete1,mgarete2,distance_min)==OK)
459  {
460  if((distance_min/ecart_nodal)>m_nb_couche_min) return;
461  }
462  double tmin=mgarete1->get_tmin();
463  double tmax=mgarete1->get_tmax();
464  double pas_t = (tmax-tmin)/m_nb_pas;
465  for(long i=0;i<m_nb_pas;i++)
466  {
467  double t = tmin+i*pas_t;
468  double xyz1[3];
469  mgarete1->evaluer(t,xyz1);
470  double xyz2[3];
472  {
473  double dist = sqrt((xyz2[0]-xyz1[0])*(xyz2[0]-xyz1[0])+(xyz2[1]-xyz1[1])*(xyz2[1]-xyz1[1])+(xyz2[2]-xyz1[2])*(xyz2[2]-xyz1[2]));
474  if((dist/ecart_nodal)<m_nb_couche_min)
475  {
476  double En_local = dist/m_nb_couche_min;
477  TPL_MAP_ENTITE<FEM_ELEMENT3*> tpl_map_ele3;
478  get_fem_ele3_droite(xyz1,xyz2,tpl_map_ele3,8);
480  for(FEM_ELEMENT3* ele3=tpl_map_ele3.get_premier(it_ele3);ele3!=NULL;ele3=tpl_map_ele3.get_suivant(it_ele3))
481  {
482  if(ele3->get_solution(0)>En_local)
483  {
484  ele3->change_solution(En_local);
485  m_map_fem_ele3.insert(std::pair<FEM_ELEMENT3*,FEM_ELEMENT3*>(ele3,ele3));
486  }
487  }
488  }
489  }
490  }
491 }
492 
494 {
495  double distance_min;
496  if(OT_GEOMETRIE::get_distance_min_mg_eletopo_mg_eletopo(mgsommet,mgarete,distance_min)==OK)
497  {
498  if((distance_min/ecart_nodal)>m_nb_couche_min) return;
499  }
500  double tmin=mgarete->get_tmin();
501  double tmax=mgarete->get_tmax();
502  double pas_t = (tmax-tmin)/m_nb_pas;
503  double xyz2[3];
504  mgsommet->get_point()->evaluer(xyz2);
505  for(long i=0;i<m_nb_pas;i++)
506  {
507  double t = tmin+i*pas_t;
508  double xyz1[3];
509  mgarete->evaluer(t,xyz1);
510  double dist = sqrt((xyz2[0]-xyz1[0])*(xyz2[0]-xyz1[0])+(xyz2[1]-xyz1[1])*(xyz2[1]-xyz1[1])+(xyz2[2]-xyz1[2])*(xyz2[2]-xyz1[2]));
511  if((dist/ecart_nodal)<m_nb_couche_min || (mgsommet->est_pole() && (dist/ecart_nodal)<2.0))
512  {
513  double En_local;
514  if(mgsommet->est_pole())
515  {
516  En_local=dist/2.5;
517  if((dist/m_nb_couche_min)<En_local) En_local=dist/m_nb_couche_min;
518  }
519  else En_local=dist/m_nb_couche_min;
520  TPL_MAP_ENTITE<FEM_ELEMENT3*> tpl_map_ele3;
521  get_fem_ele3_droite(xyz1,xyz2,tpl_map_ele3,8);
523  for(FEM_ELEMENT3* ele3=tpl_map_ele3.get_premier(it_ele3);ele3!=NULL;ele3=tpl_map_ele3.get_suivant(it_ele3))
524  {
525  if(ele3->get_solution(0)>En_local)
526  {
527  ele3->change_solution(En_local);
528  m_map_fem_ele3.insert(std::pair<FEM_ELEMENT3*,FEM_ELEMENT3*>(ele3,ele3));
529  }
530  }
531  }
532  }
533 }
534 
536 {
537  double xyz1[3];
538  double xyz2[3];
539  mgsommet1->get_point()->evaluer(xyz1);
540  mgsommet2->get_point()->evaluer(xyz2);
541  double dist = sqrt((xyz2[0]-xyz1[0])*(xyz2[0]-xyz1[0])+(xyz2[1]-xyz1[1])*(xyz2[1]-xyz1[1])+(xyz2[2]-xyz1[2])*(xyz2[2]-xyz1[2]));
542  if((dist/ecart_nodal)<m_nb_couche_min || ((mgsommet1->est_pole() || mgsommet2->est_pole())&& (dist/ecart_nodal)<2.0))
543  {
544  double En_local;
545  if(mgsommet1->est_pole() || mgsommet2->est_pole())
546  {
547  En_local=dist/3.0;
548  if((dist/m_nb_couche_min)<En_local) En_local=dist/m_nb_couche_min;
549  }
550  else En_local=dist/m_nb_couche_min;
551  TPL_MAP_ENTITE<FEM_ELEMENT3*> tpl_map_ele3;
552  get_fem_ele3_droite(xyz1,xyz2,tpl_map_ele3,8);
554  for(FEM_ELEMENT3* ele3=tpl_map_ele3.get_premier(it_ele3);ele3!=NULL;ele3=tpl_map_ele3.get_suivant(it_ele3))
555  {
556  if(ele3->get_solution(0)>En_local)
557  {
558  ele3->change_solution(En_local);
559  m_map_fem_ele3.insert(std::pair<FEM_ELEMENT3*,FEM_ELEMENT3*>(ele3,ele3));
560  }
561  }
562  }
563 }
564 
565 
567 {
568  double tmin=mgarete->get_tmin();
569  double tmax=mgarete->get_tmax();
570 
571 
572  for(long i=0;i<m_nb_pas+1;i++)
573  {
574  double t=tmin+i*1.0/m_nb_pas*(tmax-tmin);
575  double xyz[3];
576  mgarete->evaluer(t,xyz);
577  TPL_CELLULE_GRILLE<FEM_ELEMENT3*> *cellule=m_grille_ele3.get_cellule(xyz[0],xyz[1],xyz[2]);
578  if(cellule!=NULL)
579  {
580  FEM_ELEMENT3* ele3 = cellule->get_entite(0);
581  double cmax=mgarete->get_M(t);
582  double m_dg_face_particule=sqrt(8.*m_dg_eps_particule/cmax/cmax);
583  if(ele3->get_solution(0)>m_dg_face_particule)
584  {
585  ele3->change_solution(m_dg_face_particule);
586  m_map_fem_ele3.insert(std::pair<FEM_ELEMENT3*,FEM_ELEMENT3*>(ele3,ele3));
587  }
588  }
589  }
590 }
591 
593 {
594  std::vector<double> lstechan;
595  mgface->get_echantillonnage(m_nb_pas*m_nb_pas,lstechan);
596  for(long i=0;i<lstechan.size()/5;i++)
597  {
598  double xyz[3]={lstechan[5*i],lstechan[5*i+1],lstechan[5*i+2]};
599  TPL_CELLULE_GRILLE<FEM_ELEMENT3*> *cellule=m_grille_ele3.get_cellule(xyz[0],xyz[1],xyz[2]);
600  if(cellule!=NULL)
601  {
602  FEM_ELEMENT3* ele3 = cellule->get_entite(0);
603  double uv[2]={lstechan[5*i+3],lstechan[5*i+4]};
604  double cmax,cmin;
605  mgface->get_courbure(uv,cmax,cmin);
606  double m_dg_face_particule=sqrt(8.*m_dg_eps_particule/cmax/cmax);
607  if(ele3->get_solution(0)>m_dg_face_particule)
608  {
609  ele3->change_solution(m_dg_face_particule);
610  m_map_fem_ele3.insert(std::pair<FEM_ELEMENT3*,FEM_ELEMENT3*>(ele3,ele3));
611  }
612  }
613  }
614  //}
615 }
616 
618 {
619  LISTE_FEM_NOEUD::iterator itn;
620  double xmin=1e308,ymin=1e308,zmin=1e308,xmax=-1e308,ymax=-1e308,zmax=-1e308;
621  for (FEM_NOEUD* no=fem->get_premier_noeud(itn);no!=NULL;no=fem->get_suivant_noeud(itn))
622  {
623  if (no->get_x()>xmax) xmax=no->get_x();
624  if (no->get_y()>ymax) ymax=no->get_y();
625  if (no->get_z()>zmax) zmax=no->get_z();
626  if (no->get_x()<xmin) xmin=no->get_x();
627  if (no->get_y()<ymin) ymin=no->get_y();
628  if (no->get_z()<zmin) zmin=no->get_z();
629  }
630  double pas = (xmax-xmin)/nx;
631  double facteur_augmentation_distance = m_facteur_augmentation/nx;
632 
633  while(!m_map_fem_ele3.empty())
634  {
635  std::map<FEM_ELEMENT3*,FEM_ELEMENT3*>::iterator it_map_ele3;
636  it_map_ele3 = m_map_fem_ele3.begin();
637  FEM_ELEMENT3* ele3=it_map_ele3->second;
638  double ecart_recherche=ecart_nodal+1000;
639  for(;it_map_ele3!=m_map_fem_ele3.end();it_map_ele3++)
640  {
641  if(it_map_ele3->second->get_solution(0)<ecart_recherche)
642  {
643  ele3=it_map_ele3->second;
644  ecart_recherche=ele3->get_solution(0);
645  }
646  }
647  double centre[3];
648  ele3->get_boite_3D().get_centre(centre);
649  double en_centre=ele3->get_solution(0);
650  TPL_CELLULE_GRILLE<FEM_ELEMENT3*> *tab_cell[26];
651  for(int i=0;i<26;i++)tab_cell[i]=NULL;
652 
653  tab_cell[0] = m_grille_ele3.get_cellule(centre[0]-pas,centre[1]-pas,centre[2]-pas);
654  tab_cell[1] = m_grille_ele3.get_cellule(centre[0],centre[1]-pas,centre[2]-pas);
655  tab_cell[2] = m_grille_ele3.get_cellule(centre[0]+pas,centre[1]-pas,centre[2]-pas);
656  tab_cell[3] = m_grille_ele3.get_cellule(centre[0]-pas,centre[1],centre[2]-pas);
657  tab_cell[4] = m_grille_ele3.get_cellule(centre[0],centre[1],centre[2]-pas);
658  tab_cell[5] = m_grille_ele3.get_cellule(centre[0]+pas,centre[1],centre[2]-pas);
659  tab_cell[6] = m_grille_ele3.get_cellule(centre[0]-pas,centre[1]+pas,centre[2]-pas);
660  tab_cell[7] = m_grille_ele3.get_cellule(centre[0],centre[1]+pas,centre[2]-pas);
661  tab_cell[8] = m_grille_ele3.get_cellule(centre[0]+pas,centre[1]+pas,centre[2]-pas);
662 
663  tab_cell[9] = m_grille_ele3.get_cellule(centre[0]-pas,centre[1]-pas,centre[2]);
664  tab_cell[10] = m_grille_ele3.get_cellule(centre[0],centre[1]-pas,centre[2]);
665  tab_cell[11] = m_grille_ele3.get_cellule(centre[0]+pas,centre[1]-pas,centre[2]);
666  tab_cell[12] = m_grille_ele3.get_cellule(centre[0]-pas,centre[1],centre[2]);
667  tab_cell[13] = m_grille_ele3.get_cellule(centre[0]+pas,centre[1],centre[2]);
668  tab_cell[14] = m_grille_ele3.get_cellule(centre[0]-pas,centre[1]+pas,centre[2]);
669  tab_cell[15] = m_grille_ele3.get_cellule(centre[0],centre[1]+pas,centre[2]);
670  tab_cell[16] = m_grille_ele3.get_cellule(centre[0]+pas,centre[1]+pas,centre[2]);
671 
672  tab_cell[17] = m_grille_ele3.get_cellule(centre[0]-pas,centre[1]-pas,centre[2]+pas);
673  tab_cell[18] = m_grille_ele3.get_cellule(centre[0],centre[1]-pas,centre[2]+pas);
674  tab_cell[19] = m_grille_ele3.get_cellule(centre[0]+pas,centre[1]-pas,centre[2]+pas);
675  tab_cell[20] = m_grille_ele3.get_cellule(centre[0]-pas,centre[1],centre[2]+pas);
676  tab_cell[21] = m_grille_ele3.get_cellule(centre[0],centre[1],centre[2]+pas);
677  tab_cell[22] = m_grille_ele3.get_cellule(centre[0]+pas,centre[1],centre[2]+pas);
678  tab_cell[23] = m_grille_ele3.get_cellule(centre[0]-pas,centre[1]+pas,centre[2]+pas);
679  tab_cell[24] = m_grille_ele3.get_cellule(centre[0],centre[1]+pas,centre[2]+pas);
680  tab_cell[25] = m_grille_ele3.get_cellule(centre[0]+pas,centre[1]+pas,centre[2]+pas);
681  for(int i=0;i<26;i++)
682  {
683  if(tab_cell[i]!=NULL)
684  if(tab_cell[i]->get_nb_entite()==1)
685  {
686  FEM_ELEMENT3* ele3_voisin = tab_cell[i]->get_entite(0);
687  if(ele3_voisin->get_solution(0)>en_centre*(1.+facteur_augmentation_distance))
688  {
689  ele3_voisin->change_solution(en_centre*(1.+facteur_augmentation_distance));
690  m_map_fem_ele3.insert(std::pair<FEM_ELEMENT3*,FEM_ELEMENT3*>(ele3_voisin,ele3_voisin));
691  }
692  }
693  }
694  m_map_fem_ele3.erase(ele3);
695  }
696 }
697 
699 {
700  LISTE_FEM_NOEUD::iterator it_fem_nd;
701  for(FEM_NOEUD* femnd=fem->get_premier_noeud(it_fem_nd);femnd!=NULL;femnd=fem->get_suivant_noeud(it_fem_nd))
702  {
703  double ecart_nodal_noeud=0.0;
704  TPL_LISTE_ENTITE<FEM_ELEMENT3*> *liste_fem_element3;
705  liste_fem_element3 = femnd->get_lien_element3();
706  for(int i=0;i<liste_fem_element3->get_nb();i++)
707  {
708  ecart_nodal_noeud+=liste_fem_element3->get(i)->get_solution(0);
709  }
710  ecart_nodal_noeud=ecart_nodal_noeud/liste_fem_element3->get_nb();
711  femnd->change_solution(ecart_nodal_noeud);
712  }
713 }
714 
716 {
717  LISTE_FEM_NOEUD::iterator itn;
718  double xmin=1e308,ymin=1e308,zmin=1e308,xmax=-1e308,ymax=-1e308,zmax=-1e308;
719  for (FEM_NOEUD* no=fem->get_premier_noeud(itn);no!=NULL;no=fem->get_suivant_noeud(itn))
720  {
721  if (no->get_x()>xmax) xmax=no->get_x();
722  if (no->get_y()>ymax) ymax=no->get_y();
723  if (no->get_z()>zmax) zmax=no->get_z();
724  if (no->get_x()<xmin) xmin=no->get_x();
725  if (no->get_y()<ymin) ymin=no->get_y();
726  if (no->get_z()<zmin) zmin=no->get_z();
727  }
729  ymin,
730  zmin,
731  xmax,
732  ymax,
733  zmax,
734  nx,ny,nz);
735  double pas = (xmax-xmin)/nx;
736  LISTE_FEM_ELEMENT3::iterator it_ele3;
737  for(FEM_ELEMENT3* ele3=fem->get_premier_element3(it_ele3);ele3!=NULL;ele3=fem->get_suivant_element3(it_ele3))
738  {
739  double centre[3];
740  ele3->get_boite_3D().get_centre(centre);
741  TPL_CELLULE_GRILLE<FEM_ELEMENT3*>* cellule = m_grille_ele3.get_cellule(centre[0],centre[1],centre[2]);
742  cellule->lst_entite_A.ajouter(ele3);
743  }
744 }
745 
746 
748 {
749  double t=0;
750  double dt=1.0/nb_pas;
751  double xyz[3];
752  double dxyz[3];
753  dxyz[0]=xyz2[0]-xyz1[0];
754  dxyz[1]=xyz2[1]-xyz1[1];
755  dxyz[2]=xyz2[2]-xyz1[2];
756  for(int i=0;i<nb_pas+1;i++)
757  {
758  xyz[0]=xyz1[0]+t*dxyz[0];
759  xyz[1]=xyz1[1]+t*dxyz[1];
760  xyz[2]=xyz1[2]+t*dxyz[2];
761  TPL_CELLULE_GRILLE<FEM_ELEMENT3*>* cellule = m_grille_ele3.get_cellule(xyz[0],xyz[1],xyz[2]);
762  if(cellule!=NULL) tpl_map_ele3.ajouter(cellule->get_entite(0));
763  t+=dt;
764  }
765 }
766 
767 
768 
769 
770 
771 
772 
773 
774 
775 
776 
777 
778 
779 
780 
781 
782 
783 
784 
785 
786 
787 
788 
789 
790 
791 
792 
793 
794 
795 
796 
797 
798 
TPL_CELLULE_GRILLE
Definition: tpl_grille.h:70
TPL_MAP_ENTITE::get_premier
virtual X get_premier(ITERATEUR &it)
Definition: tpl_map_entite.h:112
OT_GEOMETRIE::projection_au_plus_pres_sur_mg_face
static int projection_au_plus_pres_sur_mg_face(double *xyz1, MG_FACE *mgface1, MG_FACE *mgface2, double *xyz2)
Definition: ot_geometrie.cpp:191
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::m_nb_pas
long m_nb_pas
Definition: fct_taille_fem_solution_generateur_microstructure.h:66
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
ot_geometrie.h
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage_ele_topo_ele_topo
void echantillonnage_ele_topo_ele_topo(MG_ELEMENT_TOPOLOGIQUE *eletopo1, MG_ELEMENT_TOPOLOGIQUE *eletopo2)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:231
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::m_dg_eps_particule
double m_dg_eps_particule
Definition: fct_taille_fem_solution_generateur_microstructure.h:68
gestionversion.h
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::m_map_fem_ele3
std::map< FEM_ELEMENT3 *, FEM_ELEMENT3 * > m_map_fem_ele3
Definition: fct_taille_fem_solution_generateur_microstructure.h:70
MG_SURFACE::get_periode_u
virtual double get_periode_u(void)=0
TPL_MAP_ENTITE< MG_VOLUME * >
OT_GEOMETRIE::projection_au_plus_pres_sur_mg_arete
static int projection_au_plus_pres_sur_mg_arete(double *xyz, MG_ARETE *mgarete, double *xyz2)
Definition: ot_geometrie.cpp:225
MG_ARETE::evaluer
virtual void evaluer(double t, double *xyz)
Definition: mg_arete.cpp:143
BOITE_3D::get_xmin
double get_xmin(void)
Definition: ot_boite_3d.cpp:104
MG_GEOMETRIE::get_suivant_volume
MG_VOLUME * get_suivant_volume(LISTE_MG_VOLUME::iterator &it)
Definition: mg_geometrie.cpp:1702
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage_sommet_face
void echantillonnage_sommet_face(MG_SOMMET *mgsommet, MG_FACE *mgface)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:391
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage_arete_face
void echantillonnage_arete_face(MG_ARETE *mgarete, MG_FACE *mgface)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:331
OT_GEOMETRIE::get_map_mg_sommet_sous_jacent
static void get_map_mg_sommet_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_SOMMET * > &map_sommet)
Definition: ot_geometrie.cpp:572
ELE_TOPO_GRILLE
Definition: fct_taille_fem_solution_generateur_microstructure.h:75
FEM_ELEMENT_MAILLAGE::change_solution
virtual void change_solution(double val, int num=0)
Definition: fem_element_maillage.cpp:107
TPL_GRILLE::inserer
virtual void inserer(A a)
Definition: tpl_grille.h:274
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::m_facteur_augmentation
double m_facteur_augmentation
Definition: fct_taille_fem_solution_generateur_microstructure.h:67
FEM_SOLUTION::ecrire
void ecrire(double val, int i, int j, int coord=0, int num_no=0)
Definition: fem_solution.cpp:411
BOITE_3D::get_centre
void get_centre(double *coo)
Definition: ot_boite_3d.cpp:149
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::m_nb_cellule_direction
int m_nb_cellule_direction
Definition: fct_taille_fem_solution_generateur_microstructure.h:64
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::m_grille_ele3
TPL_GRILLE< FEM_ELEMENT3 * > m_grille_ele3
Definition: fct_taille_fem_solution_generateur_microstructure.h:71
fct_taille_fem_solution_generateur_microstructure.h
MG_GEOMETRIE::get_premier_face
MG_FACE * get_premier_face(LISTE_MG_FACE::iterator &it)
Definition: mg_geometrie.cpp:1338
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::~FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE
~FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE()
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:74
FCT_TAILLE_FEM_SOLUTION::sol
FEM_SOLUTION * sol
Definition: fct_taille_fem_solution.h:69
TPL_GRILLE::get_cellule
virtual TPL_CELLULE_GRILLE< A > * get_cellule(int num)
Definition: tpl_grille.h:139
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage_sommet_arete
void echantillonnage_sommet_arete(MG_SOMMET *mgsommet, MG_ARETE *mgarete)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:493
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
OT_GEOMETRIE::get_lien_topologique
static int get_lien_topologique(MG_ELEMENT_TOPOLOGIQUE *mgeletopo1, MG_ELEMENT_TOPOLOGIQUE *mgeletopo2)
Definition: ot_geometrie.cpp:62
TPL_MAP_ENTITE::existe
virtual int existe(X x)
Definition: tpl_map_entite.h:61
OK
const int OK
Definition: mg_definition.h:38
TPL_GRILLE::supprimer
virtual void supprimer(A a)
Definition: tpl_grille.h:307
MG_VOLUME
Definition: mg_volume.h:33
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_ISOTROPE
Definition: fct_taille_fem_solution_generateur_isotrope.h:34
MG_GESTIONNAIRE
Definition: mg_gestionnaire.h:57
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::m_nb_couche_min
long m_nb_couche_min
Definition: fct_taille_fem_solution_generateur_microstructure.h:65
MG_ELEMENT_TOPOLOGIQUE::get_type
virtual int get_type(void)=0
TPL_CELLULE_GRILLE::get_entite
A get_entite(int num)
Definition: tpl_grille.h:84
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage_arete_arete
void echantillonnage_arete_arete(MG_ARETE *mgarete1, MG_ARETE *mgarete2)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:455
MG_FACE::get_echantillonnage
virtual void get_echantillonnage(int numechantillon, std::vector< double > &tab)
Definition: mg_face.cpp:484
MG_ARETE::get_tmin
virtual double get_tmin(void)
Definition: mg_arete.cpp:179
MG_ELEMENT_TOPOLOGIQUE
Definition: mg_element_topologique.h:51
FCT_TAILLE_FEM_SOLUTION::fem
FEM_MAILLAGE * fem
Definition: fct_taille_fem_solution.h:71
MG_GEOMETRIE::get_suivant_sommet
MG_SOMMET * get_suivant_sommet(LISTE_MG_SOMMET::iterator &it)
Definition: mg_geometrie.cpp:632
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
OT_GEOMETRIE::get_distance_min_mg_eletopo_mg_eletopo
static int get_distance_min_mg_eletopo_mg_eletopo(MG_ELEMENT_TOPOLOGIQUE *mgeletopo1, MG_ELEMENT_TOPOLOGIQUE *mgeletopo2, double &distance)
Definition: ot_geometrie.cpp:270
ELE_TOPO_GRILLE::get_boite_3D
BOITE_3D get_boite_3D(void)
Definition: fct_taille_fem_solution_generateur_microstructure.h:84
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage_arete
void echantillonnage_arete(MG_ARETE *mgarete)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:566
FEM_ELEMENT_MAILLAGE::get_solution
virtual double get_solution(int num=0)
Definition: fem_element_maillage.cpp:113
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::get_fem_ele3_droite
void get_fem_ele3_droite(double *xyz1, double *xyz2, TPL_MAP_ENTITE< FEM_ELEMENT3 * > &tpl_map_ele3, int nb_pas=32)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:747
BOITE_3D::get_xmax
double get_xmax(void)
Definition: ot_boite_3d.cpp:109
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_GENERATEUR_MICROSTRUCTURE::lisser_solution
void lisser_solution(void)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:617
tpl_grille.h
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE(MG_GESTIONNAIRE *gesttmp, MG_GEOMETRIE *geotmp, double dg, double dg_eps_particule, int fechantillon, int nb_cellule_direction, char *nomsolution, TPL_MAP_ENTITE< MG_VOLUME * > &tpl_map_volume_matrice, long nb_couche_min=2, long nb_pas=32, double facteur_augmentation=25)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:27
TPL_MAP_ENTITE::ITERATEUR
std::map< unsigned long, X, std::less< unsigned long > >::iterator ITERATEUR
Definition: tpl_map_entite.h:38
MG_SURFACE::est_periodique_u
virtual int est_periodique_u(void)=0
MG_VOLUME::get_boite_3D
virtual BOITE_3D get_boite_3D(void)
Definition: mg_volume.cpp:109
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::construit_particulier
virtual void construit_particulier(void)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:79
FCT_TAILLE::affiche
void affiche(char *message)
Definition: fct_taille.cpp:446
TPL_LISTE_ENTITE::get_nb
virtual int get_nb(void)
Definition: tpl_liste_entite.h:67
MG_SOMMET::get_point
virtual MG_POINT * get_point(void)
Definition: mg_sommet.cpp:52
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::lien_topologique_entre
bool lien_topologique_entre(MG_ELEMENT_TOPOLOGIQUE *mg_ele_topo1, MG_ELEMENT_TOPOLOGIQUE *mg_ele_topo2)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:84
MG_GEOMETRIE::get_premier_sommet
MG_SOMMET * get_premier_sommet(LISTE_MG_SOMMET::iterator &it)
Definition: mg_geometrie.cpp:624
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::cree_grille
void cree_grille(void)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:715
OT_GEOMETRIE::get_param_face
static void get_param_face(MG_FACE *mgface, double &umin, double &umax, double &vmin, double &vmax)
Definition: ot_geometrie.cpp:261
TPL_LISTE_ENTITE::get
virtual X get(int num)
Definition: tpl_liste_entite.h:72
BOITE_3D::get_ymax
double get_ymax(void)
Definition: ot_boite_3d.cpp:119
FEM_NOEUD
Definition: fem_noeud.h:35
MG_ARETE::get_M
virtual double get_M(double t)
Definition: mg_arete.cpp:205
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_ISOTROPE::ecart_nodal
double ecart_nodal
Definition: fct_taille_fem_solution_generateur_isotrope.h:53
TPL_CELLULE_GRILLE::lst_entite_A
TPL_LISTE_ENTITE< A > lst_entite_A
Definition: tpl_grille.h:79
MG_GEOMETRIE::get_premier_arete
MG_ARETE * get_premier_arete(LISTE_MG_ARETE::iterator &it)
Definition: mg_geometrie.cpp:907
TPL_MAP_ENTITE::ajouter
virtual void ajouter(X x)
Definition: tpl_map_entite.h:55
MG_GEOMETRIE::get_nb_mg_volume
unsigned int get_nb_mg_volume(void)
Definition: mg_geometrie.cpp:1712
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_ISOTROPE::geo
MG_GEOMETRIE * geo
Definition: fct_taille_fem_solution_generateur_isotrope.h:52
BOITE_3D
Definition: ot_boite_3d.h:27
MG_SURFACE::est_periodique_v
virtual int est_periodique_v(void)=0
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage_face
void echantillonnage_face(MG_FACE *mgface)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:592
sqrt
double2 sqrt(double2 &val)
Definition: ot_doubleprecision.cpp:345
MG_SURFACE::get_periode_v
virtual double get_periode_v(void)=0
MG_GEOMETRIE::get_premier_volume
MG_VOLUME * get_premier_volume(LISTE_MG_VOLUME::iterator &it)
Definition: mg_geometrie.cpp:1694
BOITE_3D::get_zmin
double get_zmin(void)
Definition: ot_boite_3d.cpp:124
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE
Definition: fct_taille_fem_solution_generateur_microstructure.h:29
MG_GEOMETRIE
Definition: mg_geometrie.h:84
OT_GEOMETRIE::get_distance_min_mg_face_mg_face
static int get_distance_min_mg_face_mg_face(MG_FACE *mgface1, MG_FACE *mgface2, double &distance)
Definition: ot_geometrie.cpp:366
FEM_MAILLAGE::get_suivant_noeud
FEM_NOEUD * get_suivant_noeud(LISTE_FEM_NOEUD::iterator &it)
Definition: fem_maillage.cpp:182
MG_FACE::get_courbure
virtual void get_courbure(double *uv, double &cmax, double &cmin)
Definition: mg_face.cpp:313
TPL_LISTE_ENTITE
Definition: tpl_liste_entite.h:32
FCT_TAILLE_FEM_SOLUTION::ny
int ny
Definition: fct_taille_fem_solution.h:77
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage_sommet_sommet
void echantillonnage_sommet_sommet(MG_SOMMET *mgsommet1, MG_SOMMET *mgsommet2)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:535
OT_GEOMETRIE::get_map_mg_arete_sous_jacent
static void get_map_mg_arete_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_ARETE * > &map_arete)
Definition: ot_geometrie.cpp:586
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage_face_face
void echantillonnage_face_face(MG_FACE *mgface1, MG_FACE *mgface2)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:271
MG_ARETE
Definition: mg_arete.h:36
FEM_ELEMENT3::get_boite_3D
virtual BOITE_3D & get_boite_3D(void)=0
MG_FACE
Definition: mg_face.h:34
TPL_MAP_ENTITE::get_suivant
virtual X get_suivant(ITERATEUR &it)
Definition: tpl_map_entite.h:120
MG_SOMMET
Definition: mg_sommet.h:35
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::echantillonnage
int echantillonnage(void)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:99
MG_GEOMETRIE::get_suivant_face
MG_FACE * get_suivant_face(LISTE_MG_FACE::iterator &it)
Definition: mg_geometrie.cpp:1346
OT_GEOMETRIE::get_map_mg_face_sous_jacent
static void get_map_mg_face_sous_jacent(MG_ELEMENT_TOPOLOGIQUE *mgeletopo, TPL_MAP_ENTITE< MG_FACE * > &map_face)
Definition: ot_geometrie.cpp:600
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
ELE_TOPO_GRILLE::get_mgeletopo
MG_ELEMENT_TOPOLOGIQUE * get_mgeletopo(void)
Definition: fct_taille_fem_solution_generateur_microstructure.h:88
FCT_TAILLE_FEM_SOLUTION::nz
int nz
Definition: fct_taille_fem_solution.h:77
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::extrapoler_solution_noeud
void extrapoler_solution_noeud(void)
Definition: fct_taille_fem_solution_generateur_microstructure.cpp:698
MG_ARETE::get_tmax
virtual double get_tmax(void)
Definition: mg_arete.cpp:184
FCT_TAILLE_FEM_SOLUTION_GENERATEUR_MICROSTRUCTURE::m_tpl_map_volume_matrice
TPL_MAP_ENTITE< MG_VOLUME * > m_tpl_map_volume_matrice
Definition: fct_taille_fem_solution_generateur_microstructure.h:69
MG_SOMMET::est_pole
bool est_pole(void)
Definition: mg_sommet.cpp:115
MG_POINT::evaluer
virtual void evaluer(double *xyz)=0
MG_FACE::get_surface
virtual MG_SURFACE * get_surface(void)
Definition: mg_face.cpp:109
MG_GEOMETRIE::get_suivant_arete
MG_ARETE * get_suivant_arete(LISTE_MG_ARETE::iterator &it)
Definition: mg_geometrie.cpp:915
FEM_MAILLAGE::get_premier_element3
FEM_ELEMENT3 * get_premier_element3(LISTE_FEM_ELEMENT3::iterator &it)
Definition: fem_maillage.cpp:672