1 |
couturad |
919 |
#include "mstruct_parametres.h" |
2 |
couturad |
968 |
#include "mstruct_definition.h" |
3 |
couturad |
919 |
#include "mstruct_generateur_rsa.h" |
4 |
couturad |
926 |
#include "mg_export.h" |
5 |
couturad |
919 |
#include <string.h> |
6 |
|
|
#include <fstream> |
7 |
|
|
#include <cstdlib> |
8 |
|
|
|
9 |
|
|
|
10 |
couturad |
951 |
void PARAMETRES::ini_param_generateur_rsa(OT_PARAMETRES* params, int type_inclusion) |
11 |
couturad |
919 |
{ |
12 |
couturad |
951 |
params->ajouter("Type_generateur","0",OT_PARAMETRES::DOUBLE,"Type de generateur : RSA [0], DCR [1]"); |
13 |
couturad |
919 |
params->ajouter("Nom_mgcg_modele","VES",OT_PARAMETRES::STRING,"Nom du MG_CG_MODELE"); |
14 |
couturad |
951 |
params->ajouter("Nom_groupe_inclusion","Particule",OT_PARAMETRES::STRING,"Nom du groupe d'inclusion (Ex: Particule)"); |
15 |
couturad |
919 |
params->ajouter("Boite3D_distribution_Xmin","-0.1",OT_PARAMETRES::DOUBLE,"Xmin boite3D de distribution d'inclusion"); |
16 |
|
|
params->ajouter("Boite3D_distribution_Ymin","-0.1",OT_PARAMETRES::DOUBLE,"Ymin boite3D de distribution d'inclusion"); |
17 |
|
|
params->ajouter("Boite3D_distribution_Zmin","-0.1",OT_PARAMETRES::DOUBLE,"Zmin boite3D de distribution d'inclusion"); |
18 |
|
|
params->ajouter("Boite3D_distribution_Xmax","1.1",OT_PARAMETRES::DOUBLE,"Xmax boite3D de distribution d'inclusion"); |
19 |
|
|
params->ajouter("Boite3D_distribution_Ymax","1.1",OT_PARAMETRES::DOUBLE,"Ymax boite3D de distribution d'inclusion"); |
20 |
|
|
params->ajouter("Boite3D_distribution_Zmax","1.1",OT_PARAMETRES::DOUBLE,"Zmax boite3D de distribution d'inclusion"); |
21 |
|
|
params->ajouter("Nb_pas_X","20",OT_PARAMETRES::DOUBLE,"Nombre de pas selon X pout la creation d'un octree"); |
22 |
|
|
params->ajouter("Nb_pas_Y","20",OT_PARAMETRES::DOUBLE,"Nombre de pas selon Y pout la creation d'un octree"); |
23 |
|
|
params->ajouter("Nb_pas_Z","20",OT_PARAMETRES::DOUBLE,"Nombre de pas selon Z pout la creation d'un octree"); |
24 |
couturad |
951 |
params->ajouter("Fraction_volumique_cible","0.1",OT_PARAMETRES::DOUBLE,"Fraction volumique cible d'inclusion [0.0, 1.0]"); |
25 |
|
|
params->ajouter("Eps_fraction_volumique","0.001",OT_PARAMETRES::DOUBLE,"Epsilon fraction volumique"); |
26 |
|
|
params->ajouter("Avec_intersections","1",OT_PARAMETRES::DOUBLE,"Avec ou sans intersections avec le bord du VES : Sans [0] Avec [1]"); |
27 |
couturad |
968 |
if(type_inclusion==MSTRUCT::TYPE_INCLUSION::SPHERE) |
28 |
couturad |
919 |
{ |
29 |
|
|
params->ajouter("Type_inclusion","0",OT_PARAMETRES::DOUBLE,"Type d'inclusion : Sphere [0], Cylindre [1]"); |
30 |
couturad |
951 |
params->ajouter("Mu_rayon","0.09",OT_PARAMETRES::DOUBLE,"Moyenne du rayon de la sphere"); |
31 |
couturad |
919 |
params->ajouter("Sigma_rayon","0.0",OT_PARAMETRES::DOUBLE,"Ecart type du rayon de la sphere"); |
32 |
couturad |
951 |
params->ajouter("Type_distribution_rayon","0",OT_PARAMETRES::DOUBLE,"Type de distribution du rayon : Fixe[0], Uniforme[1], Normale[2]"); |
33 |
couturad |
919 |
} |
34 |
couturad |
968 |
if(type_inclusion==MSTRUCT::TYPE_INCLUSION::CYLINDRE) |
35 |
couturad |
919 |
{ |
36 |
|
|
params->ajouter("Type_inclusion","1",OT_PARAMETRES::DOUBLE,"Type d'inclusion : Sphere [0], Cylindre [1]"); |
37 |
couturad |
926 |
params->ajouter("Mu_rayon","0.05",OT_PARAMETRES::DOUBLE,"Moyenne du rayon du cylindre"); |
38 |
couturad |
919 |
params->ajouter("Sigma_rayon","0.0",OT_PARAMETRES::DOUBLE,"Ecart type du rayon du cylindre"); |
39 |
couturad |
951 |
params->ajouter("Type_distribution_rayon","0",OT_PARAMETRES::DOUBLE,"Type de distribution du rayon : Fixe[0], Uniforme[1], Normale[2]"); |
40 |
couturad |
926 |
params->ajouter("Mu_longueur","0.4",OT_PARAMETRES::DOUBLE,"Moyenne de la longueur du cylindre"); |
41 |
couturad |
919 |
params->ajouter("Sigma_longueur","0.0",OT_PARAMETRES::DOUBLE,"Ecart type de la longueur du cylindre"); |
42 |
couturad |
951 |
params->ajouter("Type_distribution_longueur","0",OT_PARAMETRES::DOUBLE,"Type de distribution de la longueur : Fixe[0], Uniforme[1], Normale[2]"); |
43 |
couturad |
929 |
params->ajouter("Mu_theta","0.0",OT_PARAMETRES::DOUBLE,"Moyenne de l'angle theta"); |
44 |
couturad |
951 |
params->ajouter("Sigma_theta","1.0",OT_PARAMETRES::DOUBLE,"Ecart type de l'angle theta"); |
45 |
|
|
params->ajouter("Type_distribution_theta","1",OT_PARAMETRES::DOUBLE,"Type de distribution de l'angle theta : Fixe[0], Uniforme[1], Normale[2]"); |
46 |
couturad |
929 |
params->ajouter("Mu_phi","0.0",OT_PARAMETRES::DOUBLE,"Moyenne de l'angle phi"); |
47 |
couturad |
951 |
params->ajouter("Sigma_phi","1.0",OT_PARAMETRES::DOUBLE,"Ecart type de l'angle phi"); |
48 |
|
|
params->ajouter("Type_distribution_phi","1",OT_PARAMETRES::DOUBLE,"Type de distribution de l'angle phi : Fixe[0], Uniforme[1], Normale[2]"); |
49 |
couturad |
919 |
} |
50 |
|
|
params->ajouter("Porosite","0",OT_PARAMETRES::DOUBLE,"Considerer l'inclusion comme etant une porosite (vide) [1]"); |
51 |
couturad |
951 |
params->ajouter("Multicouche","0,(0.01,0.01)",OT_PARAMETRES::DOUBLE,"Generer une inclusion avec une ou plusieurs couches [1,2,3,etc] et d'epaisseurs (0.01,0.02,etc)"); |
52 |
couturad |
926 |
params->ajouter("Distance_min_inter_volume","0.04",OT_PARAMETRES::DOUBLE,"Distance minimale qui separe deux inclusions"); |
53 |
|
|
params->ajouter("Volume_min","0.0008",OT_PARAMETRES::DOUBLE,"Volume minimal admissible de l'inclusion"); |
54 |
|
|
params->ajouter("Aire_min","0.001963",OT_PARAMETRES::DOUBLE,"Aire minimal admissible d'une face de l'inclusion"); |
55 |
couturad |
919 |
params->ajouter("Longueur_min","0.02",OT_PARAMETRES::DOUBLE,"Longueur minimal admissible d'une arete "); |
56 |
|
|
params->ajouter("Angle_min","0.7854",OT_PARAMETRES::DOUBLE,"Angle minimal admissible entre deux faces"); |
57 |
|
|
params->ajouter("Nb_iteration_max","2000",OT_PARAMETRES::DOUBLE,"Nombre maximal d'iteration"); |
58 |
|
|
} |
59 |
|
|
|
60 |
couturad |
951 |
void PARAMETRES::ini_param_generateur_dcr(OT_PARAMETRES* params, int type_inclusion) |
61 |
|
|
{ |
62 |
|
|
params->ajouter("Type_generateur","1",OT_PARAMETRES::DOUBLE,"Type de generateur : RSA [0], DCR [1]"); |
63 |
|
|
params->ajouter("Nom_mgcg_modele","VES",OT_PARAMETRES::STRING,"Nom du MG_CG_MODELE"); |
64 |
|
|
params->ajouter("Nom_groupe_inclusion","Particule",OT_PARAMETRES::STRING,"Nom du groupe d'inclusion (Ex: Particule)"); |
65 |
|
|
params->ajouter("Boite3D_distribution_Xmin","-0.25",OT_PARAMETRES::DOUBLE,"Xmin boite3D de distribution d'inclusion"); |
66 |
|
|
params->ajouter("Boite3D_distribution_Ymin","-0.25",OT_PARAMETRES::DOUBLE,"Ymin boite3D de distribution d'inclusion"); |
67 |
|
|
params->ajouter("Boite3D_distribution_Zmin","-0.25",OT_PARAMETRES::DOUBLE,"Zmin boite3D de distribution d'inclusion"); |
68 |
|
|
params->ajouter("Boite3D_distribution_Xmax","1.25",OT_PARAMETRES::DOUBLE,"Xmax boite3D de distribution d'inclusion"); |
69 |
|
|
params->ajouter("Boite3D_distribution_Ymax","1.25",OT_PARAMETRES::DOUBLE,"Ymax boite3D de distribution d'inclusion"); |
70 |
|
|
params->ajouter("Boite3D_distribution_Zmax","1.25",OT_PARAMETRES::DOUBLE,"Zmax boite3D de distribution d'inclusion"); |
71 |
|
|
params->ajouter("Nb_pas_X","20",OT_PARAMETRES::DOUBLE,"Nombre de pas selon X pout la creation d'un octree"); |
72 |
|
|
params->ajouter("Nb_pas_Y","20",OT_PARAMETRES::DOUBLE,"Nombre de pas selon Y pout la creation d'un octree"); |
73 |
|
|
params->ajouter("Nb_pas_Z","20",OT_PARAMETRES::DOUBLE,"Nombre de pas selon Z pout la creation d'un octree"); |
74 |
|
|
params->ajouter("Fraction_volumique_cible","0.1",OT_PARAMETRES::DOUBLE,"Fraction volumique cible d'inclusion [0.0, 1.0]"); |
75 |
|
|
params->ajouter("Eps_fraction_volumique","0.001",OT_PARAMETRES::DOUBLE,"Epsilon fraction volumique"); |
76 |
|
|
params->ajouter("Avec_intersections","1",OT_PARAMETRES::DOUBLE,"Avec ou sans intersections avec le bord du VES : Sans [0] Avec [1]"); |
77 |
couturad |
960 |
params->ajouter("Avec_interface_graphique","0",OT_PARAMETRES::DOUBLE,"Avec l'interface graphique : Sans [0] Avec [1]"); |
78 |
|
|
params->ajouter("Facteur_reduction_vitesse","0.75",OT_PARAMETRES::DOUBLE,"Facteur de reduction de la vitesse des particules"); |
79 |
|
|
params->ajouter("Eps_vitesse","0.0001",OT_PARAMETRES::DOUBLE,"Eps vitesse"); |
80 |
|
|
params->ajouter("Friction","0.0",OT_PARAMETRES::DOUBLE,"Friction entre les particules"); |
81 |
|
|
params->ajouter("Pas_temps_sim","0.01",OT_PARAMETRES::DOUBLE,"Pas de temps pour la simulation"); |
82 |
couturad |
964 |
params->ajouter("Temps_max_sim","60.0",OT_PARAMETRES::DOUBLE,"Temps maximal de la simulation"); |
83 |
couturad |
966 |
params->ajouter("Avec_post_RSA","0",OT_PARAMETRES::DOUBLE,"Effectuer un RSA pour tenter de remplir les vides au bord du VES : Sans [0] Avec [1]"); |
84 |
|
|
params->ajouter("Nb_iteration_max","2000",OT_PARAMETRES::DOUBLE,"Nombre maximal d'iteration"); |
85 |
couturad |
968 |
if(type_inclusion==MSTRUCT::TYPE_INCLUSION::SPHERE) |
86 |
couturad |
951 |
{ |
87 |
|
|
params->ajouter("Type_inclusion","0",OT_PARAMETRES::DOUBLE,"Type d'inclusion : Sphere [0], Cylindre [1]"); |
88 |
|
|
params->ajouter("Mu_rayon","0.09",OT_PARAMETRES::DOUBLE,"Moyenne du rayon de la sphere"); |
89 |
|
|
params->ajouter("Sigma_rayon","0.0",OT_PARAMETRES::DOUBLE,"Ecart type du rayon de la sphere"); |
90 |
|
|
params->ajouter("Type_distribution_rayon","0",OT_PARAMETRES::DOUBLE,"Type de distribution du rayon : Fixe[0], Uniforme[1], Normale[2]"); |
91 |
|
|
} |
92 |
couturad |
968 |
if(type_inclusion==MSTRUCT::TYPE_INCLUSION::CYLINDRE) |
93 |
couturad |
951 |
{ |
94 |
|
|
params->ajouter("Type_inclusion","1",OT_PARAMETRES::DOUBLE,"Type d'inclusion : Sphere [0], Cylindre [1]"); |
95 |
|
|
params->ajouter("Mu_rayon","0.05",OT_PARAMETRES::DOUBLE,"Moyenne du rayon du cylindre"); |
96 |
|
|
params->ajouter("Sigma_rayon","0.0",OT_PARAMETRES::DOUBLE,"Ecart type du rayon du cylindre"); |
97 |
|
|
params->ajouter("Type_distribution_rayon","0",OT_PARAMETRES::DOUBLE,"Type de distribution du rayon : Fixe[0], Uniforme[1], Normale[2]"); |
98 |
|
|
params->ajouter("Mu_longueur","0.4",OT_PARAMETRES::DOUBLE,"Moyenne de la longueur du cylindre"); |
99 |
|
|
params->ajouter("Sigma_longueur","0.0",OT_PARAMETRES::DOUBLE,"Ecart type de la longueur du cylindre"); |
100 |
|
|
params->ajouter("Type_distribution_longueur","0",OT_PARAMETRES::DOUBLE,"Type de distribution de la longueur : Fixe[0], Uniforme[1], Normale[2]"); |
101 |
|
|
params->ajouter("Mu_theta","0.0",OT_PARAMETRES::DOUBLE,"Moyenne de l'angle theta"); |
102 |
|
|
params->ajouter("Sigma_theta","1.0",OT_PARAMETRES::DOUBLE,"Ecart type de l'angle theta"); |
103 |
|
|
params->ajouter("Type_distribution_theta","1",OT_PARAMETRES::DOUBLE,"Type de distribution de l'angle theta : Fixe[0], Uniforme[1], Normale[2]"); |
104 |
|
|
params->ajouter("Mu_phi","0.0",OT_PARAMETRES::DOUBLE,"Moyenne de l'angle phi"); |
105 |
|
|
params->ajouter("Sigma_phi","1.0",OT_PARAMETRES::DOUBLE,"Ecart type de l'angle phi"); |
106 |
|
|
params->ajouter("Type_distribution_phi","1",OT_PARAMETRES::DOUBLE,"Type de distribution de l'angle phi : Fixe[0], Uniforme[1], Normale[2]"); |
107 |
|
|
} |
108 |
|
|
params->ajouter("Porosite","0",OT_PARAMETRES::DOUBLE,"Considerer l'inclusion comme etant une porosite (vide) [1]"); |
109 |
|
|
params->ajouter("Multicouche","0,(0.01,0.01)",OT_PARAMETRES::DOUBLE,"Generer une inclusion avec une ou plusieurs couches [1,2,3,etc] et d'epaisseurs (0.01,0.02,etc)"); |
110 |
|
|
params->ajouter("Distance_min_inter_volume","0.04",OT_PARAMETRES::DOUBLE,"Distance minimale qui separe deux inclusions"); |
111 |
|
|
params->ajouter("Volume_min","0.0008",OT_PARAMETRES::DOUBLE,"Volume minimal admissible de l'inclusion"); |
112 |
|
|
params->ajouter("Aire_min","0.001963",OT_PARAMETRES::DOUBLE,"Aire minimal admissible d'une face de l'inclusion"); |
113 |
|
|
params->ajouter("Longueur_min","0.02",OT_PARAMETRES::DOUBLE,"Longueur minimal admissible d'une arete "); |
114 |
|
|
params->ajouter("Angle_min","0.7854",OT_PARAMETRES::DOUBLE,"Angle minimal admissible entre deux faces"); |
115 |
|
|
} |
116 |
|
|
|
117 |
|
|
|
118 |
couturad |
919 |
void PARAMETRES::ini_param_materiau(OT_PARAMETRES* params,char* nom_groupe_forme) |
119 |
|
|
{ |
120 |
couturad |
951 |
params->ajouter("Nom_groupe_forme",nom_groupe_forme,OT_PARAMETRES::STRING,"Nom du groupe de forme (Ex: Particule, Matrice)"); |
121 |
couturad |
919 |
params->ajouter("Mu_E","69.0e9",OT_PARAMETRES::DOUBLE,"Moyenne du module d'elasticite"); |
122 |
|
|
params->ajouter("Sigma_E","0.0",OT_PARAMETRES::DOUBLE,"Ecart type du module d'elasticite"); |
123 |
|
|
params->ajouter("Mu_nu","0.3",OT_PARAMETRES::DOUBLE,"Moyenne du coefficient de Poisson"); |
124 |
|
|
params->ajouter("Sigma_nu","0.0",OT_PARAMETRES::DOUBLE,"Ecart type du coefficient de Poisson"); |
125 |
|
|
} |
126 |
|
|
|
127 |
|
|
void PARAMETRES::ini_param_carte_taille(OT_PARAMETRES* params) |
128 |
|
|
{ |
129 |
|
|
params->ajouter("Nom_carte","carte",OT_PARAMETRES::STRING,"Nom de la carte de taille"); |
130 |
couturad |
951 |
params->ajouter("Ecart_nodal","0.08",OT_PARAMETRES::DOUBLE,"Ecart nodal"); |
131 |
couturad |
937 |
params->ajouter("Ecart_nodal_face_particule","0.04",OT_PARAMETRES::DOUBLE,"Ecart nodal des faces des particules"); |
132 |
couturad |
919 |
params->ajouter("Fechantillonnage","20",OT_PARAMETRES::DOUBLE,"Nombre d'échantillon par entité"); |
133 |
couturad |
926 |
params->ajouter("Nb_cellule_direction","50",OT_PARAMETRES::DOUBLE,"Nombre de cellules de la FEM_SOLUTION dans les directions x,y,z"); |
134 |
couturad |
919 |
params->ajouter("Nom_fem_solution","solcarte",OT_PARAMETRES::STRING,"Nom de la FEM_SOLUTION"); |
135 |
|
|
params->ajouter("Nb_couche_min","2",OT_PARAMETRES::DOUBLE,"Nombre de couches entre chaque solide"); |
136 |
|
|
params->ajouter("Nb_pas","32",OT_PARAMETRES::DOUBLE,"Nombre de pas de balayage"); |
137 |
|
|
params->ajouter("Facteur_augmentation","25",OT_PARAMETRES::DOUBLE,"Facteur d'augmentation de l'ecart nodal d'une cellule a l'autre"); |
138 |
|
|
} |
139 |
|
|
|
140 |
|
|
void PARAMETRES::ini_param_mailleur(OT_PARAMETRES* params) |
141 |
|
|
{ |
142 |
|
|
params->ajouter("Niveau","3",OT_PARAMETRES::DOUBLE,"Niveau du maillage : 1D [1], 2D [2], 3D [3]"); |
143 |
|
|
params->ajouter("Niveau_opt_2d","5",OT_PARAMETRES::DOUBLE,"Limite supérieure des mailles à optimiser"); |
144 |
couturad |
966 |
params->ajouter("Niveau_opt_3d","2",OT_PARAMETRES::DOUBLE,"Limite supérieure des mailles à optimiser"); |
145 |
couturad |
919 |
params->ajouter("Priorite_metrique","0.65",OT_PARAMETRES::DOUBLE,"Valeur de la prise en compte de la métrique versus la qualité"); |
146 |
|
|
} |
147 |
|
|
|
148 |
|
|
void PARAMETRES::ini_param_mailleur_fem(OT_PARAMETRES* params) |
149 |
|
|
{ |
150 |
|
|
params->ajouter("Degre","2",OT_PARAMETRES::DOUBLE,"Degre du maillage a creer"); |
151 |
|
|
params->ajouter("Analyse","0",OT_PARAMETRES::DOUBLE,"Analyse de la qualité du maillage après le maillage : Analyse [1]"); |
152 |
|
|
params->ajouter("Optimisation_num_noeud","0",OT_PARAMETRES::DOUBLE,"Optimisation de la numerotation des noeuds : Optimisation [1]"); |
153 |
|
|
} |
154 |
|
|
|
155 |
|
|
void PARAMETRES::ini_param_etude(OT_PARAMETRES* params, int type_etude) |
156 |
|
|
{ |
157 |
|
|
params->ajouter("Fichier_param_aster","param_aster.txt",OT_PARAMETRES::STRING,"Nom du fichier de parametres aster"); |
158 |
|
|
params->ajouter("Type_etude",type_etude,OT_PARAMETRES::DOUBLE,"Type d'etude : Mecanique [0], Thermique [1]"); |
159 |
|
|
params->ajouter("Type_calcul","0",OT_PARAMETRES::DOUBLE,"Type de calcul : Elastique [0]"); |
160 |
|
|
params->ajouter("Code_resu","11111111",OT_PARAMETRES::STRING,"Code de resolution"); |
161 |
couturad |
968 |
if(type_etude==MSTRUCT::TYPE_ETUDE::MECANIQUE) |
162 |
couturad |
919 |
{ |
163 |
|
|
params->ajouter("Type_Chargement","0",OT_PARAMETRES::DOUBLE,"Type de chargement : Spherique [0], Deviatorique [1]"); |
164 |
|
|
params->ajouter("Type_CL","0",OT_PARAMETRES::DOUBLE,"Type de conditions aux limites : CLDH [0], CLCH[1]"); |
165 |
|
|
params->ajouter("Valeur_CL","0.0001",OT_PARAMETRES::DOUBLE,"Valeur de la condition aux limites"); |
166 |
|
|
} |
167 |
|
|
} |
168 |
|
|
|
169 |
couturad |
968 |
void PARAMETRES::ini_param_post_traitement(OT_PARAMETRES* params, int type_post_traitement, int nb_couche, double epaisseur_couche) |
170 |
couturad |
919 |
{ |
171 |
couturad |
968 |
bool erosion; |
172 |
|
|
if(nb_couche>0) erosion=true; |
173 |
|
|
else erosion=false; |
174 |
|
|
if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP) |
175 |
couturad |
926 |
{ |
176 |
|
|
params->ajouter("Identifiant","Champ_SIGMA",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
177 |
couturad |
968 |
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
178 |
couturad |
926 |
params->ajouter("Num_solution",2,OT_PARAMETRES::DOUBLE,"Numero de la FEM_SOLUTION solution (0,1,2,...)"); |
179 |
|
|
params->ajouter("Nom_groupe_forme","ALL",OT_PARAMETRES::STRING,"Nom du groupe d'inclusion. Si [ALL] prend le ves au complet"); |
180 |
couturad |
968 |
params->ajouter("Largeur_colonne_distribution","0.1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
181 |
|
|
params->ajouter("Boite_analyse",0,OT_PARAMETRES::DOUBLE,"Calculer à partir des elements donc le centre de la boite englobante figure dans la boite d'analyse [1]"); |
182 |
|
|
params->ajouter("Boite3D_analyse_Xmin","0.1",OT_PARAMETRES::DOUBLE,"Xmin boite3D d'analyse"); |
183 |
|
|
params->ajouter("Boite3D_analyse_Ymin","0.1",OT_PARAMETRES::DOUBLE,"Ymin boite3D d'analyse"); |
184 |
|
|
params->ajouter("Boite3D_analyse_Zmin","0.1",OT_PARAMETRES::DOUBLE,"Zmin boite3D d'analyse"); |
185 |
|
|
params->ajouter("Boite3D_analyse_Xmax","0.9",OT_PARAMETRES::DOUBLE,"Xmax boite3D d'analyse"); |
186 |
|
|
params->ajouter("Boite3D_analyse_Ymax","0.9",OT_PARAMETRES::DOUBLE,"Ymax boite3D d'analyse"); |
187 |
|
|
params->ajouter("Boite3D_analyse_Zmax","0.9",OT_PARAMETRES::DOUBLE,"Zmax boite3D d'analyse"); |
188 |
couturad |
926 |
} |
189 |
couturad |
968 |
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_ORIENTATION) |
190 |
couturad |
926 |
{ |
191 |
couturad |
951 |
params->ajouter("Identifiant","Orientation_Particule",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
192 |
couturad |
968 |
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_ORIENTATION,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
193 |
couturad |
951 |
params->ajouter("Nom_groupe_forme","Particule",OT_PARAMETRES::STRING,"Nom du groupe d'inclusion."); |
194 |
|
|
params->ajouter("Avec_fem_maillage","1",OT_PARAMETRES::DOUBLE,"Analyser le volume des particules avec le FEM_MAILLAGE"); |
195 |
couturad |
968 |
params->ajouter("Boite_analyse",0,OT_PARAMETRES::DOUBLE,"Calculer à partir des elements donc le centre de la boite englobante figure dans la boite d'analyse [1]"); |
196 |
|
|
params->ajouter("Boite3D_analyse_Xmin","0.1",OT_PARAMETRES::DOUBLE,"Xmin boite3D d'analyse"); |
197 |
|
|
params->ajouter("Boite3D_analyse_Ymin","0.1",OT_PARAMETRES::DOUBLE,"Ymin boite3D d'analyse"); |
198 |
|
|
params->ajouter("Boite3D_analyse_Zmin","0.1",OT_PARAMETRES::DOUBLE,"Zmin boite3D d'analyse"); |
199 |
|
|
params->ajouter("Boite3D_analyse_Xmax","0.9",OT_PARAMETRES::DOUBLE,"Xmax boite3D d'analyse"); |
200 |
|
|
params->ajouter("Boite3D_analyse_Ymax","0.9",OT_PARAMETRES::DOUBLE,"Ymax boite3D d'analyse"); |
201 |
|
|
params->ajouter("Boite3D_analyse_Zmax","0.9",OT_PARAMETRES::DOUBLE,"Zmax boite3D d'analyse"); |
202 |
couturad |
938 |
} |
203 |
couturad |
968 |
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_CAO) |
204 |
couturad |
926 |
{ |
205 |
|
|
params->ajouter("Identifiant","Cao",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
206 |
couturad |
968 |
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_CAO,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
207 |
couturad |
926 |
params->ajouter("Nom_groupe_forme","ALL",OT_PARAMETRES::STRING,"Nom du groupe d'inclusion. Si [NULL] prend le ves au complet"); |
208 |
|
|
params->ajouter("Largeur_colonne_distribution_nb_volume","1.0",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
209 |
|
|
params->ajouter("Largeur_colonne_distribution_nb_forme","1.0",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
210 |
couturad |
966 |
params->ajouter("Largeur_colonne_distribution_volume","0.0001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
211 |
|
|
params->ajouter("Largeur_colonne_distribution_fraction_volumique","0.0001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
212 |
couturad |
926 |
params->ajouter("Largeur_colonne_distribution_volume_forme","0.001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
213 |
|
|
} |
214 |
couturad |
968 |
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_MG) |
215 |
couturad |
926 |
{ |
216 |
|
|
params->ajouter("Identifiant","Maillage_MG",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
217 |
couturad |
968 |
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_MG,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
218 |
couturad |
926 |
params->ajouter("Nom_groupe_forme","ALL",OT_PARAMETRES::STRING,"Nom du groupe d'inclusion. Si [ALL] prend le ves au complet"); |
219 |
|
|
params->ajouter("Largeur_colonne_distribution_nb_element_2D","100",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
220 |
|
|
params->ajouter("Largeur_colonne_distribution_nb_element_3D","100",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
221 |
|
|
params->ajouter("Largeur_colonne_distribution_qualite_2D","0.001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
222 |
|
|
params->ajouter("Largeur_colonne_distribution_qualite_3D","0.001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
223 |
|
|
params->ajouter("Largeur_colonne_distribution_taille_2D","0.0001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
224 |
|
|
params->ajouter("Largeur_colonne_distribution_taille_3D","0.0001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
225 |
couturad |
968 |
params->ajouter("Largeur_colonne_distribution_volume","0.0001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
226 |
|
|
params->ajouter("Largeur_colonne_distribution_fraction_volumique","0.0001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
227 |
|
|
params->ajouter("Boite_analyse",0,OT_PARAMETRES::DOUBLE,"Calculer à partir des elements donc le centre de la boite englobante figure dans la boite d'analyse [1]"); |
228 |
|
|
params->ajouter("Boite3D_analyse_Xmin","0.1",OT_PARAMETRES::DOUBLE,"Xmin boite3D d'analyse"); |
229 |
|
|
params->ajouter("Boite3D_analyse_Ymin","0.1",OT_PARAMETRES::DOUBLE,"Ymin boite3D d'analyse"); |
230 |
|
|
params->ajouter("Boite3D_analyse_Zmin","0.1",OT_PARAMETRES::DOUBLE,"Zmin boite3D d'analyse"); |
231 |
|
|
params->ajouter("Boite3D_analyse_Xmax","0.9",OT_PARAMETRES::DOUBLE,"Xmax boite3D d'analyse"); |
232 |
|
|
params->ajouter("Boite3D_analyse_Ymax","0.9",OT_PARAMETRES::DOUBLE,"Ymax boite3D d'analyse"); |
233 |
|
|
params->ajouter("Boite3D_analyse_Zmax","0.9",OT_PARAMETRES::DOUBLE,"Zmax boite3D d'analyse"); |
234 |
couturad |
926 |
} |
235 |
couturad |
968 |
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_FEM) |
236 |
couturad |
926 |
{ |
237 |
|
|
params->ajouter("Identifiant","Maillage_FEM",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
238 |
couturad |
968 |
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_FEM,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
239 |
couturad |
926 |
params->ajouter("Nom_groupe_forme","ALL",OT_PARAMETRES::STRING,"Nom du groupe d'inclusion. Si [ALL] prend le ves au complet"); |
240 |
|
|
params->ajouter("Largeur_colonne_distribution_nb_element_2D","100",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
241 |
|
|
params->ajouter("Largeur_colonne_distribution_nb_element_3D","100",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
242 |
|
|
params->ajouter("Largeur_colonne_distribution_jacobien_2D_min","0.001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
243 |
|
|
params->ajouter("Largeur_colonne_distribution_jacobien_2D_max","0.001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
244 |
|
|
params->ajouter("Largeur_colonne_distribution_jacobien_3D_min","0.001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
245 |
|
|
params->ajouter("Largeur_colonne_distribution_jacobien_3D_max","0.001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
246 |
|
|
params->ajouter("Largeur_colonne_distribution_distortion_2D","0.001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
247 |
|
|
params->ajouter("Largeur_colonne_distribution_distortion_3D","0.001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
248 |
couturad |
968 |
params->ajouter("Largeur_colonne_distribution_volume","0.0001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
249 |
|
|
params->ajouter("Largeur_colonne_distribution_fraction_volumique","0.0001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
250 |
|
|
params->ajouter("Boite_analyse",0,OT_PARAMETRES::DOUBLE,"Calculer à partir des elements donc le centre de la boite englobante figure dans la boite d'analyse [1]"); |
251 |
|
|
params->ajouter("Boite3D_analyse_Xmin","0.1",OT_PARAMETRES::DOUBLE,"Xmin boite3D d'analyse"); |
252 |
|
|
params->ajouter("Boite3D_analyse_Ymin","0.1",OT_PARAMETRES::DOUBLE,"Ymin boite3D d'analyse"); |
253 |
|
|
params->ajouter("Boite3D_analyse_Zmin","0.1",OT_PARAMETRES::DOUBLE,"Zmin boite3D d'analyse"); |
254 |
|
|
params->ajouter("Boite3D_analyse_Xmax","0.9",OT_PARAMETRES::DOUBLE,"Xmax boite3D d'analyse"); |
255 |
|
|
params->ajouter("Boite3D_analyse_Ymax","0.9",OT_PARAMETRES::DOUBLE,"Ymax boite3D d'analyse"); |
256 |
|
|
params->ajouter("Boite3D_analyse_Zmax","0.9",OT_PARAMETRES::DOUBLE,"Zmax boite3D d'analyse"); |
257 |
|
|
} |
258 |
|
|
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_TEMPS) |
259 |
|
|
{ |
260 |
|
|
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_TEMPS,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
261 |
|
|
params->ajouter("Largeur_colonne_temps_geometrie","1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
262 |
|
|
params->ajouter("Largeur_colonne_temps_materiau","1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
263 |
|
|
params->ajouter("Largeur_colonne_temps_carte","1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
264 |
|
|
params->ajouter("Largeur_colonne_temps_mg_maillage","1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
265 |
|
|
params->ajouter("Largeur_colonne_temps_fem_maillage","1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
266 |
|
|
params->ajouter("Largeur_colonne_temps_etude","1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
267 |
|
|
params->ajouter("Largeur_colonne_temps_calcul","1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
268 |
|
|
} |
269 |
|
|
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_MODULES_ELASTICITE) |
270 |
|
|
{ |
271 |
|
|
params->ajouter("Identifiant","Modules_elasticite",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
272 |
|
|
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_MODULES_ELASTICITE,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
273 |
|
|
params->ajouter("Identifiant_epsilon","Champ_EPSILON",OT_PARAMETRES::STRING,"Identifiant de l'analyse du champ epsilon"); |
274 |
|
|
params->ajouter("Identifiant_sigma","Champ_SIGMA",OT_PARAMETRES::STRING,"Identifiant de l'analyse du champ sigma"); |
275 |
|
|
params->ajouter("Largeur_colonne_distribution_module_Kapp","1000000",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
276 |
|
|
params->ajouter("Largeur_colonne_distribution_module_Gapp","1000000",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
277 |
|
|
params->ajouter("Largeur_colonne_distribution_module_Eapp","1000000",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
278 |
|
|
params->ajouter("Largeur_colonne_distribution_module_Nuapp","0.00001",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
279 |
|
|
} |
280 |
|
|
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_NORMALISE) |
281 |
|
|
{ |
282 |
|
|
params->ajouter("Identifiant","Champ_EPSILON_normalise",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
283 |
|
|
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_NORMALISE,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
284 |
|
|
params->ajouter("Identifiant_champ","Champ_EPSILON",OT_PARAMETRES::STRING,"Identifiant de l'analyse du champ epsilon"); |
285 |
|
|
params->ajouter("Largeur_colonne_distribution","0.1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
286 |
|
|
} |
287 |
|
|
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_ECART) |
288 |
|
|
{ |
289 |
|
|
params->ajouter("Identifiant","Champ_EPSILON_ecart",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
290 |
|
|
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_ECART,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
291 |
|
|
params->ajouter("Identifiant_champ","Champ_EPSILON",OT_PARAMETRES::STRING,"Identifiant de l'analyse du champ"); |
292 |
|
|
params->ajouter("Identifiant_champ_compare","Champ_EPSILON_compare",OT_PARAMETRES::STRING,"Identifiant de l'analyse du champ a comparer"); |
293 |
|
|
params->ajouter("Num_couche","0",OT_PARAMETRES::DOUBLE,"Numero de la couche a comparer"); |
294 |
|
|
params->ajouter("Type_ecart","0",OT_PARAMETRES::STRING,"Ecart relatif [0], ecart absolue [1], ecart quadratique [2]"); |
295 |
|
|
params->ajouter("Largeur_colonne_distribution","0.1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
296 |
|
|
} |
297 |
|
|
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_ECART_CHARGEMENT) |
298 |
|
|
{ |
299 |
|
|
params->ajouter("Identifiant","Champ_EPSILON_ecart",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
300 |
|
|
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_ECART_CHARGEMENT,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
301 |
|
|
params->ajouter("Identifiant_champ","Champ_EPSILON",OT_PARAMETRES::STRING,"Identifiant de l'analyse du champ"); |
302 |
|
|
params->ajouter("Type_chargement","0",OT_PARAMETRES::STRING,"Spherique [0], deviatorique [1]"); |
303 |
|
|
params->ajouter("Type_ecart","0",OT_PARAMETRES::STRING,"Ecart relatif [0], ecart absolue [1], ecart quadratique [2]"); |
304 |
|
|
params->ajouter("Largeur_colonne_distribution","0.1",OT_PARAMETRES::DOUBLE,"Largeur d'une colonne pour graph de distribution"); |
305 |
|
|
} |
306 |
|
|
else if(type_post_traitement==MSTRUCT::TYPE_POST_TRAITEMENT::POST_ORIENTATION_ECART) |
307 |
|
|
{ |
308 |
|
|
params->ajouter("Identifiant","Orientation_Particule_ecart",OT_PARAMETRES::STRING,"Identifiant de l'analyse"); |
309 |
|
|
params->ajouter("Type_post_traitement",MSTRUCT::TYPE_POST_TRAITEMENT::POST_ORIENTATION_ECART,OT_PARAMETRES::DOUBLE,"Type de post_traitement"); |
310 |
|
|
params->ajouter("Identifiant_orientation","Orientation_Particule",OT_PARAMETRES::STRING,"Identifiant de l'analyse de l'orientation"); |
311 |
|
|
params->ajouter("Type_ecart","0",OT_PARAMETRES::STRING,"Ecart relatif [0], ecart absolue [1], ecart quadratique [2]"); |
312 |
|
|
params->ajouter("a_11","0.33333333333",OT_PARAMETRES::DOUBLE,"Valeur du tenseur d'orientation"); |
313 |
|
|
params->ajouter("a_22","0.33333333333",OT_PARAMETRES::DOUBLE,"Valeur du tenseur d'orientation"); |
314 |
|
|
params->ajouter("a_33","0.33333333333",OT_PARAMETRES::DOUBLE,"Valeur du tenseur d'orientation"); |
315 |
|
|
params->ajouter("a_12","0.0",OT_PARAMETRES::DOUBLE,"Valeur du tenseur d'orientation"); |
316 |
|
|
params->ajouter("a_23","0.0",OT_PARAMETRES::DOUBLE,"Valeur du tenseur d'orientation"); |
317 |
|
|
params->ajouter("a_13","0.0",OT_PARAMETRES::DOUBLE,"Valeur du tenseur d'orientation"); |
318 |
|
|
} |
319 |
couturad |
930 |
if(erosion) |
320 |
|
|
{ |
321 |
|
|
params->ajouter("Analyse_erosion","1",OT_PARAMETRES::DOUBLE,"Analyse d'erosion [1], sans erosion [0]"); |
322 |
couturad |
968 |
params->ajouter("Nb_couche",nb_couche+1,OT_PARAMETRES::DOUBLE,"Nombre de couche d'erosion"); |
323 |
|
|
params->ajouter("Epaisseur_couche",epaisseur_couche,OT_PARAMETRES::DOUBLE,"Epaisseur d'une couche d'erosion"); |
324 |
couturad |
926 |
} |
325 |
couturad |
930 |
if(!erosion) |
326 |
|
|
{ |
327 |
|
|
params->ajouter("Analyse_erosion","0",OT_PARAMETRES::DOUBLE,"Analyse d'erosion [1], sans erosion [0]"); |
328 |
|
|
} |
329 |
couturad |
926 |
} |
330 |
|
|
|
331 |
|
|
|
332 |
couturad |
968 |
int PARAMETRES::generer_fichier_parametres(int type_etude, |
333 |
|
|
int type_generateur, |
334 |
|
|
int type_inclusion, |
335 |
|
|
bool fem_maill_lin, |
336 |
|
|
bool fem_maill_quad, |
337 |
|
|
int nb_couche, |
338 |
|
|
double epaisseur_couche, |
339 |
|
|
fonction_affiche *fonc_affiche) |
340 |
couturad |
919 |
{ |
341 |
couturad |
968 |
bool erosion; |
342 |
|
|
if(nb_couche>0) erosion=true; |
343 |
|
|
else erosion=false; |
344 |
couturad |
919 |
int mkdir_err=0; |
345 |
couturad |
933 |
std::string sys_command = "mkdir parametre"; |
346 |
couturad |
919 |
mkdir_err = system(sys_command.c_str()); |
347 |
|
|
if(mkdir_err !=0) |
348 |
|
|
{ |
349 |
|
|
std::cerr << "*** PARAMETRES::generer_fichier_parametres -> Erreur lors de la creation des dossiers parametres! ***" << std::endl; |
350 |
|
|
return FAIL; |
351 |
|
|
} |
352 |
couturad |
933 |
sys_command.clear(); sys_command.append("mkdir -p "); sys_command.append("parametre/geometrie"); |
353 |
couturad |
919 |
mkdir_err = system(sys_command.c_str()); |
354 |
|
|
if(mkdir_err !=0) |
355 |
|
|
{ |
356 |
|
|
std::cerr << "*** PARAMETRES::generer_fichier_parametres -> Erreur lors de la creation des dossiers parametres/geometrie ! ***" << std::endl; |
357 |
|
|
return FAIL; |
358 |
|
|
} |
359 |
couturad |
933 |
sys_command.clear(); sys_command.append("mkdir -p "); sys_command.append("parametre/materiau"); |
360 |
couturad |
919 |
mkdir_err = system(sys_command.c_str()); |
361 |
|
|
if(mkdir_err !=0) |
362 |
|
|
{ |
363 |
|
|
std::cerr << "*** PARAMETRES::generer_fichier_parametres -> Erreur lors de la creation des dossiers parametre/materiau ! ***" << std::endl; |
364 |
|
|
return FAIL; |
365 |
|
|
} |
366 |
couturad |
933 |
sys_command.clear(); sys_command.append("mkdir -p "); sys_command.append("parametre/carte"); |
367 |
couturad |
919 |
mkdir_err = system(sys_command.c_str()); |
368 |
|
|
if(mkdir_err !=0) |
369 |
|
|
{ |
370 |
|
|
std::cerr << "*** PARAMETRES::generer_fichier_parametres -> Erreur lors de la creation des dossiers parametres/carte ! ***" << std::endl; |
371 |
|
|
return FAIL; |
372 |
|
|
} |
373 |
couturad |
933 |
sys_command.clear(); sys_command.append("mkdir -p "); sys_command.append("parametre/maillage"); |
374 |
couturad |
919 |
mkdir_err = system(sys_command.c_str()); |
375 |
|
|
if(mkdir_err !=0) |
376 |
|
|
{ |
377 |
|
|
std::cerr << "*** PARAMETRES::generer_fichier_parametres -> Erreur lors de la creation des dossiers parametre/maillage ! ***" << std::endl; |
378 |
|
|
return FAIL; |
379 |
|
|
} |
380 |
couturad |
933 |
sys_command.clear(); sys_command.append("mkdir -p "); sys_command.append("parametre/fem_maillage"); |
381 |
couturad |
919 |
mkdir_err = system(sys_command.c_str()); |
382 |
|
|
if(mkdir_err !=0) |
383 |
|
|
{ |
384 |
|
|
std::cerr << "*** PARAMETRES::generer_fichier_parametres -> Erreur lors de la creation des dossiers parametre/fem_maillage ! ***" << std::endl; |
385 |
|
|
return FAIL; |
386 |
|
|
} |
387 |
couturad |
933 |
sys_command.clear(); sys_command.append("mkdir -p "); sys_command.append("parametre/etude"); |
388 |
couturad |
919 |
mkdir_err = system(sys_command.c_str()); |
389 |
|
|
if(mkdir_err !=0) |
390 |
|
|
{ |
391 |
|
|
std::cerr << "*** PARAMETRES::generer_fichier_parametres -> Erreur lors de la creation des dossiers parametre/etude ! ***" << std::endl; |
392 |
|
|
return FAIL; |
393 |
|
|
} |
394 |
couturad |
968 |
sys_command.clear(); sys_command.append("mkdir -p "); sys_command.append("parametre/post_traitement"); |
395 |
couturad |
919 |
mkdir_err = system(sys_command.c_str()); |
396 |
|
|
if(mkdir_err !=0) |
397 |
|
|
{ |
398 |
couturad |
968 |
std::cerr << "*** PARAMETRES::generer_fichier_parametres -> Erreur lors de la creation des dossiers parametre/post_traitement ! ***" << std::endl; |
399 |
couturad |
919 |
return FAIL; |
400 |
|
|
} |
401 |
|
|
std::ofstream f; |
402 |
couturad |
951 |
|
403 |
couturad |
968 |
if(type_generateur==MSTRUCT::TYPE_GENERATEUR::RSA) |
404 |
couturad |
951 |
{ |
405 |
|
|
OT_PARAMETRES params_geo_1; |
406 |
|
|
ini_param_generateur_rsa(¶ms_geo_1,type_inclusion); |
407 |
|
|
sys_command.clear(); sys_command.append("parametre/geometrie/param_geo_particule.txt"); |
408 |
|
|
params_geo_1.enregistrer((char*)sys_command.c_str()); |
409 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
410 |
couturad |
951 |
} |
411 |
couturad |
968 |
else if(type_generateur==MSTRUCT::TYPE_GENERATEUR::DCR) |
412 |
couturad |
951 |
{ |
413 |
|
|
OT_PARAMETRES params_geo_1; |
414 |
|
|
ini_param_generateur_dcr(¶ms_geo_1,type_inclusion); |
415 |
|
|
sys_command.clear(); sys_command.append("parametre/geometrie/param_geo_particule.txt"); |
416 |
|
|
params_geo_1.enregistrer((char*)sys_command.c_str()); |
417 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
418 |
couturad |
951 |
} |
419 |
couturad |
933 |
sys_command.clear(); sys_command.append("parametre/geometrie/lstparam_geo.txt"); |
420 |
couturad |
951 |
f.open(sys_command.c_str(),std::ios::out); |
421 |
couturad |
919 |
f << "// Fichier de parametres GEOMETRIE" << std::endl; |
422 |
couturad |
951 |
f << "param_geo_particule.txt" << std::endl; |
423 |
couturad |
919 |
f.close(); |
424 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
425 |
couturad |
951 |
|
426 |
|
|
OT_PARAMETRES params_mat_particule; |
427 |
|
|
ini_param_materiau(¶ms_mat_particule,(char*)"Particule"); |
428 |
|
|
params_mat_particule.change_valeur("Mu_E",75.0e9); |
429 |
|
|
params_mat_particule.change_valeur("Mu_nu",0.22); |
430 |
|
|
sys_command.clear(); sys_command.append("parametre/materiau/param_mat_particule.txt"); |
431 |
|
|
params_mat_particule.enregistrer((char*)sys_command.c_str()); |
432 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
433 |
couturad |
919 |
OT_PARAMETRES params_mat_matrice; |
434 |
|
|
ini_param_materiau(¶ms_mat_matrice,(char*)"Matrice"); |
435 |
couturad |
926 |
params_mat_matrice.change_valeur("Mu_E",3.5e9); |
436 |
|
|
params_mat_matrice.change_valeur("Mu_nu",0.33); |
437 |
couturad |
933 |
sys_command.clear(); sys_command.append("parametre/materiau/param_mat_matrice.txt"); |
438 |
couturad |
919 |
params_mat_matrice.enregistrer((char*)sys_command.c_str()); |
439 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
440 |
couturad |
919 |
|
441 |
couturad |
951 |
sys_command.clear(); sys_command.append("parametre/materiau/lstparam_mat.txt"); |
442 |
|
|
f.open(sys_command.c_str(),std::ios::out); |
443 |
|
|
f << "// Fichier de parametres MATERIAU" << std::endl; |
444 |
|
|
f << "param_mat_particule.txt" << std::endl; |
445 |
|
|
f << "param_mat_matrice.txt" << std::endl; |
446 |
|
|
f.close(); |
447 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
448 |
couturad |
951 |
|
449 |
|
|
|
450 |
couturad |
919 |
OT_PARAMETRES params_carte; |
451 |
|
|
ini_param_carte_taille(¶ms_carte); |
452 |
couturad |
933 |
sys_command.clear(); sys_command.append("parametre/carte/param_carte.txt"); |
453 |
couturad |
919 |
params_carte.enregistrer((char*)sys_command.c_str()); |
454 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
455 |
couturad |
919 |
|
456 |
|
|
OT_PARAMETRES params_maill; |
457 |
|
|
ini_param_mailleur(¶ms_maill); |
458 |
couturad |
933 |
sys_command.clear(); sys_command.append("parametre/maillage/param_maill.txt"); |
459 |
couturad |
919 |
params_maill.enregistrer((char*)sys_command.c_str()); |
460 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
461 |
couturad |
951 |
|
462 |
|
|
if(fem_maill_lin) |
463 |
|
|
{ |
464 |
|
|
OT_PARAMETRES params_fem_maillage_lin; |
465 |
|
|
ini_param_mailleur_fem(¶ms_fem_maillage_lin); |
466 |
|
|
params_fem_maillage_lin.change_valeur("Degre",1); |
467 |
|
|
sys_command.clear(); sys_command.append("parametre/fem_maillage/param_fem_maill_lin.txt"); |
468 |
|
|
params_fem_maillage_lin.enregistrer((char*)sys_command.c_str()); |
469 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
470 |
couturad |
951 |
} |
471 |
couturad |
919 |
|
472 |
couturad |
951 |
if(fem_maill_quad) |
473 |
|
|
{ |
474 |
|
|
OT_PARAMETRES params_fem_maillage_quad; |
475 |
|
|
ini_param_mailleur_fem(¶ms_fem_maillage_quad); |
476 |
|
|
params_fem_maillage_quad.change_valeur("Degre",2); |
477 |
|
|
sys_command.clear(); sys_command.append("parametre/fem_maillage/param_fem_maill_quad.txt"); |
478 |
|
|
params_fem_maillage_quad.enregistrer((char*)sys_command.c_str()); |
479 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
480 |
couturad |
951 |
} |
481 |
couturad |
919 |
|
482 |
couturad |
968 |
OT_PARAMETRES params_etude_CLDH_sph; |
483 |
|
|
ini_param_etude(¶ms_etude_CLDH_sph,type_etude); |
484 |
|
|
params_etude_CLDH_sph.change_valeur("Type_Chargement",0); |
485 |
|
|
params_etude_CLDH_sph.change_valeur("Type_CL",0); |
486 |
|
|
params_etude_CLDH_sph.change_valeur("Valeur_CL",0.0001); |
487 |
|
|
sys_command.clear(); sys_command.append("parametre/etude/param_etude_CLDH_sph.txt"); |
488 |
|
|
params_etude_CLDH_sph.enregistrer((char*)sys_command.c_str()); |
489 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
490 |
|
|
|
491 |
|
|
OT_PARAMETRES params_etude_CLCH_sph; |
492 |
|
|
ini_param_etude(¶ms_etude_CLCH_sph,type_etude); |
493 |
|
|
params_etude_CLCH_sph.change_valeur("Type_Chargement",0); |
494 |
|
|
params_etude_CLCH_sph.change_valeur("Type_CL",1); |
495 |
|
|
params_etude_CLCH_sph.change_valeur("Valeur_CL",1000); |
496 |
|
|
sys_command.clear(); sys_command.append("parametre/etude/param_etude_CLCH_sph.txt"); |
497 |
|
|
params_etude_CLCH_sph.enregistrer((char*)sys_command.c_str()); |
498 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
499 |
|
|
|
500 |
|
|
OT_PARAMETRES params_etude_CLDH_dev; |
501 |
|
|
ini_param_etude(¶ms_etude_CLDH_dev,type_etude); |
502 |
|
|
params_etude_CLDH_dev.change_valeur("Type_Chargement",1); |
503 |
|
|
params_etude_CLDH_dev.change_valeur("Type_CL",0); |
504 |
|
|
params_etude_CLDH_dev.change_valeur("Valeur_CL",0.0001); |
505 |
|
|
sys_command.clear(); sys_command.append("parametre/etude/param_etude_CLDH_dev.txt"); |
506 |
|
|
params_etude_CLDH_dev.enregistrer((char*)sys_command.c_str()); |
507 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
508 |
|
|
|
509 |
|
|
OT_PARAMETRES params_etude_CLCH_dev; |
510 |
|
|
ini_param_etude(¶ms_etude_CLCH_dev,type_etude); |
511 |
|
|
params_etude_CLCH_dev.change_valeur("Type_Chargement",1); |
512 |
|
|
params_etude_CLCH_dev.change_valeur("Type_CL",1); |
513 |
|
|
params_etude_CLCH_dev.change_valeur("Valeur_CL",1000); |
514 |
|
|
sys_command.clear(); sys_command.append("parametre/etude/param_etude_CLCH_dev.txt"); |
515 |
|
|
params_etude_CLCH_dev.enregistrer((char*)sys_command.c_str()); |
516 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
517 |
|
|
|
518 |
couturad |
926 |
MG_EXPORT exp; |
519 |
|
|
OT_PARAMETRES *params_aster=exp.get_param_aster(); |
520 |
couturad |
964 |
params_aster->change_valeur("Memoire",1024); |
521 |
couturad |
926 |
params_aster->change_valeur("Temps_max",250000); |
522 |
|
|
params_aster->change_valeur("Nb_CPU",8); |
523 |
|
|
params_aster->change_valeur("Noeud_ele",2); |
524 |
couturad |
929 |
params_aster->change_valeur("Base_num_mail",36); |
525 |
couturad |
933 |
sys_command.clear(); sys_command.append("parametre/etude/param_aster.txt"); |
526 |
couturad |
964 |
params_aster->enregistrer((char*)sys_command.c_str()); |
527 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
528 |
couturad |
926 |
|
529 |
couturad |
968 |
|
530 |
|
|
OT_PARAMETRES params_post_cao_all; |
531 |
|
|
ini_param_post_traitement(¶ms_post_cao_all,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CAO); |
532 |
|
|
params_post_cao_all.change_valeur("Identifiant","Cao_ALL"); |
533 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_cao_all.txt"); |
534 |
|
|
params_post_cao_all.enregistrer((char*)sys_command.c_str()); |
535 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
536 |
couturad |
968 |
OT_PARAMETRES params_post_cao_particule; |
537 |
|
|
ini_param_post_traitement(¶ms_post_cao_particule,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CAO); |
538 |
|
|
params_post_cao_particule.change_valeur("Identifiant","Cao_Particule"); |
539 |
|
|
params_post_cao_particule.change_valeur("Nom_groupe_forme","Particule"); |
540 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_cao_particule.txt"); |
541 |
|
|
params_post_cao_particule.enregistrer((char*)sys_command.c_str()); |
542 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
543 |
couturad |
968 |
OT_PARAMETRES params_post_cao_matrice; |
544 |
|
|
ini_param_post_traitement(¶ms_post_cao_matrice,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CAO); |
545 |
|
|
params_post_cao_matrice.change_valeur("Identifiant","Cao_Matrice"); |
546 |
|
|
params_post_cao_matrice.change_valeur("Nom_groupe_forme","Matrice"); |
547 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_cao_matrice.txt"); |
548 |
|
|
params_post_cao_matrice.enregistrer((char*)sys_command.c_str()); |
549 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
550 |
couturad |
926 |
|
551 |
couturad |
968 |
if(type_inclusion==MSTRUCT::TYPE_INCLUSION::CYLINDRE) |
552 |
couturad |
951 |
{ |
553 |
couturad |
968 |
OT_PARAMETRES params_post_orientation_cao; |
554 |
|
|
ini_param_post_traitement(¶ms_post_orientation_cao,MSTRUCT::TYPE_POST_TRAITEMENT::POST_ORIENTATION); |
555 |
|
|
params_post_orientation_cao.change_valeur("Identifiant","Orientation_Particule"); |
556 |
|
|
params_post_orientation_cao.change_valeur("Avec_fem_maillage","0"); |
557 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_orientation_cao.txt"); |
558 |
|
|
params_post_orientation_cao.enregistrer((char*)sys_command.c_str()); |
559 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
560 |
couturad |
968 |
|
561 |
|
|
OT_PARAMETRES params_post_orientation_ecart; |
562 |
|
|
ini_param_post_traitement(¶ms_post_orientation_ecart,MSTRUCT::TYPE_POST_TRAITEMENT::POST_ORIENTATION_ECART); |
563 |
|
|
params_post_orientation_ecart.change_valeur("Identifiant","Orientation_Particule_ecart"); |
564 |
|
|
params_post_orientation_ecart.change_valeur("Identifiant_orientation","Orientation_Particule"); |
565 |
|
|
params_post_orientation_ecart.change_valeur("Type_ecart",MSTRUCT::TYPE_COMPARAISON::ECART_ABSOLUE); |
566 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_orientation_ecart.txt"); |
567 |
|
|
params_post_orientation_ecart.enregistrer((char*)sys_command.c_str()); |
568 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
569 |
couturad |
951 |
} |
570 |
|
|
|
571 |
couturad |
968 |
sys_command.clear(); sys_command.append("parametre/post_traitement/lstparam_post_geometrie.txt"); |
572 |
couturad |
951 |
f.open(sys_command.c_str(),std::ios::out); |
573 |
couturad |
968 |
if(type_inclusion==MSTRUCT::TYPE_INCLUSION::CYLINDRE) |
574 |
couturad |
951 |
{ |
575 |
couturad |
968 |
f << "// Fichier de parametres POST_TRAITEMENT" << std::endl; |
576 |
|
|
f << "params_post_cao_all.txt" << std::endl; |
577 |
|
|
f << "params_post_cao_particule.txt" << std::endl; |
578 |
|
|
f << "params_post_cao_matrice.txt" << std::endl; |
579 |
|
|
f << "params_post_orientation_cao.txt" << std::endl; |
580 |
|
|
f << "params_post_orientation_ecart.txt" << std::endl; |
581 |
couturad |
951 |
} |
582 |
|
|
else |
583 |
|
|
{ |
584 |
couturad |
968 |
f << "// Fichier de parametres POST_TRAITEMENT" << std::endl; |
585 |
|
|
f << "params_post_cao_all.txt" << std::endl; |
586 |
|
|
f << "params_post_cao_particule.txt" << std::endl; |
587 |
|
|
f << "params_post_cao_matrice.txt" << std::endl; |
588 |
couturad |
951 |
} |
589 |
couturad |
964 |
f.close(); |
590 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
591 |
couturad |
951 |
|
592 |
couturad |
968 |
OT_PARAMETRES params_post_mg_maillage_all; |
593 |
|
|
ini_param_post_traitement(¶ms_post_mg_maillage_all,MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_MG,nb_couche,epaisseur_couche); |
594 |
|
|
params_post_mg_maillage_all.change_valeur("Identifiant","MG_maillage_ALL"); |
595 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_mg_maillage_all.txt"); |
596 |
|
|
params_post_mg_maillage_all.enregistrer((char*)sys_command.c_str()); |
597 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
598 |
couturad |
968 |
OT_PARAMETRES params_post_mg_maillage_particule; |
599 |
|
|
ini_param_post_traitement(¶ms_post_mg_maillage_particule,MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_MG,nb_couche,epaisseur_couche); |
600 |
|
|
params_post_mg_maillage_particule.change_valeur("Identifiant","MG_maillage_Particule"); |
601 |
|
|
params_post_mg_maillage_particule.change_valeur("Nom_groupe_forme","Particule"); |
602 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_mg_maillage_particule.txt"); |
603 |
|
|
params_post_mg_maillage_particule.enregistrer((char*)sys_command.c_str()); |
604 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
605 |
couturad |
968 |
OT_PARAMETRES params_post_mg_maillage_matrice; |
606 |
|
|
ini_param_post_traitement(¶ms_post_mg_maillage_matrice,MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_MG,nb_couche,epaisseur_couche); |
607 |
|
|
params_post_mg_maillage_matrice.change_valeur("Identifiant","MG_maillage_Matrice"); |
608 |
|
|
params_post_mg_maillage_matrice.change_valeur("Nom_groupe_forme","Matrice"); |
609 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_mg_maillage_matrice.txt"); |
610 |
|
|
params_post_mg_maillage_matrice.enregistrer((char*)sys_command.c_str()); |
611 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
612 |
couturad |
926 |
|
613 |
couturad |
968 |
sys_command.clear(); sys_command.append("parametre/post_traitement/lstparam_post_mg_maillage.txt"); |
614 |
couturad |
951 |
f.open(sys_command.c_str(),std::ios::out); |
615 |
couturad |
968 |
f << "// Fichier de parametres POST_TRAITEMENT" << std::endl; |
616 |
|
|
f << "params_post_mg_maillage_all.txt" << std::endl; |
617 |
|
|
f << "params_post_mg_maillage_particule.txt" << std::endl; |
618 |
|
|
f << "params_post_mg_maillage_matrice.txt" << std::endl; |
619 |
couturad |
964 |
f.close(); |
620 |
couturad |
968 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
621 |
|
|
|
622 |
|
|
OT_PARAMETRES params_post_fem_maillage_all; |
623 |
|
|
ini_param_post_traitement(¶ms_post_fem_maillage_all,MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_FEM,nb_couche,epaisseur_couche); |
624 |
|
|
params_post_fem_maillage_all.change_valeur("Identifiant","FEM_maillage_ALL"); |
625 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_fem_maillage_all.txt"); |
626 |
|
|
params_post_fem_maillage_all.enregistrer((char*)sys_command.c_str()); |
627 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
628 |
couturad |
968 |
OT_PARAMETRES params_post_fem_maillage_particule; |
629 |
|
|
ini_param_post_traitement(¶ms_post_fem_maillage_particule,MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_FEM,nb_couche,epaisseur_couche); |
630 |
|
|
params_post_fem_maillage_particule.change_valeur("Identifiant","FEM_maillage_Particule"); |
631 |
|
|
params_post_fem_maillage_particule.change_valeur("Nom_groupe_forme","Particule"); |
632 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_fem_maillage_particule.txt"); |
633 |
|
|
params_post_fem_maillage_particule.enregistrer((char*)sys_command.c_str()); |
634 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
635 |
|
|
OT_PARAMETRES params_post_fem_maillage_matrice; |
636 |
|
|
ini_param_post_traitement(¶ms_post_fem_maillage_matrice,MSTRUCT::TYPE_POST_TRAITEMENT::POST_MAILLAGE_FEM,nb_couche,epaisseur_couche); |
637 |
|
|
params_post_fem_maillage_matrice.change_valeur("Identifiant","FEM_maillage_Matrice"); |
638 |
|
|
params_post_fem_maillage_matrice.change_valeur("Nom_groupe_forme","Matrice"); |
639 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_fem_maillage_matrice.txt"); |
640 |
|
|
params_post_fem_maillage_matrice.enregistrer((char*)sys_command.c_str()); |
641 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
642 |
couturad |
926 |
|
643 |
couturad |
968 |
sys_command.clear(); sys_command.append("parametre/post_traitement/lstparam_post_fem_maillage.txt"); |
644 |
|
|
f.open(sys_command.c_str(),std::ios::out); |
645 |
|
|
if(type_inclusion==MSTRUCT::TYPE_INCLUSION::CYLINDRE) |
646 |
couturad |
951 |
{ |
647 |
couturad |
968 |
OT_PARAMETRES params_post_orientation_ponderee; |
648 |
|
|
ini_param_post_traitement(¶ms_post_orientation_ponderee,MSTRUCT::TYPE_POST_TRAITEMENT::POST_ORIENTATION,nb_couche,epaisseur_couche); |
649 |
|
|
params_post_orientation_ponderee.change_valeur("Identifiant","Orientation_Particule_ponderee"); |
650 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_orientation_ponderee.txt"); |
651 |
|
|
params_post_orientation_ponderee.enregistrer((char*)sys_command.c_str()); |
652 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
653 |
couturad |
951 |
|
654 |
couturad |
968 |
OT_PARAMETRES params_post_orientation_ponderee_ecart; |
655 |
|
|
ini_param_post_traitement(¶ms_post_orientation_ponderee_ecart,MSTRUCT::TYPE_POST_TRAITEMENT::POST_ORIENTATION_ECART,nb_couche,epaisseur_couche); |
656 |
|
|
params_post_orientation_ponderee_ecart.change_valeur("Identifiant","Orientation_Particule_ponderee_ecart"); |
657 |
|
|
params_post_orientation_ponderee_ecart.change_valeur("Identifiant_orientation","Orientation_Particule_ponderee"); |
658 |
|
|
params_post_orientation_ponderee_ecart.change_valeur("Type_ecart",MSTRUCT::TYPE_COMPARAISON::ECART_ABSOLUE); |
659 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_orientation_ponderee_ecart.txt"); |
660 |
|
|
params_post_orientation_ponderee_ecart.enregistrer((char*)sys_command.c_str()); |
661 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
662 |
couturad |
951 |
|
663 |
couturad |
968 |
f << "// Fichier de parametres POST_TRAITEMENT" << std::endl; |
664 |
|
|
f << "params_post_fem_maillage_all.txt" << std::endl; |
665 |
|
|
f << "params_post_fem_maillage_particule.txt" << std::endl; |
666 |
|
|
f << "params_post_fem_maillage_matrice.txt" << std::endl; |
667 |
|
|
f << "params_post_orientation_ponderee.txt" << std::endl; |
668 |
|
|
f << "params_post_orientation_ponderee_ecart.txt" << std::endl; |
669 |
couturad |
951 |
} |
670 |
couturad |
968 |
else |
671 |
couturad |
951 |
{ |
672 |
couturad |
968 |
f << "// Fichier de parametres POST_TRAITEMENT" << std::endl; |
673 |
|
|
f << "params_post_fem_maillage_all.txt" << std::endl; |
674 |
|
|
f << "params_post_fem_maillage_particule.txt" << std::endl; |
675 |
|
|
f << "params_post_fem_maillage_matrice.txt" << std::endl; |
676 |
|
|
} |
677 |
|
|
f.close(); |
678 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
679 |
couturad |
951 |
|
680 |
couturad |
968 |
OT_PARAMETRES params_post_champ_sigma; |
681 |
|
|
ini_param_post_traitement(¶ms_post_champ_sigma,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP,nb_couche,epaisseur_couche); |
682 |
|
|
params_post_champ_sigma.change_valeur("Identifiant","Champ_SIGMA"); |
683 |
|
|
params_post_champ_sigma.change_valeur("Num_solution",2); |
684 |
|
|
params_post_champ_sigma.change_valeur("Largeur_colonne_distribution","0.1"); |
685 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_sigma.txt"); |
686 |
|
|
params_post_champ_sigma.enregistrer((char*)sys_command.c_str()); |
687 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
688 |
couturad |
933 |
|
689 |
couturad |
968 |
OT_PARAMETRES params_post_champ_sigma_normalise; |
690 |
|
|
ini_param_post_traitement(¶ms_post_champ_sigma_normalise,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_NORMALISE,nb_couche,epaisseur_couche); |
691 |
|
|
params_post_champ_sigma_normalise.change_valeur("Identifiant","Champ_SIGMA_normalise"); |
692 |
|
|
params_post_champ_sigma_normalise.change_valeur("Identifiant_champ","Champ_SIGMA"); |
693 |
|
|
params_post_champ_sigma_normalise.change_valeur("Largeur_colonne_distribution","1e-06"); |
694 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_sigma_normalise.txt"); |
695 |
|
|
params_post_champ_sigma_normalise.enregistrer((char*)sys_command.c_str()); |
696 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
697 |
couturad |
951 |
|
698 |
couturad |
968 |
OT_PARAMETRES params_post_champ_epsilon; |
699 |
|
|
ini_param_post_traitement(¶ms_post_champ_epsilon,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP,nb_couche,epaisseur_couche); |
700 |
|
|
params_post_champ_epsilon.change_valeur("Identifiant","Champ_EPSILON"); |
701 |
|
|
params_post_champ_epsilon.change_valeur("Num_solution",1); |
702 |
|
|
params_post_champ_epsilon.change_valeur("Largeur_colonne_distribution","1.0e-11"); |
703 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_epsilon.txt"); |
704 |
|
|
params_post_champ_epsilon.enregistrer((char*)sys_command.c_str()); |
705 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
706 |
couturad |
951 |
|
707 |
couturad |
968 |
OT_PARAMETRES params_post_champ_epsilon_normalise; |
708 |
|
|
ini_param_post_traitement(¶ms_post_champ_epsilon_normalise,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_NORMALISE,nb_couche,epaisseur_couche); |
709 |
|
|
params_post_champ_epsilon_normalise.change_valeur("Identifiant","Champ_EPSILON_normalise"); |
710 |
|
|
params_post_champ_epsilon_normalise.change_valeur("Identifiant_champ","Champ_EPSILON"); |
711 |
|
|
params_post_champ_epsilon_normalise.change_valeur("Largeur_colonne_distribution","1e-06"); |
712 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_epsilon_normalise.txt"); |
713 |
|
|
params_post_champ_epsilon_normalise.enregistrer((char*)sys_command.c_str()); |
714 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
715 |
|
|
|
716 |
|
|
OT_PARAMETRES params_post_champ_energie; |
717 |
|
|
ini_param_post_traitement(¶ms_post_champ_energie,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP,nb_couche,epaisseur_couche); |
718 |
|
|
params_post_champ_energie.change_valeur("Identifiant","Champ_ENERGIE"); |
719 |
|
|
params_post_champ_energie.change_valeur("Num_solution",5); |
720 |
|
|
params_post_champ_energie.change_valeur("Largeur_colonne_distribution","1e-06"); |
721 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_energie.txt"); |
722 |
|
|
params_post_champ_energie.enregistrer((char*)sys_command.c_str()); |
723 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
724 |
|
|
|
725 |
|
|
OT_PARAMETRES params_post_champ_energie_normalise; |
726 |
|
|
ini_param_post_traitement(¶ms_post_champ_energie_normalise,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_NORMALISE,nb_couche,epaisseur_couche); |
727 |
|
|
params_post_champ_energie_normalise.change_valeur("Identifiant","Champ_ENERGIE_normalise"); |
728 |
|
|
params_post_champ_energie_normalise.change_valeur("Identifiant_champ","Champ_ENERGIE"); |
729 |
|
|
params_post_champ_energie_normalise.change_valeur("Largeur_colonne_distribution","1e-06"); |
730 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_energie_normalise.txt"); |
731 |
|
|
params_post_champ_energie_normalise.enregistrer((char*)sys_command.c_str()); |
732 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
733 |
|
|
|
734 |
|
|
OT_PARAMETRES params_post_champ_energie_ecart; |
735 |
|
|
ini_param_post_traitement(¶ms_post_champ_energie_ecart,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_ECART,nb_couche,epaisseur_couche); |
736 |
|
|
params_post_champ_energie_ecart.change_valeur("Identifiant","Champ_ENERGIE_ecart"); |
737 |
|
|
params_post_champ_energie_ecart.change_valeur("Identifiant_champ","Champ_ENERGIE"); |
738 |
|
|
params_post_champ_energie_ecart.change_valeur("Identifiant_champ_compare","Champ_ENERGIE"); |
739 |
|
|
params_post_champ_energie_ecart.change_valeur("Num_couche","0"); |
740 |
|
|
params_post_champ_energie_ecart.change_valeur("Type_ecart",MSTRUCT::TYPE_COMPARAISON::ECART_RELATIF_ABSOLUE); |
741 |
|
|
params_post_champ_energie_ecart.change_valeur("Largeur_colonne_distribution","1e-06"); |
742 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_energie_ecart.txt"); |
743 |
|
|
params_post_champ_energie_ecart.enregistrer((char*)sys_command.c_str()); |
744 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
745 |
|
|
|
746 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/lstparam_post_champ.txt"); |
747 |
|
|
f.open(sys_command.c_str(),std::ios::out); |
748 |
|
|
f << "// Fichier de parametres POST_TRAITEMENT" << std::endl; |
749 |
|
|
f << "params_post_champ_sigma.txt" << std::endl; |
750 |
|
|
f << "params_post_champ_sigma_normalise.txt" << std::endl; |
751 |
|
|
f << "params_post_champ_epsilon.txt" << std::endl; |
752 |
|
|
f << "params_post_champ_epsilon_normalise.txt" << std::endl; |
753 |
|
|
f << "params_post_champ_energie.txt" << std::endl; |
754 |
|
|
f << "params_post_champ_energie_normalise.txt" << std::endl; |
755 |
|
|
f << "params_post_champ_energie_ecart.txt" << std::endl; |
756 |
|
|
f.close(); |
757 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
758 |
|
|
|
759 |
|
|
OT_PARAMETRES params_post_champ_sigma_ecart_chargement_sph; |
760 |
|
|
ini_param_post_traitement(¶ms_post_champ_sigma_ecart_chargement_sph,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_ECART_CHARGEMENT,nb_couche,epaisseur_couche); |
761 |
|
|
params_post_champ_sigma_ecart_chargement_sph.change_valeur("Identifiant","Champ_SIGMA_ecart_chargement_sph"); |
762 |
|
|
params_post_champ_sigma_ecart_chargement_sph.change_valeur("Identifiant_champ","Champ_SIGMA"); |
763 |
|
|
params_post_champ_sigma_ecart_chargement_sph.change_valeur("Type_chargement","0"); |
764 |
|
|
params_post_champ_sigma_ecart_chargement_sph.change_valeur("Type_ecart",MSTRUCT::TYPE_COMPARAISON::ECART_RELATIF_ABSOLUE); |
765 |
|
|
params_post_champ_sigma_ecart_chargement_sph.change_valeur("Largeur_colonne_distribution","0.1"); |
766 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_sigma_ecart_chargement_sph.txt"); |
767 |
|
|
params_post_champ_sigma_ecart_chargement_sph.enregistrer((char*)sys_command.c_str()); |
768 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
769 |
|
|
|
770 |
|
|
OT_PARAMETRES params_post_champ_epsilon_ecart_chargement_sph; |
771 |
|
|
ini_param_post_traitement(¶ms_post_champ_epsilon_ecart_chargement_sph,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_ECART_CHARGEMENT,nb_couche,epaisseur_couche); |
772 |
|
|
params_post_champ_epsilon_ecart_chargement_sph.change_valeur("Identifiant","Champ_EPSILON_ecart_chargement_sph"); |
773 |
|
|
params_post_champ_epsilon_ecart_chargement_sph.change_valeur("Identifiant_champ","Champ_EPSILON"); |
774 |
|
|
params_post_champ_epsilon_ecart_chargement_sph.change_valeur("Type_chargement","0"); |
775 |
|
|
params_post_champ_epsilon_ecart_chargement_sph.change_valeur("Type_ecart",MSTRUCT::TYPE_COMPARAISON::ECART_RELATIF_ABSOLUE); |
776 |
|
|
params_post_champ_epsilon_ecart_chargement_sph.change_valeur("Largeur_colonne_distribution","0.1"); |
777 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_epsilon_ecart_chargement_sph.txt"); |
778 |
|
|
params_post_champ_epsilon_ecart_chargement_sph.enregistrer((char*)sys_command.c_str()); |
779 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
780 |
|
|
|
781 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/lstparam_post_champ_ecart_chargement_sph.txt"); |
782 |
|
|
f.open(sys_command.c_str(),std::ios::out); |
783 |
|
|
f << "// Fichier de parametres POST_TRAITEMENT" << std::endl; |
784 |
|
|
f << "params_post_champ_sigma_ecart_chargement_sph.txt" << std::endl; |
785 |
|
|
f << "params_post_champ_epsilon_ecart_chargement_sph.txt" << std::endl; |
786 |
|
|
f.close(); |
787 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
788 |
|
|
|
789 |
|
|
OT_PARAMETRES params_post_champ_sigma_ecart_chargement_dev; |
790 |
|
|
ini_param_post_traitement(¶ms_post_champ_sigma_ecart_chargement_dev,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_ECART_CHARGEMENT,nb_couche,epaisseur_couche); |
791 |
|
|
params_post_champ_sigma_ecart_chargement_dev.change_valeur("Identifiant","Champ_SIGMA_ecart_chargement_dev"); |
792 |
|
|
params_post_champ_sigma_ecart_chargement_dev.change_valeur("Identifiant_champ","Champ_SIGMA"); |
793 |
|
|
params_post_champ_sigma_ecart_chargement_dev.change_valeur("Type_chargement","1"); |
794 |
|
|
params_post_champ_sigma_ecart_chargement_dev.change_valeur("Type_ecart",MSTRUCT::TYPE_COMPARAISON::ECART_RELATIF_ABSOLUE); |
795 |
|
|
params_post_champ_sigma_ecart_chargement_dev.change_valeur("Largeur_colonne_distribution","0.1"); |
796 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_sigma_ecart_chargement_dev.txt"); |
797 |
|
|
params_post_champ_sigma_ecart_chargement_dev.enregistrer((char*)sys_command.c_str()); |
798 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
799 |
|
|
|
800 |
|
|
OT_PARAMETRES params_post_champ_epsilon_ecart_chargement_dev; |
801 |
|
|
ini_param_post_traitement(¶ms_post_champ_epsilon_ecart_chargement_dev,MSTRUCT::TYPE_POST_TRAITEMENT::POST_CHAMP_ECART_CHARGEMENT,nb_couche,epaisseur_couche); |
802 |
|
|
params_post_champ_epsilon_ecart_chargement_dev.change_valeur("Identifiant","Champ_EPSILON_ecart_chargement_dev"); |
803 |
|
|
params_post_champ_epsilon_ecart_chargement_dev.change_valeur("Identifiant_champ","Champ_EPSILON"); |
804 |
|
|
params_post_champ_epsilon_ecart_chargement_dev.change_valeur("Type_chargement","1"); |
805 |
|
|
params_post_champ_epsilon_ecart_chargement_dev.change_valeur("Type_ecart",MSTRUCT::TYPE_COMPARAISON::ECART_RELATIF_ABSOLUE); |
806 |
|
|
params_post_champ_epsilon_ecart_chargement_dev.change_valeur("Largeur_colonne_distribution","0.1"); |
807 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_champ_epsilon_ecart_chargement_dev.txt"); |
808 |
|
|
params_post_champ_epsilon_ecart_chargement_dev.enregistrer((char*)sys_command.c_str()); |
809 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
810 |
|
|
|
811 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/lstparam_post_champ_ecart_chargement_dev.txt"); |
812 |
|
|
f.open(sys_command.c_str(),std::ios::out); |
813 |
|
|
f << "// Fichier de parametres POST_TRAITEMENT" << std::endl; |
814 |
|
|
f << "params_post_champ_sigma_ecart_chargement_dev.txt" << std::endl; |
815 |
|
|
f << "params_post_champ_epsilon_ecart_chargement_dev.txt" << std::endl; |
816 |
|
|
f.close(); |
817 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
818 |
|
|
|
819 |
|
|
OT_PARAMETRES params_post_modules_elasticite; |
820 |
|
|
ini_param_post_traitement(¶ms_post_modules_elasticite,MSTRUCT::TYPE_POST_TRAITEMENT::POST_MODULES_ELASTICITE,nb_couche,epaisseur_couche); |
821 |
|
|
params_post_modules_elasticite.change_valeur("Identifiant_epsilon","Champ_EPSILON"); |
822 |
|
|
params_post_modules_elasticite.change_valeur("Identifiant_sigma","Champ_SIGMA"); |
823 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_modules_elasticite.txt"); |
824 |
|
|
params_post_modules_elasticite.enregistrer((char*)sys_command.c_str()); |
825 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
826 |
|
|
|
827 |
|
|
OT_PARAMETRES params_post_temps; |
828 |
|
|
ini_param_post_traitement(¶ms_post_temps,MSTRUCT::TYPE_POST_TRAITEMENT::POST_TEMPS,false); |
829 |
|
|
sys_command.clear(); sys_command.append("parametre/post_traitement/params_post_temps.txt"); |
830 |
|
|
params_post_temps.enregistrer((char*)sys_command.c_str()); |
831 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)sys_command.c_str()); |
832 |
|
|
|
833 |
couturad |
919 |
return OK; |
834 |
|
|
} |
835 |
|
|
|
836 |
couturad |
964 |
int PARAMETRES::generer_script_ves(int type_etude,int type_inclusion,bool fem_maill_lin,bool fem_maill_quad,fonction_affiche *fonc_affiche) |
837 |
couturad |
929 |
{ |
838 |
couturad |
968 |
if(type_etude==MSTRUCT::TYPE_ETUDE::MECANIQUE) |
839 |
couturad |
929 |
{ |
840 |
couturad |
951 |
std::ofstream ofstrm((char*)"generer_nb_ves",std::ios::out|std::ios::trunc); |
841 |
couturad |
929 |
ofstrm.precision(16); |
842 |
|
|
ofstrm.setf(std::ios::showpoint); |
843 |
|
|
ofstrm << "#!/bin/bash" << std::endl; |
844 |
|
|
ofstrm << "INDEX_DEPART=$1" << std::endl; |
845 |
|
|
ofstrm << "INDEX_FIN=$2" << std::endl; |
846 |
couturad |
968 |
ofstrm << "CHEMINCOMPILE=$3" << std::endl; |
847 |
couturad |
929 |
ofstrm << "if [ -z ${INDEX_DEPART// } ]" << std::endl; |
848 |
|
|
ofstrm << "then" << std::endl; |
849 |
|
|
ofstrm << " echo \"Erreur : Numero du ves de depart manquant\"" << std::endl; |
850 |
|
|
ofstrm << " exit" << std::endl; |
851 |
|
|
ofstrm << "fi" << std::endl; |
852 |
|
|
ofstrm << "if [ -z ${INDEX_FIN// } ]" << std::endl; |
853 |
|
|
ofstrm << "then" << std::endl; |
854 |
|
|
ofstrm << " echo \"Erreur : Numero du ves de fin manquant\"" << std::endl; |
855 |
|
|
ofstrm << " exit" << std::endl; |
856 |
|
|
ofstrm << "fi" << std::endl; |
857 |
|
|
ofstrm << "if [ -z ${CHEMINCOMPILE// } ]" << std::endl; |
858 |
|
|
ofstrm << "then" << std::endl; |
859 |
couturad |
958 |
ofstrm << " if [ -z $PATHMAGICEXEAPP ]" << std::endl; |
860 |
|
|
ofstrm << " then" << std::endl; |
861 |
|
|
ofstrm << " echo \"Erreur : Chemin vers exe/app manquant\"" << std::endl; |
862 |
|
|
ofstrm << " exit" << std::endl; |
863 |
|
|
ofstrm << " else" << std::endl; |
864 |
|
|
ofstrm << " CHEMINCOMPILE=$PATHMAGICEXEAPP" << std::endl; |
865 |
|
|
ofstrm << " fi" << std::endl; |
866 |
couturad |
929 |
ofstrm << "fi" << std::endl; |
867 |
|
|
ofstrm << "function executer" << std::endl; |
868 |
|
|
ofstrm << "{" << std::endl; |
869 |
|
|
ofstrm << "OPERATION_REUSSIE=1;" << std::endl; |
870 |
|
|
ofstrm << "$*" << std::endl; |
871 |
|
|
ofstrm << "VAR=$?" << std::endl; |
872 |
|
|
ofstrm << "if (( $VAR )) ; then " << std::endl; |
873 |
|
|
ofstrm << " OPERATION_REUSSIE=0; " << std::endl; |
874 |
|
|
ofstrm << " STAT=$VAR;" << std::endl; |
875 |
|
|
ofstrm << "fi" << std::endl; |
876 |
|
|
ofstrm << "}" << std::endl; |
877 |
|
|
ofstrm << "" << std::endl; |
878 |
|
|
ofstrm << "echo \"*********************************************************\"" << std::endl; |
879 |
|
|
ofstrm << "echo \"Generation des microstructures $INDEX_DEPART - $INDEX_FIN\"" << std::endl; |
880 |
|
|
ofstrm << "echo \"*********************************************************\"" << std::endl; |
881 |
|
|
ofstrm << "STAT=$?" << std::endl; |
882 |
|
|
ofstrm << "" << std::endl; |
883 |
|
|
ofstrm << "if [ $INDEX_DEPART -eq 1 ]" << std::endl; |
884 |
|
|
ofstrm << "then" << std::endl; |
885 |
|
|
ofstrm << "mkdir etude" << std::endl; |
886 |
|
|
ofstrm << "fi" << std::endl; |
887 |
|
|
ofstrm << "cd etude" << std::endl; |
888 |
|
|
ofstrm << "for (( k=$INDEX_DEPART; k<=$INDEX_FIN; k++ ))" << std::endl; |
889 |
|
|
ofstrm << "do" << std::endl; |
890 |
|
|
ofstrm << " echo \"Microstructure #$k\"" << std::endl; |
891 |
|
|
ofstrm << " mkdir e$k" << std::endl; |
892 |
|
|
ofstrm << " cd e$k" << std::endl; |
893 |
|
|
ofstrm << " OPERATION_REUSSIE=0" << std::endl; |
894 |
|
|
ofstrm << " until [ $OPERATION_REUSSIE -eq 1 ]; do" << std::endl; |
895 |
couturad |
968 |
ofstrm << " executer ../../ves $CHEMINCOMPILE" << std::endl; |
896 |
couturad |
929 |
ofstrm << " done" << std::endl; |
897 |
couturad |
968 |
ofstrm << " DOSSIER_ACTUEL=$(pwd)" << std::endl; |
898 |
couturad |
929 |
ofstrm << " cd .." << std::endl; |
899 |
|
|
ofstrm << "done" << std::endl; |
900 |
|
|
ofstrm << "cd .." << std::endl; |
901 |
|
|
ofstrm << "echo \"**********************\"" << std::endl; |
902 |
|
|
ofstrm << "echo \" FIN \"" << std::endl; |
903 |
|
|
ofstrm << "echo \"**********************\"" << std::endl; |
904 |
|
|
ofstrm << "exit $STAT" << std::endl; |
905 |
|
|
ofstrm.close(); |
906 |
couturad |
964 |
if(fonc_affiche!=NULL) fonc_affiche((char*)"generer_nb_ves"); |
907 |
couturad |
929 |
system((char*)"chmod 744 generer_nb_ves"); |
908 |
|
|
|
909 |
|
|
ofstrm.open((char*)"ves",std::ios::out|std::ios::trunc); |
910 |
|
|
ofstrm.precision(16); |
911 |
|
|
ofstrm.setf(std::ios::showpoint); |
912 |
|
|
ofstrm << "#!/bin/bash" << std::endl; |
913 |
couturad |
968 |
ofstrm << "CHEMINCOMPILE=$1" << std::endl; |
914 |
couturad |
929 |
ofstrm << "function executer" << std::endl; |
915 |
|
|
ofstrm << "{" << std::endl; |
916 |
|
|
ofstrm << "$*" << std::endl; |
917 |
|
|
ofstrm << "VAR=$?" << std::endl; |
918 |
|
|
ofstrm << "if (( $VAR )) ; then " << std::endl; |
919 |
|
|
ofstrm << " STATUSTXT=\"ERREUR dans les tests\"; " << std::endl; |
920 |
|
|
ofstrm << " STAT=$VAR;" << std::endl; |
921 |
|
|
ofstrm << " exit $STAT" << std::endl; |
922 |
|
|
ofstrm << "fi" << std::endl; |
923 |
|
|
ofstrm << "}" << std::endl; |
924 |
|
|
ofstrm << "STATUSTXT=\"Test sans ERREUR\"" << std::endl; |
925 |
|
|
ofstrm << "echo \"*******************************\"" << std::endl; |
926 |
|
|
ofstrm << "echo \"Generation d'une microstructure\"" << std::endl; |
927 |
|
|
ofstrm << "echo \"*******************************\"" << std::endl; |
928 |
|
|
ofstrm << "STAT=$?" << std::endl; |
929 |
couturad |
951 |
ofstrm << "" << std::endl; |
930 |
|
|
ofstrm << "#Geometrie" << std::endl; |
931 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_geo -ves_out ves_geo.ves -lstparam ../../parametre/geometrie/lstparam_geo.txt" << std::endl; |
932 |
couturad |
951 |
ofstrm << "executer $CHEMINCOMPILE/mgoperation/mgoperation.exe -brep_out -in ves_geo.magic -out ves_brep.brep" << std::endl; |
933 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_geo.ves -ves_out ves_geo_post.ves -lstparam ../../parametre/post_traitement/lstparam_post_geometrie.txt" << std::endl; |
934 |
couturad |
951 |
ofstrm << "" << std::endl; |
935 |
|
|
ofstrm << "#Materiau" << std::endl; |
936 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_mat -ves_in ves_geo.ves -ves_out ves_mat.ves -lstparam ../../parametre/materiau/lstparam_mat.txt" << std::endl; |
937 |
couturad |
951 |
ofstrm << "" << std::endl; |
938 |
|
|
ofstrm << "#Carte" << std::endl; |
939 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_carte -ves_in ves_mat.ves -ves_out ves_carte.ves -param ../../parametre/carte/param_carte.txt" << std::endl; |
940 |
couturad |
929 |
ofstrm << "" << std::endl; |
941 |
couturad |
951 |
ofstrm << "#MG Maillage" << std::endl; |
942 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_mg_maill -ves_in ves_carte.ves -ves_out ves_mg_maill.ves -param ../../parametre/maillage/param_maill.txt -carte carte.ctt" << std::endl; |
943 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_mg_maill.ves -ves_out ves_mg_maill_post.ves -lstparam ../../parametre/post_traitement/lstparam_post_mg_maillage.txt" << std::endl; |
944 |
couturad |
951 |
ofstrm << "executer $CHEMINCOMPILE/mgoperation/mgoperation.exe -gmsh -in ves_mg_maill.magic" << std::endl; |
945 |
couturad |
929 |
ofstrm << "" << std::endl; |
946 |
couturad |
951 |
ofstrm << "#Fem Maillage" << std::endl; |
947 |
|
|
if(fem_maill_lin) |
948 |
|
|
{ |
949 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_fem_maill -ves_in ves_mg_maill.ves -ves_out ves_fem_maill_lin.ves -param ../../parametre/fem_maillage/param_fem_maill_lin.txt" << std::endl; |
950 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_fem_maill_lin.ves -ves_out ves_fem_maill_post_lin.ves -lstparam ../../parametre/post_traitement/lstparam_post_fem_maillage.txt" << std::endl; |
951 |
couturad |
951 |
} |
952 |
|
|
if(fem_maill_quad) |
953 |
|
|
{ |
954 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_fem_maill -ves_in ves_mg_maill.ves -ves_out ves_fem_maill_quad.ves -param ../../parametre/fem_maillage/param_fem_maill_quad.txt" << std::endl; |
955 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_fem_maill_quad.ves -ves_out ves_fem_maill_post_quad.ves -lstparam ../../parametre/post_traitement/lstparam_post_fem_maillage.txt" << std::endl; |
956 |
couturad |
951 |
} |
957 |
couturad |
929 |
ofstrm << "" << std::endl; |
958 |
couturad |
951 |
ofstrm << "#Etude" << std::endl; |
959 |
|
|
if(fem_maill_lin) |
960 |
|
|
{ |
961 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_etude -ves_in ves_fem_maill_lin.ves -ves_out ves_etude_CLDH_sph_lin.ves -param ../../parametre/etude/param_etude_CLDH_sph.txt" << std::endl; |
962 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_etude -ves_in ves_fem_maill_lin.ves -ves_out ves_etude_CLCH_sph_lin.ves -param ../../parametre/etude/param_etude_CLCH_sph.txt" << std::endl; |
963 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_etude -ves_in ves_fem_maill_lin.ves -ves_out ves_etude_CLDH_dev_lin.ves -param ../../parametre/etude/param_etude_CLDH_dev.txt" << std::endl; |
964 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_etude -ves_in ves_fem_maill_lin.ves -ves_out ves_etude_CLCH_dev_lin.ves -param ../../parametre/etude/param_etude_CLCH_dev.txt" << std::endl; |
965 |
couturad |
951 |
} |
966 |
|
|
if(fem_maill_quad) |
967 |
|
|
{ |
968 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_etude -ves_in ves_fem_maill_quad.ves -ves_out ves_etude_CLDH_sph_quad.ves -param ../../parametre/etude/param_etude_CLDH_sph.txt" << std::endl; |
969 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_etude -ves_in ves_fem_maill_quad.ves -ves_out ves_etude_CLCH_sph_quad.ves -param ../../parametre/etude/param_etude_CLCH_sph.txt" << std::endl; |
970 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_etude -ves_in ves_fem_maill_quad.ves -ves_out ves_etude_CLDH_dev_quad.ves -param ../../parametre/etude/param_etude_CLDH_dev.txt" << std::endl; |
971 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_etude -ves_in ves_fem_maill_quad.ves -ves_out ves_etude_CLCH_dev_quad.ves -param ../../parametre/etude/param_etude_CLCH_dev.txt" << std::endl; |
972 |
couturad |
951 |
} |
973 |
couturad |
929 |
ofstrm << "" << std::endl; |
974 |
couturad |
951 |
ofstrm << "#Calcul" << std::endl; |
975 |
|
|
if(fem_maill_lin) |
976 |
|
|
{ |
977 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_calcul -ves_in ves_etude_CLDH_sph_lin.ves -ves_out ves_calcul_CLDH_sph_lin.ves -param ../../parametre/etude/param_etude_CLDH_sph.txt -paramaster ../../parametre/etude/param_aster.txt" << std::endl; |
978 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLDH_sph_lin.ves -ves_out ves_calcul_CLDH_sph_post_lin.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ.txt" << std::endl; |
979 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLDH_sph_post_lin.ves -ves_out ves_calcul_CLDH_sph_ecart_chargement_post_lin.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ_ecart_chargement_sph.txt" << std::endl; |
980 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_calcul -ves_in ves_etude_CLCH_sph_lin.ves -ves_out ves_calcul_CLCH_sph_lin.ves -param ../../parametre/etude/param_etude_CLCH_sph.txt -paramaster ../../parametre/etude/param_aster.txt" << std::endl; |
981 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLCH_sph_lin.ves -ves_out ves_calcul_CLCH_sph_post_lin.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ.txt" << std::endl; |
982 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLCH_sph_post_lin.ves -ves_out ves_calcul_CLCH_sph_ecart_chargement_post_lin.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ_ecart_chargement_sph.txt" << std::endl; |
983 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_calcul -ves_in ves_etude_CLDH_dev_lin.ves -ves_out ves_calcul_CLDH_dev_lin.ves -param ../../parametre/etude/param_etude_CLDH_dev.txt -paramaster ../../parametre/etude/param_aster.txt" << std::endl; |
984 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLDH_dev_lin.ves -ves_out ves_calcul_CLDH_dev_post_lin.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ.txt" << std::endl; |
985 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLDH_dev_post_lin.ves -ves_out ves_calcul_CLDH_dev_ecart_chargement_post_lin.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ_ecart_chargement_dev.txt" << std::endl; |
986 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_calcul -ves_in ves_etude_CLCH_dev_lin.ves -ves_out ves_calcul_CLCH_dev_lin.ves -param ../../parametre/etude/param_etude_CLCH_dev.txt -paramaster ../../parametre/etude/param_aster.txt" << std::endl; |
987 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLCH_dev_lin.ves -ves_out ves_calcul_CLCH_dev_post_lin.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ.txt" << std::endl; |
988 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLCH_dev_post_lin.ves -ves_out ves_calcul_CLCH_dev_ecart_chargement_post_lin.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ_ecart_chargement_dev.txt" << std::endl; |
989 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_sph ves_calcul_CLDH_sph_post_lin.ves -ves_dev ves_calcul_CLDH_dev_post_lin.ves -ves_out ves_CLDH_modules_elasticite_post_lin.ves -param ../../parametre/post_traitement/params_post_modules_elasticite.txt" << std::endl; |
990 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_sph ves_calcul_CLCH_sph_post_lin.ves -ves_dev ves_calcul_CLCH_dev_post_lin.ves -ves_out ves_CLCH_modules_elasticite_post_lin.ves -param ../../parametre/post_traitement/params_post_modules_elasticite.txt" << std::endl; |
991 |
couturad |
951 |
} |
992 |
couturad |
968 |
|
993 |
couturad |
951 |
if(fem_maill_quad) |
994 |
|
|
{ |
995 |
couturad |
968 |
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_calcul -ves_in ves_etude_CLDH_sph_quad.ves -ves_out ves_calcul_CLDH_sph_quad.ves -param ../../parametre/etude/param_etude_CLDH_sph.txt -paramaster ../../parametre/etude/param_aster.txt" << std::endl; |
996 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLDH_sph_quad.ves -ves_out ves_calcul_CLDH_sph_post_quad.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ.txt" << std::endl; |
997 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLDH_sph_post_quad.ves -ves_out ves_calcul_CLDH_sph_ecart_chargement_post_quad.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ_ecart_chargement_sph.txt" << std::endl; |
998 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_calcul -ves_in ves_etude_CLCH_sph_quad.ves -ves_out ves_calcul_CLCH_sph_quad.ves -param ../../parametre/etude/param_etude_CLCH_sph.txt -paramaster ../../parametre/etude/param_aster.txt" << std::endl; |
999 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLCH_sph_quad.ves -ves_out ves_calcul_CLCH_sph_post_quad.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ.txt" << std::endl; |
1000 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLCH_sph_post_quad.ves -ves_out ves_calcul_CLCH_sph_ecart_chargement_post_quad.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ_ecart_chargement_sph.txt" << std::endl; |
1001 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_calcul -ves_in ves_etude_CLDH_dev_quad.ves -ves_out ves_calcul_CLDH_dev_quad.ves -param ../../parametre/etude/param_etude_CLDH_dev.txt -paramaster ../../parametre/etude/param_aster.txt" << std::endl; |
1002 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLDH_dev_quad.ves -ves_out ves_calcul_CLDH_dev_post_quad.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ.txt" << std::endl; |
1003 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLDH_dev_post_quad.ves -ves_out ves_calcul_CLDH_dev_ecart_chargement_post_quad.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ_ecart_chargement_dev.txt" << std::endl; |
1004 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_calcul -ves_in ves_etude_CLCH_dev_quad.ves -ves_out ves_calcul_CLCH_dev_quad.ves -param ../../parametre/etude/param_etude_CLCH_dev.txt -paramaster ../../parametre/etude/param_aster.txt" << std::endl; |
1005 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLCH_dev_quad.ves -ves_out ves_calcul_CLCH_dev_post_quad.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ.txt" << std::endl; |
1006 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_in ves_calcul_CLCH_dev_post_quad.ves -ves_out ves_calcul_CLCH_dev_ecart_chargement_post_quad.ves -lstparam ../../parametre/post_traitement/lstparam_post_champ_ecart_chargement_dev.txt" << std::endl; |
1007 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_sph ves_calcul_CLDH_sph_post_quad.ves -ves_dev ves_calcul_CLDH_dev_post_quad.ves -ves_out ves_CLDH_modules_elasticite_post_quad.ves -param ../../parametre/post_traitement/params_post_modules_elasticite.txt" << std::endl; |
1008 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -gen_post_traitement -ves_sph ves_calcul_CLCH_sph_post_quad.ves -ves_dev ves_calcul_CLCH_dev_post_quad.ves -ves_out ves_CLCH_modules_elasticite_post_quad.ves -param ../../parametre/post_traitement/params_post_modules_elasticite.txt" << std::endl; |
1009 |
couturad |
951 |
} |
1010 |
|
|
ofstrm << "" << std::endl; |
1011 |
|
|
ofstrm << "rm *.msh" << std::endl; |
1012 |
|
|
ofstrm << "rm *.sol" << std::endl; |
1013 |
|
|
ofstrm << "rm *.resu" << std::endl; |
1014 |
|
|
ofstrm << "rm *.comm" << std::endl; |
1015 |
|
|
ofstrm << "rm *.mail" << std::endl; |
1016 |
|
|
ofstrm << "rm *.retour" << std::endl; |
1017 |
|
|
ofstrm << "rm *.export" << std::endl; |
1018 |
|
|
ofstrm << "rm *.log" << std::endl; |
1019 |
|
|
ofstrm << "rm *.mess" << std::endl; |
1020 |
couturad |
968 |
ofstrm << "#find . ! -name '*.ves' -type f -exec rm -f {} +" << std::endl; |
1021 |
couturad |
929 |
ofstrm << "cd .." << std::endl; |
1022 |
|
|
ofstrm << "echo \"**********************\"" << std::endl; |
1023 |
|
|
ofstrm << "echo $STATUSTXT" << std::endl; |
1024 |
|
|
ofstrm << "echo \"**********************\"" << std::endl; |
1025 |
|
|
ofstrm << "exit $STAT" << std::endl; |
1026 |
couturad |
964 |
ofstrm.close(); |
1027 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)"ves"); |
1028 |
couturad |
929 |
system((char*)"chmod 744 ves"); |
1029 |
|
|
} |
1030 |
couturad |
968 |
return OK; |
1031 |
couturad |
929 |
} |
1032 |
|
|
|
1033 |
couturad |
968 |
int PARAMETRES::generer_script_post_traitement(int type_etude,int type_inclusion,bool fem_maill_lin,bool fem_maill_quad,double epaisseur_couche,fonction_affiche *fonc_affiche) |
1034 |
couturad |
951 |
{ |
1035 |
couturad |
968 |
std::ofstream ofstrm((char*)"post_traitement",std::ios::out|std::ios::trunc); |
1036 |
couturad |
951 |
ofstrm.precision(16); |
1037 |
|
|
ofstrm.setf(std::ios::showpoint); |
1038 |
|
|
ofstrm << "#!/bin/bash" << std::endl; |
1039 |
couturad |
968 |
ofstrm << "CHEMINCOMPILE=$1" << std::endl; |
1040 |
couturad |
958 |
ofstrm << "if [ -z ${CHEMINCOMPILE// } ]" << std::endl; |
1041 |
|
|
ofstrm << "then" << std::endl; |
1042 |
|
|
ofstrm << " if [ -z $PATHMAGICEXEAPP ]" << std::endl; |
1043 |
|
|
ofstrm << " then" << std::endl; |
1044 |
|
|
ofstrm << " echo \"Erreur : Chemin vers exe/app manquant\"" << std::endl; |
1045 |
|
|
ofstrm << " exit" << std::endl; |
1046 |
|
|
ofstrm << " else" << std::endl; |
1047 |
|
|
ofstrm << " CHEMINCOMPILE=$PATHMAGICEXEAPP" << std::endl; |
1048 |
|
|
ofstrm << " fi" << std::endl; |
1049 |
|
|
ofstrm << "fi" << std::endl; |
1050 |
couturad |
951 |
ofstrm << "function executer" << std::endl; |
1051 |
|
|
ofstrm << "{" << std::endl; |
1052 |
|
|
ofstrm << "$*" << std::endl; |
1053 |
|
|
ofstrm << "VAR=$?" << std::endl; |
1054 |
|
|
ofstrm << "if (( $VAR )) ; then " << std::endl; |
1055 |
|
|
ofstrm << " STATUSTXT=\"ERREUR dans les tests\"; " << std::endl; |
1056 |
|
|
ofstrm << " STAT=$VAR;" << std::endl; |
1057 |
|
|
ofstrm << " exit $STAT" << std::endl; |
1058 |
|
|
ofstrm << "fi" << std::endl; |
1059 |
|
|
ofstrm << "}" << std::endl; |
1060 |
|
|
ofstrm << "STATUSTXT=\"Test sans ERREUR\"" << std::endl; |
1061 |
|
|
ofstrm << "echo \"*******************************\"" << std::endl; |
1062 |
|
|
ofstrm << "echo \"Generation d'une microstructure\"" << std::endl; |
1063 |
|
|
ofstrm << "echo \"*******************************\"" << std::endl; |
1064 |
|
|
ofstrm << "STAT=$?" << std::endl; |
1065 |
|
|
ofstrm << "" << std::endl; |
1066 |
|
|
ofstrm << "mkdir resultats" << std::endl; |
1067 |
|
|
ofstrm << "" << std::endl; |
1068 |
|
|
ofstrm << "#Geometrie" << std::endl; |
1069 |
|
|
ofstrm << "mkdir -p resultats/cao" << std::endl; |
1070 |
couturad |
968 |
ofstrm << "find etude/ -name \"ves_geo_post.ves\" | sort > tmp_lst_ves_geo_post.txt" << std::endl; |
1071 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_geo_post.txt -lstparam parametre/post_traitement/lstparam_post_geometrie.txt -dossier resultats/cao" << std::endl; |
1072 |
|
|
ofstrm << "rm tmp_lst_ves_geo_post.txt" << std::endl; |
1073 |
couturad |
951 |
ofstrm << "" << std::endl; |
1074 |
|
|
ofstrm << "#MG Maillage" << std::endl; |
1075 |
|
|
ofstrm << "mkdir -p resultats/maillage_mg" << std::endl; |
1076 |
couturad |
968 |
ofstrm << "find etude/ -name \"ves_mg_maill_post.ves\" | sort > tmp_lst_ves_mg_maill_post.txt" << std::endl; |
1077 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_mg_maill_post.txt -lstparam parametre/post_traitement/lstparam_post_mg_maillage.txt -dossier resultats/maillage_mg" << std::endl; |
1078 |
|
|
ofstrm << "rm tmp_lst_ves_mg_maill_post.txt" << std::endl; |
1079 |
couturad |
951 |
ofstrm << "" << std::endl; |
1080 |
|
|
ofstrm << "#Fem Maillage" << std::endl; |
1081 |
|
|
if(fem_maill_lin) |
1082 |
|
|
{ |
1083 |
couturad |
968 |
ofstrm << "mkdir -p resultats/maillage_fem/lin" << std::endl; |
1084 |
|
|
ofstrm << "find etude/ -name \"ves_fem_maill_post_lin.ves\" | sort > tmp_lst_ves_fem_maill_post_lin.txt" << std::endl; |
1085 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_fem_maill_post_lin.txt -lstparam parametre/post_traitement/lstparam_post_fem_maillage.txt -dossier resultats/maillage_fem/lin" << std::endl; |
1086 |
|
|
ofstrm << "rm tmp_lst_ves_fem_maill_post_lin.txt" << std::endl; |
1087 |
couturad |
951 |
} |
1088 |
|
|
if(fem_maill_quad) |
1089 |
|
|
{ |
1090 |
couturad |
968 |
ofstrm << "mkdir -p resultats/maillage_fem/quad" << std::endl; |
1091 |
|
|
ofstrm << "find etude/ -name \"ves_fem_maill_post_quad.ves\" | sort > tmp_lst_ves_fem_maill_post_quad.txt" << std::endl; |
1092 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_fem_maill_post_quad.txt -lstparam parametre/post_traitement/lstparam_post_fem_maillage.txt -dossier resultats/maillage_fem/quad" << std::endl; |
1093 |
|
|
ofstrm << "rm tmp_lst_ves_fem_maill_post_quad.txt" << std::endl; |
1094 |
couturad |
951 |
} |
1095 |
|
|
ofstrm << "" << std::endl; |
1096 |
|
|
ofstrm << "#Calculs" << std::endl; |
1097 |
|
|
if(fem_maill_lin) |
1098 |
couturad |
968 |
{ |
1099 |
|
|
ofstrm << "mkdir -p resultats/champ/DH/sph/lin" << std::endl; |
1100 |
|
|
ofstrm << "mkdir -p resultats/champ/DH/dev/lin" << std::endl; |
1101 |
|
|
ofstrm << "mkdir -p resultats/champ/CH/sph/lin" << std::endl; |
1102 |
|
|
ofstrm << "mkdir -p resultats/champ/CH/dev/lin" << std::endl; |
1103 |
|
|
ofstrm << "mkdir -p resultats/modules_elasticite/DH/lin" << std::endl; |
1104 |
|
|
ofstrm << "mkdir -p resultats/modules_elasticite/CH/lin" << std::endl; |
1105 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLDH_sph_post_lin.ves\" | sort > tmp_lst_ves_calcul_CLDH_sph_post_lin.txt" << std::endl; |
1106 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLCH_sph_post_lin.ves\" | sort > tmp_lst_ves_calcul_CLCH_sph_post_lin.txt" << std::endl; |
1107 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLDH_dev_post_lin.ves\" | sort > tmp_lst_ves_calcul_CLDH_dev_post_lin.txt" << std::endl; |
1108 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLCH_dev_post_lin.ves\" | sort > tmp_lst_ves_calcul_CLCH_dev_post_lin.txt" << std::endl; |
1109 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLDH_sph_ecart_chargement_post_lin.ves\" | sort > tmp_lst_ves_calcul_CLDH_sph_ecart_chargement_post_lin.txt" << std::endl; |
1110 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLCH_sph_ecart_chargement_post_lin.ves\" | sort > tmp_lst_ves_calcul_CLCH_sph_ecart_chargement_post_lin.txt" << std::endl; |
1111 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLDH_dev_ecart_chargement_post_lin.ves\" | sort > tmp_lst_ves_calcul_CLDH_dev_ecart_chargement_post_lin.txt" << std::endl; |
1112 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLCH_dev_ecart_chargement_post_lin.ves\" | sort > tmp_lst_ves_calcul_CLCH_dev_ecart_chargement_post_lin.txt" << std::endl; |
1113 |
|
|
ofstrm << "find etude/ -name \"ves_CLDH_modules_elasticite_post_lin.ves\" | sort > tmp_lst_ves_CLDH_modules_elasticite_post_lin.txt" << std::endl; |
1114 |
|
|
ofstrm << "find etude/ -name \"ves_CLCH_modules_elasticite_post_lin.ves\" | sort > tmp_lst_ves_CLCH_modules_elasticite_post_lin.txt" << std::endl; |
1115 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLDH_sph_post_lin.txt -lstparam parametre/post_traitement/lstparam_post_champ.txt -dossier resultats/champ/DH/sph/lin" << std::endl; |
1116 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLCH_sph_post_lin.txt -lstparam parametre/post_traitement/lstparam_post_champ.txt -dossier resultats/champ/CH/sph/lin" << std::endl; |
1117 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLDH_dev_post_lin.txt -lstparam parametre/post_traitement/lstparam_post_champ.txt -dossier resultats/champ/DH/dev/lin" << std::endl; |
1118 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLCH_dev_post_lin.txt -lstparam parametre/post_traitement/lstparam_post_champ.txt -dossier resultats/champ/CH/dev/lin" << std::endl; |
1119 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLDH_sph_ecart_chargement_post_lin.txt -lstparam parametre/post_traitement/lstparam_post_champ_ecart_chargement_sph.txt -dossier resultats/champ/DH/sph/lin" << std::endl; |
1120 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLCH_sph_ecart_chargement_post_lin.txt -lstparam parametre/post_traitement/lstparam_post_champ_ecart_chargement_sph.txt -dossier resultats/champ/CH/sph/lin" << std::endl; |
1121 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLDH_dev_ecart_chargement_post_lin.txt -lstparam parametre/post_traitement/lstparam_post_champ_ecart_chargement_dev.txt -dossier resultats/champ/DH/dev/lin" << std::endl; |
1122 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLCH_dev_ecart_chargement_post_lin.txt -lstparam parametre/post_traitement/lstparam_post_champ_ecart_chargement_dev.txt -dossier resultats/champ/CH/dev/lin" << std::endl; |
1123 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_CLDH_modules_elasticite_post_lin.txt -param parametre/post_traitement/params_post_modules_elasticite.txt -dossier resultats/modules_elasticite/DH/lin" << std::endl; |
1124 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_CLCH_modules_elasticite_post_lin.txt -param parametre/post_traitement/params_post_modules_elasticite.txt -dossier resultats/modules_elasticite/CH/lin" << std::endl; |
1125 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLDH_sph_post_lin.txt" << std::endl; |
1126 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLCH_sph_post_lin.txt" << std::endl; |
1127 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLDH_dev_post_lin.txt" << std::endl; |
1128 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLCH_dev_post_lin.txt" << std::endl; |
1129 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLDH_sph_ecart_chargement_post_lin.txt" << std::endl; |
1130 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLCH_sph_ecart_chargement_post_lin.txt" << std::endl; |
1131 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLDH_dev_ecart_chargement_post_lin.txt" << std::endl; |
1132 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLCH_dev_ecart_chargement_post_lin.txt" << std::endl; |
1133 |
|
|
ofstrm << "rm tmp_lst_ves_CLDH_modules_elasticite_post_lin.txt" << std::endl; |
1134 |
|
|
ofstrm << "rm tmp_lst_ves_CLCH_modules_elasticite_post_lin.txt" << std::endl; |
1135 |
couturad |
951 |
} |
1136 |
|
|
if(fem_maill_quad) |
1137 |
|
|
{ |
1138 |
couturad |
968 |
ofstrm << "mkdir -p resultats/champ/DH/sph/quad" << std::endl; |
1139 |
|
|
ofstrm << "mkdir -p resultats/champ/DH/dev/quad" << std::endl; |
1140 |
|
|
ofstrm << "mkdir -p resultats/champ/CH/sph/quad" << std::endl; |
1141 |
|
|
ofstrm << "mkdir -p resultats/champ/CH/dev/quad" << std::endl; |
1142 |
|
|
ofstrm << "mkdir -p resultats/modules_elasticite/DH/quad" << std::endl; |
1143 |
|
|
ofstrm << "mkdir -p resultats/modules_elasticite/CH/quad" << std::endl; |
1144 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLDH_sph_post_quad.ves\" | sort > tmp_lst_ves_calcul_CLDH_sph_post_quad.txt" << std::endl; |
1145 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLCH_sph_post_quad.ves\" | sort > tmp_lst_ves_calcul_CLCH_sph_post_quad.txt" << std::endl; |
1146 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLDH_dev_post_quad.ves\" | sort > tmp_lst_ves_calcul_CLDH_dev_post_quad.txt" << std::endl; |
1147 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLCH_dev_post_quad.ves\" | sort > tmp_lst_ves_calcul_CLCH_dev_post_quad.txt" << std::endl; |
1148 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLDH_sph_ecart_chargement_post_quad.ves\" | sort > tmp_lst_ves_calcul_CLDH_sph_ecart_chargement_post_quad.txt" << std::endl; |
1149 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLCH_sph_ecart_chargement_post_quad.ves\" | sort > tmp_lst_ves_calcul_CLCH_sph_ecart_chargement_post_quad.txt" << std::endl; |
1150 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLDH_dev_ecart_chargement_post_quad.ves\" | sort > tmp_lst_ves_calcul_CLDH_dev_ecart_chargement_post_quad.txt" << std::endl; |
1151 |
|
|
ofstrm << "find etude/ -name \"ves_calcul_CLCH_dev_ecart_chargement_post_quad.ves\" | sort > tmp_lst_ves_calcul_CLCH_dev_ecart_chargement_post_quad.txt" << std::endl; |
1152 |
|
|
ofstrm << "find etude/ -name \"ves_CLDH_modules_elasticite_post_quad.ves\" | sort > tmp_lst_ves_CLDH_modules_elasticite_post_quad.txt" << std::endl; |
1153 |
|
|
ofstrm << "find etude/ -name \"ves_CLCH_modules_elasticite_post_quad.ves\" | sort > tmp_lst_ves_CLCH_modules_elasticite_post_quad.txt" << std::endl; |
1154 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLDH_sph_post_quad.txt -lstparam parametre/post_traitement/lstparam_post_champ.txt -dossier resultats/champ/DH/sph/quad" << std::endl; |
1155 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLCH_sph_post_quad.txt -lstparam parametre/post_traitement/lstparam_post_champ.txt -dossier resultats/champ/CH/sph/quad" << std::endl; |
1156 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLDH_dev_post_quad.txt -lstparam parametre/post_traitement/lstparam_post_champ.txt -dossier resultats/champ/DH/dev/quad" << std::endl; |
1157 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLCH_dev_post_quad.txt -lstparam parametre/post_traitement/lstparam_post_champ.txt -dossier resultats/champ/CH/dev/quad" << std::endl; |
1158 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLDH_sph_ecart_chargement_post_quad.txt -lstparam parametre/post_traitement/lstparam_post_champ_ecart_chargement_sph.txt -dossier resultats/champ/DH/sph/quad" << std::endl; |
1159 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLCH_sph_ecart_chargement_post_quad.txt -lstparam parametre/post_traitement/lstparam_post_champ_ecart_chargement_sph.txt -dossier resultats/champ/CH/sph/quad" << std::endl; |
1160 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLDH_dev_ecart_chargement_post_quad.txt -lstparam parametre/post_traitement/lstparam_post_champ_ecart_chargement_dev.txt -dossier resultats/champ/DH/dev/quad" << std::endl; |
1161 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_calcul_CLCH_dev_ecart_chargement_post_quad.txt -lstparam parametre/post_traitement/lstparam_post_champ_ecart_chargement_dev.txt -dossier resultats/champ/CH/dev/quad" << std::endl; |
1162 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_CLDH_modules_elasticite_post_quad.txt -param parametre/post_traitement/params_post_modules_elasticite.txt -dossier resultats/modules_elasticite/DH/quad" << std::endl; |
1163 |
|
|
ofstrm << "executer $CHEMINCOMPILE/microstructure/microstructure.exe -cumuler_post_traitement -lstves tmp_lst_ves_CLCH_modules_elasticite_post_quad.txt -param parametre/post_traitement/params_post_modules_elasticite.txt -dossier resultats/modules_elasticite/CH/quad" << std::endl; |
1164 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLDH_sph_post_quad.txt" << std::endl; |
1165 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLCH_sph_post_quad.txt" << std::endl; |
1166 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLDH_dev_post_quad.txt" << std::endl; |
1167 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLCH_dev_post_quad.txt" << std::endl; |
1168 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLDH_sph_ecart_chargement_post_quad.txt" << std::endl; |
1169 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLCH_sph_ecart_chargement_post_quad.txt" << std::endl; |
1170 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLDH_dev_ecart_chargement_post_quad.txt" << std::endl; |
1171 |
|
|
ofstrm << "rm tmp_lst_ves_calcul_CLCH_dev_ecart_chargement_post_quad.txt" << std::endl; |
1172 |
|
|
ofstrm << "rm tmp_lst_ves_CLDH_modules_elasticite_post_quad.txt" << std::endl; |
1173 |
|
|
ofstrm << "rm tmp_lst_ves_CLCH_modules_elasticite_post_quad.txt" << std::endl; |
1174 |
couturad |
951 |
} |
1175 |
|
|
ofstrm << "" << std::endl; |
1176 |
couturad |
968 |
ofstrm << "./produire_figures 0" << std::endl; |
1177 |
|
|
ofstrm << "echo \"**********************\"" << std::endl; |
1178 |
|
|
ofstrm << "echo \" FIN \"" << std::endl; |
1179 |
|
|
ofstrm << "echo \"**********************\"" << std::endl; |
1180 |
|
|
ofstrm << "exit $STAT" << std::endl; |
1181 |
|
|
ofstrm.close(); |
1182 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)"post_traitement"); |
1183 |
|
|
system((char*)"chmod 744 post_traitement"); |
1184 |
couturad |
951 |
|
1185 |
couturad |
968 |
|
1186 |
|
|
|
1187 |
|
|
|
1188 |
|
|
ofstrm.open((char*)"produire_figures",std::ios::out|std::ios::trunc); |
1189 |
|
|
ofstrm.precision(16); |
1190 |
|
|
ofstrm.setf(std::ios::showpoint); |
1191 |
|
|
ofstrm << "#!/bin/bash" << std::endl; |
1192 |
|
|
ofstrm << "COUCHE_REF=\"$1\"" << std::endl; |
1193 |
couturad |
951 |
ofstrm << "#Data pour graph" << std::endl; |
1194 |
|
|
ofstrm << "PWD=pwd" << std::endl; |
1195 |
couturad |
968 |
ofstrm << "mkdir -p resultats/data_graph resultats/graph" << std::endl; |
1196 |
|
|
if(type_inclusion==MSTRUCT::TYPE_INCLUSION::CYLINDRE) |
1197 |
couturad |
951 |
{ |
1198 |
|
|
ofstrm << "#Orientation" << std::endl; |
1199 |
couturad |
968 |
ofstrm << "awk 'NR>=2 {print $1,($2+$3+$4+$5+$6+$7)}' resultats/cao/cumul_Orientation_Particule_ecart.txt > resultats/data_graph/cumul_Err_abs_ori.txt" << std::endl; |
1200 |
|
|
ofstrm << "sed -i '1s/^/Nb_ves somme_ecart_absolu\\n/' resultats/data_graph/cumul_Err_abs_ori.txt" << std::endl; |
1201 |
|
|
if(fem_maill_lin) |
1202 |
couturad |
951 |
{ |
1203 |
couturad |
968 |
ofstrm << "awk 'NR>=2 {print $1,$2,($2+$3+$4+$5+$6+$7)}' resultats/maillage_fem/lin/cumul_erosion_Orientation_Particule_ponderee_ecart.txt > resultats/data_graph/cumul_erosion_Err_abs_ori_lin.txt" << std::endl; |
1204 |
|
|
ofstrm << "sed -i '1s/^/Couche Nb_ves somme_ecart_absolu\\n/' resultats/data_graph/cumul_erosion_Err_abs_ori_lin.txt" << std::endl; |
1205 |
couturad |
951 |
} |
1206 |
couturad |
968 |
if(fem_maill_quad) |
1207 |
couturad |
951 |
{ |
1208 |
couturad |
968 |
ofstrm << "awk 'NR>=2 {print $1,$2,($2+$3+$4+$5+$6+$7)}' resultats/maillage_fem/quad/cumul_erosion_Orientation_Particule_ponderee_ecart.txt > resultats/data_graph/cumul_erosion_Err_abs_ori_quad.txt" << std::endl; |
1209 |
|
|
ofstrm << "sed -i '1s/^/Couche Nb_ves somme_ecart_absolu\\n/' resultats/data_graph/cumul_erosion_Err_abs_ori_quad.txt" << std::endl; |
1210 |
couturad |
951 |
} |
1211 |
couturad |
968 |
} |
1212 |
couturad |
951 |
if(fem_maill_lin) |
1213 |
|
|
{ |
1214 |
couturad |
968 |
ofstrm << "#Module elasticite" << std::endl; |
1215 |
|
|
ofstrm << "awk 'NR>=2 {print $1,$2,$7,$8}' resultats/maillage_fem/lin/cumul_erosion_FEM_maillage_Particule.txt > resultats/data_graph/tmp_erosion_fem_maill_lin" << std::endl; |
1216 |
|
|
ofstrm << "awk 'NR>=2 {print $3,$4,$7,$8,$11,$12,$15,$16}' resultats/modules_elasticite/CH/lin/cumul_erosion_Modules_elasticite.txt > resultats/data_graph/tmp_erosion_Modules_app_CH_lin" << std::endl; |
1217 |
|
|
ofstrm << "awk 'NR>=2 {print $3,$4,$7,$8,$11,$12,$15,$16}' resultats/modules_elasticite/DH/lin/cumul_erosion_Modules_elasticite.txt > resultats/data_graph/tmp_erosion_Modules_app_DH_lin" << std::endl; |
1218 |
|
|
ofstrm << "paste -d ' ' resultats/data_graph/tmp_erosion_fem_maill_lin resultats/data_graph/tmp_erosion_Modules_app_CH_lin > resultats/data_graph/erosion_Modules_app_CH_lin.txt" << std::endl; |
1219 |
|
|
ofstrm << "paste -d ' ' resultats/data_graph/tmp_erosion_fem_maill_lin resultats/data_graph/tmp_erosion_Modules_app_DH_lin > resultats/data_graph/erosion_Modules_app_DH_lin.txt" << std::endl; |
1220 |
|
|
ofstrm << "sed -i '1s/^/Couche Nb_ves Fvol(moy ±) Eapp(moy ±) Nuapp(moy ±) Gapp(moy ±) Kapp(moy ±)\\n/' resultats/data_graph/erosion_Modules_app_CH_lin.txt" << std::endl; |
1221 |
|
|
ofstrm << "sed -i '1s/^/Couche Nb_ves Fvol(moy ±) Eapp(moy ±) Nuapp(moy ±) Gapp(moy ±) Kapp(moy ±)\\n/' resultats/data_graph/erosion_Modules_app_DH_lin.txt" << std::endl; |
1222 |
|
|
ofstrm << "rm resultats/data_graph/tmp_erosion_fem_maill_lin resultats/data_graph/tmp_erosion_Modules_app_CH_lin resultats/data_graph/tmp_erosion_Modules_app_DH_lin" << std::endl; |
1223 |
|
|
ofstrm << "awk 'NR>=2 {print $1,$2}' resultats/maillage_fem/lin/c_$COUCHE_REF/liste_FEM_maillage_Particule.txt > resultats/data_graph/tmp_liste_fem_maill_lin" << std::endl; |
1224 |
|
|
ofstrm << "awk 'NR>=2 {print $2,$3,$4}' resultats/modules_elasticite/CH/lin/c_$COUCHE_REF/liste_Modules_elasticite.txt > resultats/data_graph/tmp_Modules_app_CH_lin" << std::endl; |
1225 |
|
|
ofstrm << "awk 'NR>=2 {print $2,$3,$4}' resultats/modules_elasticite/DH/lin/c_$COUCHE_REF/liste_Modules_elasticite.txt > resultats/data_graph/tmp_Modules_app_DH_lin" << std::endl; |
1226 |
|
|
ofstrm << "paste -d ' ' resultats/data_graph/tmp_liste_fem_maill_lin resultats/data_graph/tmp_Modules_app_CH_lin > resultats/data_graph/liste_Modules_app_CH_lin.txt" << std::endl; |
1227 |
|
|
ofstrm << "paste -d ' ' resultats/data_graph/tmp_liste_fem_maill_lin resultats/data_graph/tmp_Modules_app_DH_lin > resultats/data_graph/liste_Modules_app_DH_lin.txt" << std::endl; |
1228 |
|
|
ofstrm << "sed -i '1s/^/# Fvol Eapp Nuapp Gapp Kapp\\n/' resultats/data_graph/liste_Modules_app_CH_lin.txt" << std::endl; |
1229 |
|
|
ofstrm << "sed -i '1s/^/# Fvol Eapp Nuapp Gapp Kapp\\n/' resultats/data_graph/liste_Modules_app_DH_lin.txt" << std::endl; |
1230 |
|
|
ofstrm << "rm resultats/data_graph/tmp_liste_fem_maill_lin resultats/data_graph/tmp_Modules_app_CH_lin resultats/data_graph/tmp_Modules_app_DH_lin" << std::endl; |
1231 |
couturad |
951 |
} |
1232 |
|
|
if(fem_maill_quad) |
1233 |
|
|
{ |
1234 |
couturad |
968 |
ofstrm << "#Module elasticite" << std::endl; |
1235 |
|
|
ofstrm << "awk 'NR>=2 {print $1,$2,$7,$8}' resultats/maillage_fem/quad/cumul_erosion_FEM_maillage_Particule.txt > resultats/data_graph/tmp_erosion_fem_maill_quad" << std::endl; |
1236 |
|
|
ofstrm << "awk 'NR>=2 {print $3,$4,$7,$8,$11,$12,$15,$16}' resultats/modules_elasticite/CH/quad/cumul_erosion_Modules_elasticite.txt > resultats/data_graph/tmp_erosion_Modules_app_CH_quad" << std::endl; |
1237 |
|
|
ofstrm << "awk 'NR>=2 {print $3,$4,$7,$8,$11,$12,$15,$16}' resultats/modules_elasticite/DH/quad/cumul_erosion_Modules_elasticite.txt > resultats/data_graph/tmp_erosion_Modules_app_DH_quad" << std::endl; |
1238 |
|
|
ofstrm << "paste -d ' ' resultats/data_graph/tmp_erosion_fem_maill_quad resultats/data_graph/tmp_erosion_Modules_app_CH_quad > resultats/data_graph/erosion_Modules_app_CH_quad.txt" << std::endl; |
1239 |
|
|
ofstrm << "paste -d ' ' resultats/data_graph/tmp_erosion_fem_maill_quad resultats/data_graph/tmp_erosion_Modules_app_CH_quad > resultats/data_graph/erosion_Modules_app_DH_quad.txt" << std::endl; |
1240 |
|
|
ofstrm << "sed -i '1s/^/Couche Nb_ves Fvol(moy ±) Eapp(moy ±) Nuapp(moy ±) Gapp(moy ±) Kapp(moy ±)\\n/' resultats/data_graph/erosion_Modules_app_CH_quad.txt" << std::endl; |
1241 |
|
|
ofstrm << "sed -i '1s/^/Couche Nb_ves Fvol(moy ±) Eapp(moy ±) Nuapp(moy ±) Gapp(moy ±) Kapp(moy ±)\\n/' resultats/data_graph/erosion_Modules_app_DH_quad.txt" << std::endl; |
1242 |
|
|
ofstrm << "rm resultats/data_graph/tmp_erosion_fem_maill_quad resultats/data_graph/tmp_erosion_Modules_app_CH_quad resultats/data_graph/tmp_erosion_Modules_app_DH_quad" << std::endl; |
1243 |
|
|
ofstrm << "awk 'NR>=2 {print $1,$2}' resultats/maillage_fem/quad/c_$COUCHE_REF/liste_FEM_maillage_Particule.txt > resultats/data_graph/tmp_liste_fem_maill_quad" << std::endl; |
1244 |
|
|
ofstrm << "awk 'NR>=2 {print $2,$3,$4}' resultats/modules_elasticite/CH/quad/c_$COUCHE_REF/liste_Modules_elasticite.txt > resultats/data_graph/tmp_Modules_app_CH_quad" << std::endl; |
1245 |
|
|
ofstrm << "awk 'NR>=2 {print $2,$3,$4}' resultats/modules_elasticite/DH/quad/c_$COUCHE_REF/liste_Modules_elasticite.txt > resultats/data_graph/tmp_Modules_app_DH_quad" << std::endl; |
1246 |
|
|
ofstrm << "paste -d ' ' resultats/data_graph/tmp_liste_fem_maill_quad resultats/data_graph/tmp_Modules_app_CH_quad > resultats/data_graph/liste_Modules_app_CH_quad.txt" << std::endl; |
1247 |
|
|
ofstrm << "paste -d ' ' resultats/data_graph/tmp_liste_fem_maill_quad resultats/data_graph/tmp_Modules_app_DH_quad > resultats/data_graph/liste_Modules_app_DH_quad.txt" << std::endl; |
1248 |
|
|
ofstrm << "sed -i '1s/^/# Fvol Eapp Nuapp Gapp Kapp\\n/' resultats/data_graph/liste_Modules_app_CH_quad.txt" << std::endl; |
1249 |
|
|
ofstrm << "sed -i '1s/^/# Fvol Eapp Nuapp Gapp Kapp\\n/' resultats/data_graph/liste_Modules_app_DH_quad.txt" << std::endl; |
1250 |
|
|
ofstrm << "rm resultats/data_graph/tmp_liste_fem_maill_quad resultats/data_graph/tmp_Modules_app_CH_quad resultats/data_graph/tmp_Modules_app_DH_quad" << std::endl; |
1251 |
couturad |
951 |
} |
1252 |
couturad |
968 |
ofstrm << "gnuplot fig.gnu" << std::endl; |
1253 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)"produire_figures"); |
1254 |
|
|
system((char*)"chmod 744 produire_figures"); |
1255 |
couturad |
964 |
ofstrm.close(); |
1256 |
|
|
|
1257 |
couturad |
951 |
|
1258 |
couturad |
968 |
ofstrm.open((char*)"fig.gnu",std::ios::out|std::ios::trunc); |
1259 |
couturad |
951 |
ofstrm.precision(16); |
1260 |
|
|
ofstrm.setf(std::ios::showpoint); |
1261 |
|
|
|
1262 |
couturad |
968 |
|
1263 |
couturad |
951 |
ofstrm << "" << std::endl; |
1264 |
couturad |
968 |
ofstrm << "set terminal postscript eps size 4,2.25 enhanced color font 'Helvetica,14'" << std::endl; |
1265 |
couturad |
951 |
ofstrm << "" << std::endl; |
1266 |
|
|
ofstrm << "set output \"resultats/graph/nuage_Eapp.eps\"" << std::endl; |
1267 |
couturad |
964 |
ofstrm << "set xrange [0:50]" << std::endl; |
1268 |
couturad |
951 |
ofstrm << "set title \"Module de Young (GPa)\"" << std::endl; |
1269 |
|
|
ofstrm << "set xlabel \"Fraction volumique (%)\"" << std::endl; |
1270 |
|
|
ofstrm << "set ylabel \"Module de Young (GPa)\"" << std::endl; |
1271 |
|
|
if(fem_maill_lin && fem_maill_quad) |
1272 |
|
|
{ |
1273 |
couturad |
968 |
ofstrm << "plot \"resultats/data_graph/liste_Modules_app_DH_lin.txt\" u ($2*100):($3/(1000000000)) pt 4 ps 2 lc rgb 'blue' lw 1 title \"DH lin\",\\" << std::endl; |
1274 |
|
|
ofstrm << " \"resultats/data_graph/liste_Modules_app_CH_lin.txt\" u ($2*100):($3/(1000000000)) pt 4 ps 2 lc rgb 'red' lw 1 title \"CH lin\",\\" << std::endl; |
1275 |
|
|
ofstrm << " \"resultats/data_graph/liste_Modules_app_DH_quad.txt\" u ($2*100):($3/(1000000000)) pt 5 ps 2 lc rgb 'blue' lw 1 title \"DH quad\",\\" << std::endl; |
1276 |
|
|
ofstrm << " \"resultats/data_graph/liste_Modules_app_CH_quad.txt\" u ($2*100):($3/(1000000000)) pt 5 ps 2 lc rgb 'red' lw 1 title \"DH quad\",\\" << std::endl; |
1277 |
couturad |
951 |
} |
1278 |
|
|
else if(fem_maill_lin && !fem_maill_quad) |
1279 |
|
|
{ |
1280 |
couturad |
968 |
ofstrm << "plot \"resultats/data_graph/liste_Modules_app_DH_lin.txt\" u ($2*100):($3/(1000000000)) pt 4 ps 2 lc rgb 'blue' lw 1 title \"DH lin\",\\" << std::endl; |
1281 |
|
|
ofstrm << " \"resultats/data_graph/liste_Modules_app_CH_lin.txt\" u ($2*100):($3/(1000000000)) pt 4 ps 2 lc rgb 'red' lw 1 title \"CH lin\",\\" << std::endl; |
1282 |
couturad |
951 |
} |
1283 |
|
|
else if(!fem_maill_lin && fem_maill_quad) |
1284 |
|
|
{ |
1285 |
couturad |
968 |
ofstrm << "plot \"resultats/data_graph/liste_Modules_app_DH_quad.txt\" u ($2*100):($3/(1000000000)) pt 5 ps 2 lc rgb 'blue' lw 1 title \"DH quad\",\\" << std::endl; |
1286 |
|
|
ofstrm << " \"resultats/data_graph/liste_Modules_app_CH_quad.txt\" u ($2*100):($3/(1000000000)) pt 5 ps 2 lc rgb 'red' lw 1 title \"DH quad\",\\" << std::endl; |
1287 |
couturad |
951 |
} |
1288 |
|
|
ofstrm << "\"resE.dat\" u($1*100):($2) with line lw 2 lc rgb 'black' lt 2 title \"E_{Reuss}\" ,\\" << std::endl; |
1289 |
|
|
ofstrm << "\"resE.dat\" u($1*100):($3) with line lw 2 lc rgb 'grey' lt 2 title \"E_{HS-}\" ,\\" << std::endl; |
1290 |
|
|
ofstrm << "\"resE.dat\" u($1*100):($7) with line lw 2 lc rgb 'grey' lt 2 dashtype 2 title \"E_{HS+}\" ,\\" << std::endl; |
1291 |
|
|
ofstrm << "\"resE.dat\" u($1*100):($8) with line lw 2 lc rgb 'black' lt 2 dashtype 2 title \"E_{Voigt}\"" << std::endl; |
1292 |
|
|
ofstrm << "#pause -1" << std::endl; |
1293 |
couturad |
968 |
|
1294 |
|
|
|
1295 |
couturad |
951 |
ofstrm << "" << std::endl; |
1296 |
couturad |
968 |
ofstrm << "set output \"resultats/graph/cumul_Eapp.eps\"" << std::endl; |
1297 |
couturad |
951 |
ofstrm << "set title \"Module de Young (GPa)\"" << std::endl; |
1298 |
|
|
ofstrm << "set xlabel \"Fraction volumique (%)\"" << std::endl; |
1299 |
|
|
ofstrm << "set ylabel \"Module de Young (GPa)\"" << std::endl; |
1300 |
|
|
if(fem_maill_lin && fem_maill_quad) |
1301 |
|
|
{ |
1302 |
couturad |
968 |
ofstrm << "plot \"<(sed -n 2p resultats/data_graph/erosion_Modules_app_DH_lin.txt)\" u ($3*100):($5/(1000000000)) pt 4 ps 2 lc rgb 'blue' lw 1 title \"DH lin\",\\" << std::endl; |
1303 |
|
|
|
1304 |
|
|
ofstrm << " \"<(sed -n 2p resultats/data_graph/erosion_Modules_app_CH_lin.txt)\" u ($3*100):($5/(1000000000)) pt 4 ps 2 lc rgb 'red' lw 1 title \"CH lin\",\\" << std::endl; |
1305 |
|
|
ofstrm << " \"<(sed -n 2p resultats/data_graph/erosion_Modules_app_DH_quad.txt)\" u ($3*100):($5/(1000000000)) pt 5 ps 2 lc rgb 'blue' lw 1 title \"DH quad\",\\" << std::endl; |
1306 |
|
|
ofstrm << " \"<(sed -n 2p resultats/data_graph/erosion_Modules_app_CH_quad.txt)\" u ($3*100):($5/(1000000000)) pt 5 ps 2 lc rgb 'red' lw 1 title \"DH quad\",\\" << std::endl; |
1307 |
couturad |
951 |
} |
1308 |
|
|
else if(fem_maill_lin && !fem_maill_quad) |
1309 |
|
|
{ |
1310 |
couturad |
968 |
ofstrm << "plot \"<(sed -n 2p resultats/data_graph/erosion_Modules_app_DH_lin.txt)\" u ($3*100):($5/(1000000000)) pt 4 ps 2 lc rgb 'blue' lw 1 title \"DH lin\",\\" << std::endl; |
1311 |
|
|
ofstrm << " \"<(sed -n 2p resultats/data_graph/erosion_Modules_app_CH_lin.txt)\" u ($3*100):($5/(1000000000)) pt 4 ps 2 lc rgb 'red' lw 1 title \"CH lin\",\\" << std::endl; |
1312 |
couturad |
951 |
} |
1313 |
|
|
else if(!fem_maill_lin && fem_maill_quad) |
1314 |
|
|
{ |
1315 |
couturad |
968 |
ofstrm << "plot \"<(sed -n 2p resultats/data_graph/erosion_Modules_app_DH_quad.txt)\" u ($3*100):($5/(1000000000)) pt 5 ps 2 lc rgb 'blue' lw 1 title \"DH quad\",\\" << std::endl; |
1316 |
|
|
ofstrm << " \"<(sed -n 2p resultats/data_graph/erosion_Modules_app_CH_quad.txt)\" u ($3*100):($5/(1000000000)) pt 5 ps 2 lc rgb 'red' lw 1 title \"DH quad\",\\" << std::endl; |
1317 |
couturad |
951 |
} |
1318 |
|
|
ofstrm << "\"resE.dat\" u($1*100):($2) with line lw 2 lc rgb 'black' lt 2 title \"E_{Reuss}\" ,\\" << std::endl; |
1319 |
|
|
ofstrm << "\"resE.dat\" u($1*100):($3) with line lw 2 lc rgb 'grey' lt 2 title \"E_{HS-}\" ,\\" << std::endl; |
1320 |
|
|
ofstrm << "\"resE.dat\" u($1*100):($7) with line lw 2 lc rgb 'grey' lt 2 dashtype 2 title \"E_{HS+}\" ,\\" << std::endl; |
1321 |
|
|
ofstrm << "\"resE.dat\" u($1*100):($8) with line lw 2 lc rgb 'black' lt 2 dashtype 2 title \"E_{Voigt}\"" << std::endl; |
1322 |
|
|
ofstrm << "#pause -1" << std::endl; |
1323 |
couturad |
964 |
|
1324 |
couturad |
968 |
|
1325 |
|
|
ofstrm << "set output \"resultats/graph/cumul_erosion_Eapp.eps\"" << std::endl; |
1326 |
|
|
ofstrm << "set xrange [0:0.5]" << std::endl; |
1327 |
|
|
ofstrm << "set y2range[0:100]" << std::endl; |
1328 |
couturad |
964 |
ofstrm << "set title \"Module de Young (GPa)\"" << std::endl; |
1329 |
couturad |
968 |
ofstrm << "set xlabel \"Distance d'erosion\"" << std::endl; |
1330 |
couturad |
964 |
ofstrm << "set ylabel \"Module de Young (GPa)\"" << std::endl; |
1331 |
couturad |
968 |
ofstrm << "set y2label \"Fraction volumique (%)\"" << std::endl; |
1332 |
|
|
ofstrm << "set ytics nomirror" << std::endl; |
1333 |
|
|
ofstrm << "set y2tics" << std::endl; |
1334 |
couturad |
964 |
if(fem_maill_lin && fem_maill_quad) |
1335 |
|
|
{ |
1336 |
couturad |
968 |
ofstrm << "plot \"resultats/data_graph/erosion_Modules_app_DH_lin.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)) with lines lc rgb 'blue' lw 1 title \"DH lin\" axes x1y1 ,\\" << std::endl; |
1337 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_DH_lin.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)):($6/(1000000000)) with yerrorbars pt 4 ps 2 lc rgb 'blue' lw 1 title \"erreur DH lin\" axes x1y1 ,\\" << std::endl; |
1338 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_lin.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)) with lines lc rgb 'red' lw 1 title \"CH lin\" axes x1y1 ,\\" << std::endl; |
1339 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_lin.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)):($6/(1000000000)) with yerrorbars pt 4 ps 2 lc rgb 'red' lw 1 title \"erreur CH lin\" axes x1y1 ,\\" << std::endl; |
1340 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_lin.txt\" u ($1*" << epaisseur_couche << "):($3*100) with linespoint lc rgb 'grey' lt 0 lw 1 pt 15 ps 1 title \"Frac. Vol.\" axes x1y2 ,\\" << std::endl; |
1341 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_lin.txt\" u ($1*" << epaisseur_couche << "):($3*100):($4*100) with yerrorbars lc rgb 'grey' pt 15 ps 1 title \"erreur Frac. Vol.\" axes x1y2 ,\\" << std::endl; |
1342 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_DH_quad.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)) with lines lc rgb 'blue' lw 1 title \"DH quad\" axes x1y1 ,\\" << std::endl; |
1343 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_DH_quad.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)):($6/(1000000000)) with yerrorbars pt 5 ps 2 lc rgb 'blue' lw 1 title \"erreur DH quad\" axes x1y1 ,\\" << std::endl; |
1344 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_quad.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)) with lines lc rgb 'red' lw 1 title \"CH quad\" axes x1y1 ,\\" << std::endl; |
1345 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_quad.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)):($6/(1000000000)) with yerrorbars pt 5 ps 2 lc rgb 'red' lw 1 title \"erreur CH quad\" axes x1y1 ,\\" << std::endl; |
1346 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_quad.txt\" u ($1*" << epaisseur_couche << "):($3*100) with linespoint lc rgb 'black' lt 0 lw 1 pt 15 ps 1 title \"Frac. Vol.\" axes x1y2 ,\\" << std::endl; |
1347 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_quad.txt\" u ($1*" << epaisseur_couche << "):($3*100):($4*100) with yerrorbars lc rgb 'black' pt 15 ps 1 title \"erreur Frac. Vol.\" axes x1y2" << std::endl; |
1348 |
couturad |
964 |
} |
1349 |
|
|
else if(fem_maill_lin && !fem_maill_quad) |
1350 |
|
|
{ |
1351 |
couturad |
968 |
ofstrm << "plot \"resultats/data_graph/erosion_Modules_app_DH_lin.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)) with lines lc rgb 'blue' lw 1 title \"DH lin\" axes x1y1 ,\\" << std::endl; |
1352 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_DH_lin.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)):($6/(1000000000)) with yerrorbars pt 4 ps 2 lc rgb 'blue' lw 1 title \"erreur DH lin\" axes x1y1 ,\\" << std::endl; |
1353 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_lin.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)) with lines lc rgb 'red' lw 1 title \"CH lin\" axes x1y1 ,\\" << std::endl; |
1354 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_lin.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)):($6/(1000000000)) with yerrorbars pt 4 ps 2 lc rgb 'red' lw 1 title \"erreur CH lin\" axes x1y1 ,\\" << std::endl; |
1355 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_lin.txt\" u ($1*" << epaisseur_couche << "):($3*100) with linespoint lc rgb 'grey' lt 0 lw 1 pt 15 ps 1 title \"Frac. Vol.\" axes x1y2 ,\\" << std::endl; |
1356 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_lin.txt\" u ($1*" << epaisseur_couche << "):($3*100):($4*100) with yerrorbars lc rgb 'grey' pt 15 ps 1 title \"erreur Frac. Vol.\" axes x1y2" << std::endl; |
1357 |
couturad |
964 |
} |
1358 |
couturad |
968 |
if(!fem_maill_lin && fem_maill_quad) |
1359 |
couturad |
964 |
{ |
1360 |
couturad |
968 |
ofstrm << "plot \"resultats/data_graph/erosion_Modules_app_DH_quad.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)) with lines lc rgb 'blue' lw 1 title \"DH quad\" axes x1y1 ,\\" << std::endl; |
1361 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_DH_quad.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)):($6/(1000000000)) with yerrorbars pt 5 ps 2 lc rgb 'blue' lw 1 title \"erreur DH quad\" axes x1y1 ,\\" << std::endl; |
1362 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_quad.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)) with lines lc rgb 'red' lw 1 title \"CH quad\" axes x1y1 ,\\" << std::endl; |
1363 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_quad.txt\" u ($1*" << epaisseur_couche << "):($5/(1000000000)):($6/(1000000000)) with yerrorbars pt 5 ps 2 lc rgb 'red' lw 1 title \"erreur CH quad\" axes x1y1 ,\\" << std::endl; |
1364 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_quad.txt\" u ($1*" << epaisseur_couche << "):($3*100) with linespoint lc rgb 'black' lt 0 lw 1 pt 15 ps 1 title \"Frac. Vol.\" axes x1y2 ,\\" << std::endl; |
1365 |
|
|
ofstrm << " \"resultats/data_graph/erosion_Modules_app_CH_quad.txt\" u ($1*" << epaisseur_couche << "):($3*100):($4*100) with yerrorbars lc rgb 'black' pt 15 ps 1 title \"erreur Frac. Vol.\" axes x1y2" << std::endl; |
1366 |
couturad |
964 |
} |
1367 |
couturad |
968 |
ofstrm << "unset y2label" << std::endl; |
1368 |
|
|
ofstrm << "unset y2tics" << std::endl; |
1369 |
|
|
ofstrm << "#pause -1" << std::endl; |
1370 |
couturad |
964 |
|
1371 |
couturad |
968 |
ofstrm << "set output \"resultats/graph/cumul_erosion_ecart_energie.eps\"" << std::endl; |
1372 |
couturad |
951 |
ofstrm << "set xrange [0:0.5]" << std::endl; |
1373 |
couturad |
964 |
// ofstrm << "set yrange [0:14]" << std::endl; |
1374 |
couturad |
968 |
ofstrm << "set title \"Ecart d'energie relatif absolue (%)\"" << std::endl; |
1375 |
couturad |
951 |
ofstrm << "set xlabel \"Distance d'erosion\"" << std::endl; |
1376 |
couturad |
968 |
ofstrm << "set ylabel \"Ecart d'energie relatif absolue (%)\"" << std::endl; |
1377 |
couturad |
951 |
if(fem_maill_lin && fem_maill_quad) |
1378 |
|
|
{ |
1379 |
couturad |
968 |
ofstrm << "plot \"resultats/champ/CH/dev/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'red' dt 1 lw 1 title \"CH dev lin\",\\" << std::endl; |
1380 |
|
|
ofstrm << " \"resultats/champ/CH/dev/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 4 ps 2 lc rgb 'red' lw 1 title \"erreur CH dev lin\",\\" << std::endl; |
1381 |
|
|
ofstrm << " \"resultats/champ/CH/sph/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'red' dt 2 lw 1 title \"CH sph lin\",\\" << std::endl; |
1382 |
|
|
ofstrm << " \"resultats/champ/CH/sph/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 4 ps 2 lc rgb 'red' lw 1 title \"erreur CH sph lin\",\\" << std::endl; |
1383 |
|
|
ofstrm << " \"resultats/champ/DH/dev/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'blue' dt 1 lw 1 title \"DH dev lin\",\\" << std::endl; |
1384 |
|
|
ofstrm << " \"resultats/champ/DH/dev/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 4 ps 2 lc rgb 'blue' lw 1 title \"erreur DH dev lin\",\\" << std::endl; |
1385 |
|
|
ofstrm << " \"resultats/champ/DH/sph/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'blue' dt 2 lw 1 title \"DH sph lin\",\\" << std::endl; |
1386 |
|
|
ofstrm << " \"resultats/champ/DH/sph/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 4 ps 2 lc rgb 'blue' lw 1 title \"erreur DH sph lin\",\\" << std::endl; |
1387 |
|
|
ofstrm << " \"resultats/champ/CH/dev/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'red' dt 1 lw 1 title \"CH dev quad\",\\" << std::endl; |
1388 |
|
|
ofstrm << " \"resultats/champ/CH/dev/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 5 ps 2 lc rgb 'red' lw 1 title \"erreur CH dev quad\",\\" << std::endl; |
1389 |
|
|
ofstrm << " \"resultats/champ/CH/sph/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'red' dt 2 lw 1 title \"CH sph quad\",\\" << std::endl; |
1390 |
|
|
ofstrm << " \"resultats/champ/CH/sph/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 5 ps 2 lc rgb 'red' lw 1 title \"erreur CH sph quad\",\\" << std::endl; |
1391 |
|
|
ofstrm << " \"resultats/champ/DH/dev/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'blue' dt 1 lw 1 title \"DH dev quad\",\\" << std::endl; |
1392 |
|
|
ofstrm << " \"resultats/champ/DH/dev/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 5 ps 2 lc rgb 'blue' lw 1 title \"erreur DH dev quad\",\\" << std::endl; |
1393 |
|
|
ofstrm << " \"resultats/champ/DH/sph/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'blue' dt 2 lw 1 title \"DH sph quad\",\\" << std::endl; |
1394 |
|
|
ofstrm << " \"resultats/champ/DH/sph/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 5 ps 2 lc rgb 'blue' lw 1 title \"erreur DH sph quad\"" << std::endl; |
1395 |
couturad |
951 |
} |
1396 |
|
|
else if(fem_maill_lin && !fem_maill_quad) |
1397 |
|
|
{ |
1398 |
couturad |
968 |
ofstrm << "plot \"resultats/champ/CH/dev/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'red' dt 1 lw 1 title \"CH dev lin\",\\" << std::endl; |
1399 |
|
|
ofstrm << " \"resultats/champ/CH/dev/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 4 ps 2 lc rgb 'red' lw 1 title \"erreur CH dev lin\",\\" << std::endl; |
1400 |
|
|
ofstrm << " \"resultats/champ/CH/sph/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'red' dt 2 lw 1 title \"CH sph lin\",\\" << std::endl; |
1401 |
|
|
ofstrm << " \"resultats/champ/CH/sph/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 4 ps 2 lc rgb 'red' lw 1 title \"erreur CH sph lin\",\\" << std::endl; |
1402 |
|
|
ofstrm << " \"resultats/champ/DH/dev/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'blue' dt 1 lw 1 title \"DH dev lin\",\\" << std::endl; |
1403 |
|
|
ofstrm << " \"resultats/champ/DH/dev/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 4 ps 2 lc rgb 'blue' lw 1 title \"erreur DH dev lin\",\\" << std::endl; |
1404 |
|
|
ofstrm << " \"resultats/champ/DH/sph/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'blue' dt 2 lw 1 title \"DH sph lin\",\\" << std::endl; |
1405 |
|
|
ofstrm << " \"resultats/champ/DH/sph/lin/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 4 ps 2 lc rgb 'blue' lw 1 title \"erreur DH sph lin\"" << std::endl; |
1406 |
couturad |
951 |
} |
1407 |
|
|
if(!fem_maill_lin && fem_maill_quad) |
1408 |
|
|
{ |
1409 |
couturad |
968 |
ofstrm << "plot \"resultats/champ/CH/dev/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'red' dt 1 lw 1 title \"CH dev quad\",\\" << std::endl; |
1410 |
|
|
ofstrm << " \"resultats/champ/CH/dev/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 5 ps 2 lc rgb 'red' lw 1 title \"erreur CH dev quad\",\\" << std::endl; |
1411 |
|
|
ofstrm << " \"resultats/champ/CH/sph/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'red' dt 2 lw 1 title \"CH sph quad\",\\" << std::endl; |
1412 |
|
|
ofstrm << " \"resultats/champ/CH/sph/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 5 ps 2 lc rgb 'red' lw 1 title \"erreur CH sph quad\",\\" << std::endl; |
1413 |
|
|
ofstrm << " \"resultats/champ/DH/dev/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'blue' dt 1 lw 1 title \"DH dev quad\",\\" << std::endl; |
1414 |
|
|
ofstrm << " \"resultats/champ/DH/dev/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 5 ps 2 lc rgb 'blue' lw 1 title \"erreur DH dev quad\",\\" << std::endl; |
1415 |
|
|
ofstrm << " \"resultats/champ/DH/sph/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0) with lines lc rgb 'blue' dt 2 lw 1 title \"DH sph quad\",\\" << std::endl; |
1416 |
|
|
ofstrm << " \"resultats/champ/DH/sph/quad/cumul_erosion_Champ_ENERGIE_ecart.txt\" u ($1*0.02):($3*100.0):($4*100.0) with yerrorbars pt 5 ps 2 lc rgb 'blue' lw 1 title \"erreur DH sph quad\"" << std::endl; |
1417 |
couturad |
951 |
} |
1418 |
|
|
ofstrm << "#pause -1" << std::endl; |
1419 |
couturad |
964 |
ofstrm.close(); |
1420 |
|
|
if(fonc_affiche!=NULL) fonc_affiche((char*)"fig_Eapp.gnu"); |
1421 |
couturad |
951 |
} |
1422 |
couturad |
929 |
|
1423 |
|
|
|
1424 |
couturad |
951 |
|
1425 |
couturad |
919 |
int PARAMETRES::importer_fichier_parametres(char* fichier, OT_PARAMETRES* params) |
1426 |
|
|
{ |
1427 |
couturad |
964 |
return params->lire(fichier); |
1428 |
couturad |
919 |
} |
1429 |
|
|
|
1430 |
|
|
int PARAMETRES::importer_fichier_liste_parametres(char* fichier, std::vector< OT_PARAMETRES* >& vector_params) |
1431 |
|
|
{ |
1432 |
|
|
std::string str_fichier = fichier; |
1433 |
|
|
std::size_t found = str_fichier.rfind((char*)"/"); |
1434 |
|
|
std::string chemin; |
1435 |
|
|
if(found!=-1) |
1436 |
|
|
{ |
1437 |
|
|
chemin = str_fichier.substr(0,found+1); |
1438 |
|
|
} |
1439 |
|
|
else chemin = ""; |
1440 |
|
|
FILE* in=fopen(fichier,"rt"); |
1441 |
|
|
char ligne[4000]; |
1442 |
couturad |
968 |
fgets(ligne,4000,in); |
1443 |
couturad |
919 |
while(!feof(in)) |
1444 |
|
|
{ |
1445 |
|
|
char *aide = strstr(ligne,"//"); |
1446 |
|
|
if(aide==NULL) |
1447 |
|
|
{ |
1448 |
couturad |
968 |
char sous_fichier[500]; |
1449 |
|
|
sscanf(ligne,"%s",sous_fichier); |
1450 |
|
|
if(strlen(sous_fichier)==0) continue; |
1451 |
|
|
OT_PARAMETRES *param = new OT_PARAMETRES; |
1452 |
|
|
std::string str_sous_fichier = chemin; |
1453 |
|
|
str_sous_fichier.append(sous_fichier); |
1454 |
|
|
if(param->lire((char*)str_sous_fichier.c_str())==FAIL) return FAIL; |
1455 |
|
|
vector_params.push_back(param); |
1456 |
couturad |
919 |
} |
1457 |
couturad |
968 |
fgets(ligne,4000,in); |
1458 |
couturad |
919 |
} |
1459 |
couturad |
964 |
return OK; |
1460 |
couturad |
919 |
} |