ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/microstructure/src/mstruct_ver.cpp
Revision: 1029
Committed: Fri Jul 12 19:34:50 2019 UTC (5 years, 10 months ago) by couturad
File size: 46163 byte(s)
Log Message:
Parralelisation des calculs des microstructures a particules

File Contents

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