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