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