ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/microstructure/src/mstruct_ver.cpp
Revision: 951
Committed: Fri Aug 10 15:17:17 2018 UTC (6 years, 9 months ago) by couturad
File size: 33401 byte(s)
Log Message:
-> Ajout de Project Chrono (voir CMakeLists.txt).
-> Ajout d'un générateur de microstructure basé sur la dynamique des corps rigides (MSTRUCT_GENERATEUR_DCR).
-> Ajout d'un opérateur de décallage de la topologie (MG_CG_OP_TRANSF_DECALLAGE).
-> Retrait de «using namespace std»  (conflit avec namespace chrono) et modification des fichiers affectés.
-> Modification de mailleur2d.cpp afin d'enregistrer un fichier MAGiC (void.magic) lorsque le nombre d'itération dépasse la valeur maximale.

File Contents

# User Rev Content
1 couturad 919 #include "mstruct_ver.h"
2 couturad 926 #include "mstruct_ves_file.h"
3 couturad 919
4 couturad 926 MSTRUCT_VER::MSTRUCT_VER(void)
5 couturad 919 {
6    
7     }
8    
9 couturad 926 MSTRUCT_VER::~MSTRUCT_VER(void)
10 couturad 919 {
11    
12     }
13    
14 couturad 951 void MSTRUCT_VER::active_affichage(fonction_affiche* fonc)
15 couturad 919 {
16     fonc_affiche = fonc;
17     affichageactif = 1;
18     }
19    
20 couturad 926 void MSTRUCT_VER::affiche(char* message)
21 couturad 919 {
22     if(affichageactif==1) fonc_affiche(message);
23     }
24    
25 couturad 927 int MSTRUCT_VER::exporter_analyse(char* fichier_liste_ves,
26     std::vector< OT_PARAMETRES* >& vector_params_analyse,
27     char* dossier_resultat)
28     {
29     char message[5000];
30     std::map<long,MSTRUCT_VES_FILE*> map_ves_file;
31     std::ifstream f;
32 couturad 951 f.open(fichier_liste_ves,std::ios::in);
33 couturad 927 char ligne[1000];
34     f.getline(ligne,1000);
35     long i=0;
36     while(!f.eof())
37     {
38     char fichier_ves[1000];
39     sscanf(ligne,"%s",fichier_ves);
40     if(strlen(fichier_ves)==0) continue;
41     std::map<std::string,MSTRUCT_ANALYSE*>* map_analyse = new std::map<std::string,MSTRUCT_ANALYSE*>;
42     MSTRUCT_VES_FILE *ves_file=new MSTRUCT_VES_FILE;
43     if(ves_file->ouvrir(fichier_ves)==FAIL) return FAIL;
44     map_ves_file.insert(std::pair<long,MSTRUCT_VES_FILE*>(i,ves_file));
45     i++;
46     f.getline(ligne,1000);
47     }
48     f.close();
49     long nb_ves = map_ves_file.size();
50     sprintf(message,"NB_VES : %li",nb_ves); affiche(message);
51     std::vector<OT_PARAMETRES*>::iterator it;
52     for(it=vector_params_analyse.begin();it!=vector_params_analyse.end();it++)
53     {
54     OT_PARAMETRES* param = *it;
55     int Type_analyse = (int)param->get_valeur((char*)"Type_analyse");
56     std::string Identifiant = param->get_nom((char*)"Identifiant");
57     sprintf(message,"-> %s",Identifiant.c_str()); affiche(message);
58 couturad 951 int Analyse_erosion = (int)param->get_valeur((char*)"Analyse_erosion");
59     long Nb_couche = (long)param->get_valeur((char*)"Nb_couche");
60     if(!Analyse_erosion)
61 couturad 927 {
62 couturad 951 char sys_mk_dossier[1000];
63     char nom_fichier_resultat[1000];
64     sprintf(nom_fichier_resultat,"%s/liste_%s.txt",dossier_resultat,Identifiant.c_str());
65     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
66     ofstrm.precision(16);
67     std::vector<MSTRUCT_ANALYSE_CHAMP*> vector_analyse;
68     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
69     i=1;
70     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
71 couturad 927 {
72 couturad 951 MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
73     MSTRUCT_ANALYSE* analyse = ves_file->get_analyse(Identifiant);
74     if(i==1) analyse->exporter(ofstrm,i,true);
75     else analyse->exporter(ofstrm,i,false);
76     i++;
77 couturad 927 }
78 couturad 951 ofstrm.close();
79 couturad 927 }
80 couturad 951 else
81     {
82     for(long j=0;j<Nb_couche;j++)
83     {
84     char sys_mk_dossier[1000];
85     char nom_fichier_resultat[1000];
86     sprintf(sys_mk_dossier,"mkdir -p %s/c_%li",dossier_resultat,j);
87     system(sys_mk_dossier);
88     sprintf(nom_fichier_resultat,"%s/c_%li/liste_%s.txt",dossier_resultat,j,Identifiant.c_str());
89     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
90     ofstrm.precision(16);
91     std::vector<MSTRUCT_ANALYSE_CHAMP*> vector_analyse;
92     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
93     i=1;
94     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
95     {
96     MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
97     MSTRUCT_ANALYSE_EROSION *analyse_erosion = (MSTRUCT_ANALYSE_EROSION*)ves_file->get_analyse(Identifiant);
98     if(i==1) analyse_erosion->get_analyse(j)->exporter(ofstrm,i,true);
99     else analyse_erosion->get_analyse(j)->exporter(ofstrm,i,false);
100     i++;
101     }
102     ofstrm.close();
103     }
104     }
105 couturad 927 }
106 couturad 951 return OK;
107 couturad 927 }
108    
109    
110 couturad 926 int MSTRUCT_VER::cumuler_analyse(char* fichier_liste_ves,
111     std::vector< OT_PARAMETRES* >& vector_params_analyse,
112     char* dossier_resultat,
113     bool avec_histogramme)
114 couturad 919 {
115 couturad 926 char message[5000];
116     std::map<long,MSTRUCT_VES_FILE*> map_ves_file;
117 couturad 919 std::ifstream f;
118 couturad 951 f.open(fichier_liste_ves,std::ios::in);
119 couturad 919 char ligne[1000];
120     f.getline(ligne,1000);
121 couturad 926 long i=0;
122 couturad 919 while(!f.eof())
123     {
124     char fichier_ves[1000];
125     sscanf(ligne,"%s",fichier_ves);
126     if(strlen(fichier_ves)==0) continue;
127 couturad 926 std::map<std::string,MSTRUCT_ANALYSE*>* map_analyse = new std::map<std::string,MSTRUCT_ANALYSE*>;
128     MSTRUCT_VES_FILE *ves_file=new MSTRUCT_VES_FILE;
129     if(ves_file->ouvrir(fichier_ves)==FAIL) return FAIL;
130     map_ves_file.insert(std::pair<long,MSTRUCT_VES_FILE*>(i,ves_file));
131     i++;
132 couturad 919 f.getline(ligne,1000);
133     }
134     f.close();
135 couturad 926 long nb_ves = map_ves_file.size();
136     sprintf(message,"NB_VES : %li",nb_ves); affiche(message);
137     std::vector<OT_PARAMETRES*>::iterator it;
138     for(it=vector_params_analyse.begin();it!=vector_params_analyse.end();it++)
139 couturad 919 {
140 couturad 926 OT_PARAMETRES* param = *it;
141     int Type_analyse = (int)param->get_valeur((char*)"Type_analyse");
142     std::string Identifiant = param->get_nom((char*)"Identifiant");
143     sprintf(message,"-> %s",Identifiant.c_str()); affiche(message);
144 couturad 931 int Analyse_erosion = (int)param->get_valeur((char*)"Analyse_erosion");
145     long Nb_couche = (long)param->get_valeur((char*)"Nb_couche");
146 couturad 926 if(Type_analyse==MSTRUCT_ANALYSE::TYPE_ANALYSE::CHAMP)
147 couturad 919 {
148 couturad 931 if(!Analyse_erosion)
149 couturad 926 {
150 couturad 951 char nom_fichier_resultat[1000];
151     sprintf(nom_fichier_resultat,"%s/cumul_%s.txt",dossier_resultat,Identifiant.c_str());
152     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
153     ofstrm.precision(16);
154 couturad 931 std::vector<MSTRUCT_ANALYSE_CHAMP*> vector_analyse;
155     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
156     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
157 couturad 926 {
158 couturad 931 MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
159     MSTRUCT_ANALYSE* analyse = ves_file->get_analyse(Identifiant);
160     vector_analyse.push_back((MSTRUCT_ANALYSE_CHAMP*)analyse);
161 couturad 926 }
162 couturad 951 MSTRUCT_ANALYSE_CHAMP analyse_champ(vector_analyse);
163     analyse_champ.exporter(ofstrm,nb_ves,true,avec_histogramme,dossier_resultat);
164     ofstrm.close();
165 couturad 931 }
166     else
167     {
168 couturad 951 for(long j=0;j<Nb_couche;j++)
169 couturad 931 {
170 couturad 951 char nom_fichier_resultat[1000];
171     char sys_mk_dossier[1000];
172     char prefix_histo[1000];
173     sprintf(sys_mk_dossier,"mkdir -p %s/c_%li",dossier_resultat,j);
174     system(sys_mk_dossier);
175     sprintf(nom_fichier_resultat,"%s/c_%li/cumul_%s.txt",dossier_resultat,j,Identifiant.c_str());
176     sprintf(prefix_histo,"%s/c_%li/",dossier_resultat,j);
177     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
178     ofstrm.precision(16);
179 couturad 931 std::vector<MSTRUCT_ANALYSE_CHAMP*> vector_analyse;
180     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
181     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
182     {
183     MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
184     MSTRUCT_ANALYSE_EROSION *analyse_erosion = (MSTRUCT_ANALYSE_EROSION*)ves_file->get_analyse(Identifiant);
185 couturad 951 vector_analyse.push_back((MSTRUCT_ANALYSE_CHAMP*)analyse_erosion->get_analyse(j));
186 couturad 931 }
187     MSTRUCT_ANALYSE_CHAMP analyse_champ(vector_analyse);
188 couturad 951 analyse_champ.exporter(ofstrm,nb_ves,true,avec_histogramme,prefix_histo);
189     ofstrm.close();
190 couturad 926 }
191     }
192 couturad 919 }
193 couturad 926 else if(Type_analyse==MSTRUCT_ANALYSE::TYPE_ANALYSE::ORIENTATION)
194 couturad 919 {
195 couturad 931 if(!Analyse_erosion)
196 couturad 926 {
197 couturad 951 char nom_fichier_resultat[1000];
198     sprintf(nom_fichier_resultat,"%s/cumul_%s.txt",dossier_resultat,Identifiant.c_str());
199     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
200     ofstrm.precision(16);
201 couturad 931 std::vector<MSTRUCT_ANALYSE_ORIENTATION*> vector_analyse;
202     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
203     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
204 couturad 926 {
205 couturad 931 MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
206     MSTRUCT_ANALYSE* analyse = ves_file->get_analyse(Identifiant);
207     vector_analyse.push_back((MSTRUCT_ANALYSE_ORIENTATION*)analyse);
208 couturad 926 }
209 couturad 951 MSTRUCT_ANALYSE_ORIENTATION analyse_orientation(vector_analyse);
210     analyse_orientation.exporter(ofstrm,nb_ves,true,avec_histogramme,dossier_resultat);
211     ofstrm.close();
212 couturad 926 }
213 couturad 931 else
214 couturad 926 {
215 couturad 951 for(long j=0;j<Nb_couche;j++)
216 couturad 931 {
217 couturad 951 char nom_fichier_resultat[1000];
218     char sys_mk_dossier[1000];
219     char prefix_histo[1000];
220     sprintf(sys_mk_dossier,"mkdir -p %s/c_%li",dossier_resultat,j);
221     system(sys_mk_dossier);
222     sprintf(nom_fichier_resultat,"%s/c_%li/cumul_%s.txt",dossier_resultat,j,Identifiant.c_str());
223     sprintf(prefix_histo,"%s/c_%li/",dossier_resultat,j);
224     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
225     ofstrm.precision(16);
226 couturad 931 std::vector<MSTRUCT_ANALYSE_ORIENTATION*> vector_analyse;
227     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
228     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
229     {
230     MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
231     MSTRUCT_ANALYSE_EROSION *analyse_erosion = (MSTRUCT_ANALYSE_EROSION*)ves_file->get_analyse(Identifiant);
232 couturad 951 vector_analyse.push_back((MSTRUCT_ANALYSE_ORIENTATION*)analyse_erosion->get_analyse(j));
233 couturad 931 }
234     MSTRUCT_ANALYSE_ORIENTATION analyse_orientation(vector_analyse);
235 couturad 951 analyse_orientation.exporter(ofstrm,nb_ves,true,avec_histogramme,prefix_histo);
236     ofstrm.close();
237 couturad 931 }
238 couturad 926 }
239 couturad 919 }
240 couturad 938 else if(Type_analyse==MSTRUCT_ANALYSE::TYPE_ANALYSE::ORIENTATION_PONDEREE)
241     {
242     if(!Analyse_erosion)
243     {
244 couturad 951 char nom_fichier_resultat[1000];
245     sprintf(nom_fichier_resultat,"%s/cumul_%s.txt",dossier_resultat,Identifiant.c_str());
246     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
247     ofstrm.precision(16);
248 couturad 938 std::vector<MSTRUCT_ANALYSE_ORIENTATION*> vector_analyse;
249     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
250     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
251     {
252     MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
253     MSTRUCT_ANALYSE* analyse = ves_file->get_analyse(Identifiant);
254     vector_analyse.push_back((MSTRUCT_ANALYSE_ORIENTATION_PONDEREE*)analyse);
255     }
256 couturad 951 MSTRUCT_ANALYSE_ORIENTATION_PONDEREE analyse_orientation_ponderee(vector_analyse);
257     analyse_orientation_ponderee.exporter(ofstrm,nb_ves,true,avec_histogramme,dossier_resultat);
258     ofstrm.close();
259 couturad 938 }
260     else
261     {
262 couturad 951 for(long j=0;j<Nb_couche;j++)
263 couturad 938 {
264 couturad 951 char nom_fichier_resultat[1000];
265     char sys_mk_dossier[1000];
266     char prefix_histo[1000];
267     sprintf(sys_mk_dossier,"mkdir -p %s/c_%li",dossier_resultat,j);
268     system(sys_mk_dossier);
269     sprintf(nom_fichier_resultat,"%s/c_%li/cumul_%s.txt",dossier_resultat,j,Identifiant.c_str());
270     sprintf(prefix_histo,"%s/c_%li/",dossier_resultat,j);
271     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
272     ofstrm.precision(16);
273 couturad 938 std::vector<MSTRUCT_ANALYSE_ORIENTATION*> vector_analyse;
274     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
275     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
276     {
277     MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
278     MSTRUCT_ANALYSE_EROSION *analyse_erosion = (MSTRUCT_ANALYSE_EROSION*)ves_file->get_analyse(Identifiant);
279 couturad 951 vector_analyse.push_back((MSTRUCT_ANALYSE_ORIENTATION_PONDEREE*)analyse_erosion->get_analyse(j));
280 couturad 938 }
281 couturad 951 MSTRUCT_ANALYSE_ORIENTATION_PONDEREE analyse_orientation_ponderee(vector_analyse);
282     analyse_orientation_ponderee.exporter(ofstrm,nb_ves,true,avec_histogramme,prefix_histo);
283     ofstrm.close();
284 couturad 938 }
285     }
286     }
287 couturad 926 else if(Type_analyse==MSTRUCT_ANALYSE::TYPE_ANALYSE::CAO)
288 couturad 919 {
289 couturad 931 if(!Analyse_erosion)
290 couturad 926 {
291 couturad 951 char nom_fichier_resultat[1000];
292     sprintf(nom_fichier_resultat,"%s/cumul_%s.txt",dossier_resultat,Identifiant.c_str());
293     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
294     ofstrm.precision(16);
295 couturad 931 std::vector<MSTRUCT_ANALYSE_CAO*> vector_analyse;
296     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
297     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
298 couturad 926 {
299 couturad 931 MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
300     MSTRUCT_ANALYSE* analyse = ves_file->get_analyse(Identifiant);
301     vector_analyse.push_back((MSTRUCT_ANALYSE_CAO*)analyse);
302 couturad 926 }
303 couturad 951 MSTRUCT_ANALYSE_CAO analyse_cao(vector_analyse);
304     analyse_cao.exporter(ofstrm,nb_ves,true,avec_histogramme,dossier_resultat);
305     ofstrm.close();
306 couturad 926 }
307 couturad 931 else
308 couturad 926 {
309 couturad 951 for(long j=0;j<Nb_couche;j++)
310 couturad 931 {
311 couturad 951 char nom_fichier_resultat[1000];
312     char sys_mk_dossier[1000];
313     char prefix_histo[1000];
314     sprintf(sys_mk_dossier,"mkdir -p %s/c_%li",dossier_resultat,j);
315     system(sys_mk_dossier);
316     sprintf(nom_fichier_resultat,"%s/c_%li/cumul_%s.txt",dossier_resultat,j,Identifiant.c_str());
317     sprintf(prefix_histo,"%s/c_%li/",dossier_resultat,j);
318     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
319     ofstrm.precision(16);
320 couturad 931 std::vector<MSTRUCT_ANALYSE_CAO*> vector_analyse;
321     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
322     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
323     {
324     MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
325     MSTRUCT_ANALYSE_EROSION *analyse_erosion = (MSTRUCT_ANALYSE_EROSION*)ves_file->get_analyse(Identifiant);
326 couturad 951 vector_analyse.push_back((MSTRUCT_ANALYSE_CAO*)analyse_erosion->get_analyse(j));
327 couturad 931 }
328     MSTRUCT_ANALYSE_CAO analyse_cao(vector_analyse);
329 couturad 951 analyse_cao.exporter(ofstrm,nb_ves,true,avec_histogramme,prefix_histo);
330     ofstrm.close();
331 couturad 931 }
332 couturad 926 }
333 couturad 919 }
334 couturad 926 else if(Type_analyse==MSTRUCT_ANALYSE::TYPE_ANALYSE::MAILLAGE_MG)
335 couturad 919 {
336 couturad 931 if(!Analyse_erosion)
337 couturad 926 {
338 couturad 951 char nom_fichier_resultat[1000];
339     sprintf(nom_fichier_resultat,"%s/cumul_%s.txt",dossier_resultat,Identifiant.c_str());
340     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
341     ofstrm.precision(16);
342 couturad 931 std::vector<MSTRUCT_ANALYSE_MG_MAILLAGE*> vector_analyse;
343     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
344     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
345 couturad 926 {
346 couturad 931 MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
347     MSTRUCT_ANALYSE* analyse = ves_file->get_analyse(Identifiant);
348     vector_analyse.push_back((MSTRUCT_ANALYSE_MG_MAILLAGE*)analyse);
349 couturad 926 }
350 couturad 951 MSTRUCT_ANALYSE_MG_MAILLAGE analyse_maillage_mg(vector_analyse);
351     analyse_maillage_mg.exporter(ofstrm,nb_ves,true,avec_histogramme,dossier_resultat);
352     ofstrm.close();
353 couturad 926 }
354 couturad 931 else
355 couturad 926 {
356 couturad 951 for(long j=0;j<Nb_couche;j++)
357 couturad 931 {
358 couturad 951 char nom_fichier_resultat[1000];
359     char sys_mk_dossier[1000];
360     char prefix_histo[1000];
361     sprintf(sys_mk_dossier,"mkdir -p %s/c_%li",dossier_resultat,j);
362     system(sys_mk_dossier);
363     sprintf(nom_fichier_resultat,"%s/c_%li/cumul_%s.txt",dossier_resultat,j,Identifiant.c_str());
364     sprintf(prefix_histo,"%s/c_%li/",dossier_resultat,j);
365     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
366     ofstrm.precision(16);
367 couturad 931 std::vector<MSTRUCT_ANALYSE_MG_MAILLAGE*> vector_analyse;
368     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
369     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
370     {
371     MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
372     MSTRUCT_ANALYSE_EROSION *analyse_erosion = (MSTRUCT_ANALYSE_EROSION*)ves_file->get_analyse(Identifiant);
373 couturad 951 vector_analyse.push_back((MSTRUCT_ANALYSE_MG_MAILLAGE*)analyse_erosion->get_analyse(j));
374 couturad 931 }
375 couturad 951 MSTRUCT_ANALYSE_MG_MAILLAGE analyse_maillage_mg(vector_analyse);
376     analyse_maillage_mg.exporter(ofstrm,nb_ves,true,avec_histogramme,prefix_histo);
377     ofstrm.close();
378 couturad 931 }
379 couturad 926 }
380 couturad 919 }
381 couturad 926 else if(Type_analyse==MSTRUCT_ANALYSE::TYPE_ANALYSE::MAILLAGE_FEM)
382 couturad 919 {
383 couturad 931 if(!Analyse_erosion)
384 couturad 926 {
385 couturad 951 char nom_fichier_resultat[1000];
386     sprintf(nom_fichier_resultat,"%s/cumul_%s.txt",dossier_resultat,Identifiant.c_str());
387     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
388     ofstrm.precision(16);
389 couturad 931 std::vector<MSTRUCT_ANALYSE_FEM_MAILLAGE*> vector_analyse;
390     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
391     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
392 couturad 926 {
393 couturad 931 MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
394     MSTRUCT_ANALYSE* analyse = ves_file->get_analyse(Identifiant);
395     vector_analyse.push_back((MSTRUCT_ANALYSE_FEM_MAILLAGE*)analyse);
396 couturad 926 }
397 couturad 951 MSTRUCT_ANALYSE_FEM_MAILLAGE analyse_maillage_fem(vector_analyse);
398     analyse_maillage_fem.exporter(ofstrm,nb_ves,true,avec_histogramme,dossier_resultat);
399     ofstrm.close();
400 couturad 926 }
401 couturad 931 else
402 couturad 926 {
403 couturad 951 for(long j=0;j<Nb_couche;j++)
404 couturad 931 {
405 couturad 951 char nom_fichier_resultat[1000];
406     char sys_mk_dossier[1000];
407     char prefix_histo[1000];
408     sprintf(sys_mk_dossier,"mkdir -p %s/c_%li",dossier_resultat,j);
409     system(sys_mk_dossier);
410     sprintf(nom_fichier_resultat,"%s/c_%li/cumul_%s.txt",dossier_resultat,j,Identifiant.c_str());
411     sprintf(prefix_histo,"%s/c_%li/",dossier_resultat,j);
412     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
413     ofstrm.precision(16);
414 couturad 931 std::vector<MSTRUCT_ANALYSE_FEM_MAILLAGE*> vector_analyse;
415     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
416     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
417     {
418     MSTRUCT_VES_FILE *ves_file=it_ves_file->second;
419     MSTRUCT_ANALYSE_EROSION *analyse_erosion = (MSTRUCT_ANALYSE_EROSION*)ves_file->get_analyse(Identifiant);
420 couturad 951 vector_analyse.push_back((MSTRUCT_ANALYSE_FEM_MAILLAGE*)analyse_erosion->get_analyse(j));
421 couturad 931 }
422 couturad 951 MSTRUCT_ANALYSE_FEM_MAILLAGE analyse_maillage_fem(vector_analyse);
423     analyse_maillage_fem.exporter(ofstrm,nb_ves,true,avec_histogramme,prefix_histo);
424     ofstrm.close();
425     }
426 couturad 926 }
427 couturad 919 }
428     }
429 couturad 926 std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_file;
430     for(it_ves_file=map_ves_file.begin();it_ves_file!=map_ves_file.end();it_ves_file++)
431 couturad 919 {
432 couturad 926 delete it_ves_file->second;
433 couturad 919 }
434     return OK;
435     }
436    
437 couturad 951 int MSTRUCT_VER::exporter_modules_mecaniques(char* fichier_liste_ves_spherique,
438 couturad 926 char* fichier_liste_ves_deviatorique,
439 couturad 930 std::vector< OT_PARAMETRES* >& vector_params_ver,
440 couturad 951 char* dossier_resultat)
441 couturad 919 {
442 couturad 926 char message[5000];
443     std::map<long,MSTRUCT_VES_FILE*> map_ves_file_spherique;
444     std::ifstream f;
445 couturad 951 f.open(fichier_liste_ves_spherique,std::ios::in);
446 couturad 926 char ligne[1000];
447     f.getline(ligne,1000);
448     long i=0;
449     while(!f.eof())
450 couturad 919 {
451 couturad 926 char fichier_ves[1000];
452     sscanf(ligne,"%s",fichier_ves);
453     if(strlen(fichier_ves)==0) continue;
454     std::map<std::string,MSTRUCT_ANALYSE*>* map_analyse = new std::map<std::string,MSTRUCT_ANALYSE*>;
455     MSTRUCT_VES_FILE *ves_file=new MSTRUCT_VES_FILE;
456     if(ves_file->ouvrir(fichier_ves)==FAIL) return FAIL;
457     map_ves_file_spherique.insert(std::pair<long,MSTRUCT_VES_FILE*>(i,ves_file));
458     i++;
459     f.getline(ligne,1000);
460 couturad 919 }
461 couturad 926 f.close();
462     std::map<long,MSTRUCT_VES_FILE*> map_ves_file_deviatorique;
463 couturad 951 f.open(fichier_liste_ves_deviatorique,std::ios::in);
464 couturad 926 f.getline(ligne,1000);
465     i=0;
466     while(!f.eof())
467 couturad 919 {
468 couturad 926 char fichier_ves[1000];
469     sscanf(ligne,"%s",fichier_ves);
470     if(strlen(fichier_ves)==0) continue;
471     std::map<std::string,MSTRUCT_ANALYSE*>* map_analyse = new std::map<std::string,MSTRUCT_ANALYSE*>;
472     MSTRUCT_VES_FILE *ves_file=new MSTRUCT_VES_FILE;
473     if(ves_file->ouvrir(fichier_ves)==FAIL) return FAIL;
474     map_ves_file_deviatorique.insert(std::pair<long,MSTRUCT_VES_FILE*>(i,ves_file));
475     i++;
476     f.getline(ligne,1000);
477 couturad 919 }
478 couturad 926 f.close();
479     if(map_ves_file_spherique.size()!=map_ves_file_deviatorique.size())
480 couturad 919 {
481 couturad 926 std::cerr << "*** MSTRUCT_VER::calculer_module_young : Liste non identique ***" << std::endl;
482 couturad 919 return FAIL;
483     }
484 couturad 926 long nb_ves = map_ves_file_spherique.size();
485     sprintf(message,"NB_VES : %li",nb_ves); affiche(message);
486     std::vector<OT_PARAMETRES*>::iterator it;
487     for(it=vector_params_ver.begin();it!=vector_params_ver.end();it++)
488 couturad 919 {
489 couturad 930 OT_PARAMETRES *param = *it;
490 couturad 926 std::string Identifiant_epsilon = param->get_nom((char*)"Identifiant_epsilon");
491     std::string Identifiant_sigma = param->get_nom((char*)"Identifiant_sigma");
492 couturad 931 char ligne[1000];
493     sprintf(ligne,"-> %s_%s",Identifiant_epsilon.c_str(),Identifiant_sigma.c_str());
494     affiche(ligne);
495 couturad 927 double Largeur_colonne_distribution_module_Kapp = param->get_valeur((char*)"Largeur_colonne_distribution_module_Kapp");
496     double Largeur_colonne_distribution_module_Gapp = param->get_valeur((char*)"Largeur_colonne_distribution_module_Gapp");
497     double Largeur_colonne_distribution_module_Eapp = param->get_valeur((char*)"Largeur_colonne_distribution_module_Eapp");
498     double Largeur_colonne_distribution_module_Nuapp = param->get_valeur((char*)"Largeur_colonne_distribution_module_Nuapp");
499 couturad 930 int Analyse_erosion = (int)param->get_valeur((char*)"Analyse_erosion");
500     if(Analyse_erosion)
501 couturad 919 {
502 couturad 930 std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_sph=map_ves_file_spherique.begin();
503     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_dev=map_ves_file_deviatorique.begin();
504     MSTRUCT_VES_FILE* file_sph=it_ves_sph->second;
505 couturad 951 MSTRUCT_VES_FILE* file_dev=it_ves_dev->second;
506 couturad 930 MSTRUCT_ANALYSE_EROSION* analyse_erosion_epsilon_sph = (MSTRUCT_ANALYSE_EROSION*)file_sph->get_analyse(Identifiant_epsilon);
507     MSTRUCT_ANALYSE_EROSION* analyse_erosion_sigma_sph = (MSTRUCT_ANALYSE_EROSION*)file_sph->get_analyse(Identifiant_sigma);
508     MSTRUCT_ANALYSE_EROSION* analyse_erosion_epsilon_dev = (MSTRUCT_ANALYSE_EROSION*)file_dev->get_analyse(Identifiant_epsilon);
509     MSTRUCT_ANALYSE_EROSION* analyse_erosion_sigma_dev = (MSTRUCT_ANALYSE_EROSION*)file_dev->get_analyse(Identifiant_sigma);
510     long nb_couche=analyse_erosion_epsilon_sph->get_nb_couche();
511 couturad 951 char sys_mk_dossier[1000];
512     char sous_dossier[1000];
513     char nom_fichier_resultat[1000];
514 couturad 930 for(long j=0;j<nb_couche;j++)
515 couturad 926 {
516 couturad 933 sprintf(ligne,"\033[1A\033[K-> Couche #%li",j);
517     affiche(ligne);
518 couturad 951 sprintf(sys_mk_dossier,"mkdir -p %s/c_%li",dossier_resultat,j);
519     system(sys_mk_dossier);
520     sprintf(sous_dossier,"%s/c_%li",dossier_resultat,j);
521     sprintf(nom_fichier_resultat,"%s/c_%li/liste_modules_meca_%s_%s.txt",dossier_resultat,j,Identifiant_epsilon.c_str(),Identifiant_sigma.c_str());
522     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
523     ofstrm.precision(16);
524 couturad 930 it_ves_sph=map_ves_file_spherique.begin();
525     it_ves_dev=map_ves_file_deviatorique.begin();
526 couturad 951 std::vector<MSTRUCT_ANALYSE_MODULES_MECA*> vector_analyse;
527     i=1;
528 couturad 930 for(;it_ves_sph!=map_ves_file_spherique.end();it_ves_sph++,it_ves_dev++)
529 couturad 926 {
530 couturad 930 file_sph=it_ves_sph->second;
531     file_dev=it_ves_dev->second;
532     analyse_erosion_epsilon_sph = (MSTRUCT_ANALYSE_EROSION*)file_sph->get_analyse(Identifiant_epsilon);
533     analyse_erosion_sigma_sph = (MSTRUCT_ANALYSE_EROSION*)file_sph->get_analyse(Identifiant_sigma);
534     analyse_erosion_epsilon_dev = (MSTRUCT_ANALYSE_EROSION*)file_dev->get_analyse(Identifiant_epsilon);
535     analyse_erosion_sigma_dev = (MSTRUCT_ANALYSE_EROSION*)file_dev->get_analyse(Identifiant_sigma);
536     MSTRUCT_ANALYSE_CHAMP* epsilon_sph=(MSTRUCT_ANALYSE_CHAMP*)analyse_erosion_epsilon_sph->get_analyse(j);
537     MSTRUCT_ANALYSE_CHAMP* sigma_sph=(MSTRUCT_ANALYSE_CHAMP*)analyse_erosion_sigma_sph->get_analyse(j);
538     MSTRUCT_ANALYSE_CHAMP* epsilon_dev=(MSTRUCT_ANALYSE_CHAMP*)analyse_erosion_epsilon_dev->get_analyse(j);
539     MSTRUCT_ANALYSE_CHAMP* sigma_dev=(MSTRUCT_ANALYSE_CHAMP*)analyse_erosion_sigma_dev->get_analyse(j);
540     MSTRUCT_ANALYSE_MODULES_MECA* analyse_meca = new MSTRUCT_ANALYSE_MODULES_MECA(epsilon_sph,
541     sigma_sph,
542     epsilon_dev,
543     sigma_dev,
544     Largeur_colonne_distribution_module_Kapp,
545     Largeur_colonne_distribution_module_Gapp,
546     Largeur_colonne_distribution_module_Eapp,
547     Largeur_colonne_distribution_module_Nuapp);
548 couturad 951 if(i==1) analyse_meca->exporter(ofstrm,i,true);
549     else analyse_meca->exporter(ofstrm,i,false);
550     delete analyse_meca;
551     i++;
552 couturad 926 }
553 couturad 951 ofstrm.close();
554 couturad 933 }
555     sprintf(ligne,"\033[1A\033[K");
556     affiche(ligne);
557 couturad 919 }
558 couturad 930 else
559 couturad 926 {
560 couturad 951 char nom_fichier_resultat[1000];
561     char sys_mk_dossier[1000];
562     sprintf(nom_fichier_resultat,"%s/liste_modules_meca_%s_%s.txt",dossier_resultat,Identifiant_epsilon.c_str(),Identifiant_sigma.c_str());
563     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
564     ofstrm.precision(16);
565 couturad 930 std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_sph=map_ves_file_spherique.begin();
566     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_dev=map_ves_file_deviatorique.begin();
567     MSTRUCT_VES_FILE* file_sph;
568     MSTRUCT_VES_FILE* file_dev;
569 couturad 951 std::vector<MSTRUCT_ANALYSE_MODULES_MECA*> vector_analyse;
570 couturad 933 i=1;
571 couturad 951 for(;it_ves_sph!=map_ves_file_spherique.end();it_ves_sph++)
572 couturad 930 {
573 couturad 951 it_ves_dev++;
574 couturad 930 file_sph=it_ves_sph->second;
575     file_dev=it_ves_dev->second;
576     MSTRUCT_ANALYSE_CHAMP* epsilon_sph=(MSTRUCT_ANALYSE_CHAMP*)file_sph->get_analyse(Identifiant_epsilon);
577     MSTRUCT_ANALYSE_CHAMP* sigma_sph=(MSTRUCT_ANALYSE_CHAMP*)file_sph->get_analyse(Identifiant_sigma);
578     MSTRUCT_ANALYSE_CHAMP* epsilon_dev=(MSTRUCT_ANALYSE_CHAMP*)file_dev->get_analyse(Identifiant_epsilon);
579     MSTRUCT_ANALYSE_CHAMP* sigma_dev=(MSTRUCT_ANALYSE_CHAMP*)file_dev->get_analyse(Identifiant_sigma);
580     MSTRUCT_ANALYSE_MODULES_MECA* analyse_meca = new MSTRUCT_ANALYSE_MODULES_MECA(epsilon_sph,
581     sigma_sph,
582     epsilon_dev,
583     sigma_dev,
584     Largeur_colonne_distribution_module_Kapp,
585     Largeur_colonne_distribution_module_Gapp,
586     Largeur_colonne_distribution_module_Eapp,
587     Largeur_colonne_distribution_module_Nuapp);
588 couturad 951 if(i==1) analyse_meca->exporter(ofstrm,i,true);
589     else analyse_meca->exporter(ofstrm,i,false);
590     delete analyse_meca;
591     ofstrm.close();
592     i++;
593     }
594     }
595     }
596     }
597    
598     int MSTRUCT_VER::cumuler_modules_mecaniques(char* fichier_liste_ves_spherique,
599     char* fichier_liste_ves_deviatorique,
600     std::vector< OT_PARAMETRES* >& vector_params_ver,
601     char* dossier_resultat,
602     bool avec_histogramme)
603     {
604     char message[5000];
605     std::map<long,MSTRUCT_VES_FILE*> map_ves_file_spherique;
606     std::ifstream f;
607     f.open(fichier_liste_ves_spherique,std::ios::in);
608     char ligne[1000];
609     f.getline(ligne,1000);
610     long i=0;
611     while(!f.eof())
612     {
613     char fichier_ves[1000];
614     sscanf(ligne,"%s",fichier_ves);
615     if(strlen(fichier_ves)==0) continue;
616     std::map<std::string,MSTRUCT_ANALYSE*>* map_analyse = new std::map<std::string,MSTRUCT_ANALYSE*>;
617     MSTRUCT_VES_FILE *ves_file=new MSTRUCT_VES_FILE;
618     if(ves_file->ouvrir(fichier_ves)==FAIL) return FAIL;
619     map_ves_file_spherique.insert(std::pair<long,MSTRUCT_VES_FILE*>(i,ves_file));
620     i++;
621     f.getline(ligne,1000);
622     }
623     f.close();
624     std::map<long,MSTRUCT_VES_FILE*> map_ves_file_deviatorique;
625     f.open(fichier_liste_ves_deviatorique,std::ios::in);
626     f.getline(ligne,1000);
627     i=0;
628     while(!f.eof())
629     {
630     char fichier_ves[1000];
631     sscanf(ligne,"%s",fichier_ves);
632     if(strlen(fichier_ves)==0) continue;
633     std::map<std::string,MSTRUCT_ANALYSE*>* map_analyse = new std::map<std::string,MSTRUCT_ANALYSE*>;
634     MSTRUCT_VES_FILE *ves_file=new MSTRUCT_VES_FILE;
635     if(ves_file->ouvrir(fichier_ves)==FAIL) return FAIL;
636     map_ves_file_deviatorique.insert(std::pair<long,MSTRUCT_VES_FILE*>(i,ves_file));
637     i++;
638     f.getline(ligne,1000);
639     }
640     f.close();
641     if(map_ves_file_spherique.size()!=map_ves_file_deviatorique.size())
642     {
643     std::cerr << "*** MSTRUCT_VER::calculer_module_young : Liste non identique ***" << std::endl;
644     return FAIL;
645     }
646     long nb_ves = map_ves_file_spherique.size();
647     sprintf(message,"NB_VES : %li",nb_ves); affiche(message);
648     std::vector<OT_PARAMETRES*>::iterator it;
649     for(it=vector_params_ver.begin();it!=vector_params_ver.end();it++)
650     {
651     OT_PARAMETRES *param = *it;
652     std::string Identifiant_epsilon = param->get_nom((char*)"Identifiant_epsilon");
653     std::string Identifiant_sigma = param->get_nom((char*)"Identifiant_sigma");
654     char ligne[1000];
655     sprintf(ligne,"-> %s_%s",Identifiant_epsilon.c_str(),Identifiant_sigma.c_str());
656     affiche(ligne);
657     double Largeur_colonne_distribution_module_Kapp = param->get_valeur((char*)"Largeur_colonne_distribution_module_Kapp");
658     double Largeur_colonne_distribution_module_Gapp = param->get_valeur((char*)"Largeur_colonne_distribution_module_Gapp");
659     double Largeur_colonne_distribution_module_Eapp = param->get_valeur((char*)"Largeur_colonne_distribution_module_Eapp");
660     double Largeur_colonne_distribution_module_Nuapp = param->get_valeur((char*)"Largeur_colonne_distribution_module_Nuapp");
661     int Analyse_erosion = (int)param->get_valeur((char*)"Analyse_erosion");
662     if(Analyse_erosion)
663     {
664     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_sph=map_ves_file_spherique.begin();
665     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_dev=map_ves_file_deviatorique.begin();
666     MSTRUCT_VES_FILE* file_sph=it_ves_sph->second;
667     MSTRUCT_VES_FILE* file_dev=it_ves_dev->second;
668     MSTRUCT_ANALYSE_EROSION* analyse_erosion_epsilon_sph = (MSTRUCT_ANALYSE_EROSION*)file_sph->get_analyse(Identifiant_epsilon);
669     MSTRUCT_ANALYSE_EROSION* analyse_erosion_sigma_sph = (MSTRUCT_ANALYSE_EROSION*)file_sph->get_analyse(Identifiant_sigma);
670     MSTRUCT_ANALYSE_EROSION* analyse_erosion_epsilon_dev = (MSTRUCT_ANALYSE_EROSION*)file_dev->get_analyse(Identifiant_epsilon);
671     MSTRUCT_ANALYSE_EROSION* analyse_erosion_sigma_dev = (MSTRUCT_ANALYSE_EROSION*)file_dev->get_analyse(Identifiant_sigma);
672     long nb_couche=analyse_erosion_epsilon_sph->get_nb_couche();
673     char sys_mk_dossier[1000];
674     char sous_dossier[1000];
675     char nom_fichier_resultat[1000];
676     for(long j=0;j<nb_couche;j++)
677     {
678     sprintf(ligne,"\033[1A\033[K-> Couche #%li",j);
679     affiche(ligne);
680     sprintf(sys_mk_dossier,"mkdir -p %s/c_%li",dossier_resultat,j);
681     system(sys_mk_dossier);
682     sprintf(sous_dossier,"%s/c_%li/",dossier_resultat,j);
683     sprintf(nom_fichier_resultat,"%s/c_%li/cumul_modules_meca_%s_%s.txt",dossier_resultat,j,Identifiant_epsilon.c_str(),Identifiant_sigma.c_str());
684     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
685     ofstrm.precision(16);
686     it_ves_sph=map_ves_file_spherique.begin();
687     it_ves_dev=map_ves_file_deviatorique.begin();
688     std::vector<MSTRUCT_ANALYSE_MODULES_MECA*> vector_analyse;
689     for(;it_ves_sph!=map_ves_file_spherique.end();it_ves_sph++,it_ves_dev++)
690 couturad 926 {
691 couturad 951 file_sph=it_ves_sph->second;
692     file_dev=it_ves_dev->second;
693     analyse_erosion_epsilon_sph = (MSTRUCT_ANALYSE_EROSION*)file_sph->get_analyse(Identifiant_epsilon);
694     analyse_erosion_sigma_sph = (MSTRUCT_ANALYSE_EROSION*)file_sph->get_analyse(Identifiant_sigma);
695     analyse_erosion_epsilon_dev = (MSTRUCT_ANALYSE_EROSION*)file_dev->get_analyse(Identifiant_epsilon);
696     analyse_erosion_sigma_dev = (MSTRUCT_ANALYSE_EROSION*)file_dev->get_analyse(Identifiant_sigma);
697     MSTRUCT_ANALYSE_CHAMP* epsilon_sph=(MSTRUCT_ANALYSE_CHAMP*)analyse_erosion_epsilon_sph->get_analyse(j);
698     MSTRUCT_ANALYSE_CHAMP* sigma_sph=(MSTRUCT_ANALYSE_CHAMP*)analyse_erosion_sigma_sph->get_analyse(j);
699     MSTRUCT_ANALYSE_CHAMP* epsilon_dev=(MSTRUCT_ANALYSE_CHAMP*)analyse_erosion_epsilon_dev->get_analyse(j);
700     MSTRUCT_ANALYSE_CHAMP* sigma_dev=(MSTRUCT_ANALYSE_CHAMP*)analyse_erosion_sigma_dev->get_analyse(j);
701     MSTRUCT_ANALYSE_MODULES_MECA* analyse_meca = new MSTRUCT_ANALYSE_MODULES_MECA(epsilon_sph,
702     sigma_sph,
703     epsilon_dev,
704     sigma_dev,
705     Largeur_colonne_distribution_module_Kapp,
706     Largeur_colonne_distribution_module_Gapp,
707     Largeur_colonne_distribution_module_Eapp,
708     Largeur_colonne_distribution_module_Nuapp);
709     vector_analyse.push_back(analyse_meca);
710 couturad 926 }
711 couturad 951
712     MSTRUCT_ANALYSE_MODULES_MECA analyse_meca_globale(vector_analyse);
713     analyse_meca_globale.exporter(ofstrm,nb_ves,true,avec_histogramme,sous_dossier);
714     ofstrm.close();
715     for(std::vector<MSTRUCT_ANALYSE_MODULES_MECA*>::iterator it_vct_analyse=vector_analyse.begin();it_vct_analyse!=vector_analyse.end();it_vct_analyse++) delete *it_vct_analyse;
716 couturad 930 }
717 couturad 951 sprintf(ligne,"\033[1A\033[K");
718     affiche(ligne);
719     }
720     else
721     {
722     char nom_fichier_resultat[1000];
723     sprintf(nom_fichier_resultat,"%s/cumul_modules_meca_%s_%s.txt",dossier_resultat,Identifiant_epsilon.c_str(),Identifiant_sigma.c_str());
724     std::ofstream ofstrm(nom_fichier_resultat,std::ios::out);
725     ofstrm.precision(16);
726     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_sph=map_ves_file_spherique.begin();
727     std::map<long,MSTRUCT_VES_FILE*>::iterator it_ves_dev=map_ves_file_deviatorique.begin();
728     MSTRUCT_VES_FILE* file_sph;
729     MSTRUCT_VES_FILE* file_dev;
730     std::vector<MSTRUCT_ANALYSE_MODULES_MECA*> vector_analyse;
731     for(;it_ves_sph!=map_ves_file_spherique.end();it_ves_sph++)
732 couturad 930 {
733 couturad 951 it_ves_dev++;
734     file_sph=it_ves_sph->second;
735     file_dev=it_ves_dev->second;
736     MSTRUCT_ANALYSE_CHAMP* epsilon_sph=(MSTRUCT_ANALYSE_CHAMP*)file_sph->get_analyse(Identifiant_epsilon);
737     MSTRUCT_ANALYSE_CHAMP* sigma_sph=(MSTRUCT_ANALYSE_CHAMP*)file_sph->get_analyse(Identifiant_sigma);
738     MSTRUCT_ANALYSE_CHAMP* epsilon_dev=(MSTRUCT_ANALYSE_CHAMP*)file_dev->get_analyse(Identifiant_epsilon);
739     MSTRUCT_ANALYSE_CHAMP* sigma_dev=(MSTRUCT_ANALYSE_CHAMP*)file_dev->get_analyse(Identifiant_sigma);
740     MSTRUCT_ANALYSE_MODULES_MECA* analyse_meca = new MSTRUCT_ANALYSE_MODULES_MECA(epsilon_sph,
741     sigma_sph,
742     epsilon_dev,
743     sigma_dev,
744     Largeur_colonne_distribution_module_Kapp,
745     Largeur_colonne_distribution_module_Gapp,
746     Largeur_colonne_distribution_module_Eapp,
747     Largeur_colonne_distribution_module_Nuapp);
748     vector_analyse.push_back(analyse_meca);
749 couturad 930 }
750 couturad 951 MSTRUCT_ANALYSE_MODULES_MECA analyse_meca_globale(vector_analyse);
751     analyse_meca_globale.exporter(ofstrm,nb_ves,true,avec_histogramme,dossier_resultat);
752     ofstrm.close();
753     for(std::vector<MSTRUCT_ANALYSE_MODULES_MECA*>::iterator it_vct_analyse=vector_analyse.begin();it_vct_analyse!=vector_analyse.end();it_vct_analyse++) delete *it_vct_analyse;
754     }
755 couturad 930 }
756 couturad 919 }
757    
758    
759    
760    
761    
762 couturad 926
763    
764    
765    
766    
767    
768    
769    
770    
771    
772    
773