1 #@ MODIF creation_donnees_homard Macro DATE 06/10/2008 AUTEUR GNICOLAS G.NICOLAS
2 # -*- coding: iso-8859-1 -*-
3 # CONFIGURATION MANAGEMENT OF EDF VERSION
4 # ======================================================================
5 # COPYRIGHT (C) 1991 - 2006 EDF R&D WWW.CODE-ASTER.ORG
6 # THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
7 # IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
8 # THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
9 # (AT YOUR OPTION) ANY LATER VERSION.
11 # THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
12 # WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
13 # MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
14 # GENERAL PUBLIC LICENSE FOR MORE DETAILS.
16 # YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
17 # ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
18 # 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
19 # ======================================================================
20 # RESPONSABLE GNICOLAS G.NICOLAS
22 Cette classe crée le fichier de configuration permettant de lancer HOMARD depuis Code_Aster.
29 from types import ListType, TupleType
30 EnumTypes = (ListType, TupleType)
33 from Utilitai.Utmess import UTMESS
35 def UTMESS(code, idmess, valk=(), vali=(), valr=()):
36 """Clone de utmess si on ne reussit pas à le charger
38 fmt = '\n <%s> <%s> %s %s %s\n\n'
39 print fmt % (code, idmess, valk, vali, valr)
41 # ------------------------------------------------------------------------------
42 class creation_donnees_homard:
43 """Cette classe crée les données permettant de lancer HOMARD depuis Code_Aster.
45 . le fichier de configuration
46 . le fichier des données dans le cas d'information
48 Arguments (stockés en tant qu'attribut) :
49 . nom_macro : nom de la macro-commande qui appelle :
50 'MACR_ADAP_MAIL' pour une adaptation
51 'MACR_INFO_MAIL' pour une information sur un maillage
52 . mots_cles : mots-clés de la macro-commande
53 . dico_configuration : dictionnaire des options
56 . Nom_Fichier_Configuration : nom du fichier de configuration (immuable)
57 . Nom_Fichier_Donnees : nom du fichier de données (immuable)
58 . mode_homard : le mode pour filtrer ici ("ADAP" ou "INFO")
59 . ModeHOMA : le mode pour HOMARD (1 ou 2)
60 . mode_homard_texte : le mode d'utilisation, en francais ("ADAPTATION" ou "INFORMATION")
61 . elements_incompatibles : que faire des éléments incompatibles avec HOMARD
63 # ------------------------------------------------------------------------------
64 def __init__(self, nom_macro, mots_cles, dico_configuration ) :
65 """Construction + valeurs par défaut des attributs
68 # 1. Vérification de la macro qui appelle
71 d_aux["MACR_ADAP_MAIL"] = ( "ADAP", 1, "ADAPTATION" )
72 d_aux["MACR_INFO_MAIL"] = ( "INFO", 2, "INFORMATION" )
73 if d_aux.has_key(nom_macro) :
74 self.mode_homard = d_aux[nom_macro][0]
75 self.ModeHOMA = d_aux[nom_macro][1]
76 self.mode_homard_texte = d_aux[nom_macro][2]
78 UTMESS("F",'HOMARD0_1')
80 # 2. Données générales de cette initialisation
82 #gn for mot_cle in mots_cles.keys() :
83 #gn print "mots_cles[", mot_cle, "] = ", mots_cles[mot_cle]
84 #gn for mot_cle in dico_configuration.keys() :
85 #gn print "dico_configuration[", mot_cle, "] = ", dico_configuration[mot_cle]
87 self.nom_macro = nom_macro
88 self.mots_cles = mots_cles
89 self.dico_configuration = dico_configuration
91 # 3. Quel type de traitement des elemenst incompatibles
93 if mots_cles.has_key("ELEMENTS_NON_HOMARD") :
95 d_aux["REFUSER"] = "TOUS"
96 d_aux["IGNORER"] = "IGNORE_QUAD"
97 self.elements_incompatibles = d_aux[mots_cles["ELEMENTS_NON_HOMARD"]]
99 self.elements_incompatibles = None
101 # 4. Attributs immuables
103 self.Nom_Fichier_Configuration = "HOMARD.Configuration"
104 self.Nom_Fichier_Donnees = "HOMARD.Donnees"
106 # ------------------------------------------------------------------------------
107 def int_to_str2 (self, entier) :
109 Transforme un entier compris entre 0 et 99 en une chaine sur deux caractères
111 # print "\nArguments a l'entree de", __name__, ":", entier
114 la_chaine = '%02d' % entier
119 # ------------------------------------------------------------------------------
120 def quel_mode (self) :
121 """Informe sur le mode de lancement de HOMARD
123 ### print self.mode_homard_texte
124 print "Lancement de creation_donnees_homard en mode", self.mode_homard_texte
126 # ------------------------------------------------------------------------------
127 def creation_configuration (self) :
128 """Crée les données nécessaires à la configuration
131 message_erreur = None
133 while message_erreur is None :
135 # 1. Les chaines liées aux numéros d'itération
137 if self.mode_homard == "ADAP" :
138 niter = self.dico_configuration["niter"]
139 self.str_niter = self.int_to_str2 (niter)
140 self.str_niterp1 = self.int_to_str2 (niter+1)
141 self.niter_vers_niterp1 = self.str_niter + ".vers." + self.str_niterp1
143 # 2. La liste standard
145 if self.mode_homard == "INFO" :
148 aux = "Liste." + self.niter_vers_niterp1
151 # 3. Le type de bilan : il faut convertir la donnée textuelle en un entier,
152 # produit de nombres premiers.
153 # Si rien n'est demandé, on met 0.
157 dico_aux["INTERPENETRATION"] = 3
158 dico_aux["NOMBRE"] = 7
159 dico_aux["QUALITE"] = 5
160 dico_aux["CONNEXITE"] = 11
161 dico_aux["TAILLE"] = 13
162 l_aux = dico_aux.keys()
164 if self.mots_cles.has_key(choix) :
165 if self.mots_cles[choix] == "OUI" :
166 aux = aux * dico_aux[choix]
171 # 4. Les entrées/sorties au format MED
173 self.CCNoMN__ = self.dico_configuration["NOM_MED_MAILLAGE_N"]
174 if self.mode_homard == "ADAP" :
175 self.CCNoMNP1 = self.dico_configuration["NOM_MED_MAILLAGE_NP1"]
176 if self.dico_configuration.has_key("NOM_MED_MAILLAGE_NP1_ANNEXE") :
177 self.CCMaiAnn = self.dico_configuration["NOM_MED_MAILLAGE_NP1_ANNEXE"]
181 # 5. Les entrées/sorties au format HOMARD
183 if self.mode_homard == "ADAP" :
184 self.fic_homard_niter = "M_" + self.str_niter + ".hom.med"
185 self.fic_homard_niterp1 = "M_" + self.str_niterp1 + ".hom.med"
187 self.fic_homard_niter = None
188 self.fic_homard_niterp1 = None
190 # 6.1. Le pilotage de l'adaptation
192 if self.mode_homard == "ADAP" :
194 # 6.1. Le type d'adaptation
196 if self.mots_cles["ADAPTATION"] == "RAFFINEMENT" or self.mots_cles["ADAPTATION"] == "RAFFINEMENT_ZONE" :
197 self.TypeRaff = "libre"
198 self.TypeDera = "non"
199 elif self.mots_cles["ADAPTATION"] == "DERAFFINEMENT" :
200 self.TypeRaff = "non"
201 self.TypeDera = "libre"
202 elif self.mots_cles["ADAPTATION"] == "RAFF_DERA" :
203 self.TypeRaff = "libre"
204 self.TypeDera = "libre"
205 elif self.mots_cles["ADAPTATION"] == "RAFFINEMENT_UNIFORME" :
206 self.TypeRaff = "uniforme"
207 self.TypeDera = "non"
208 elif self.mots_cles["ADAPTATION"] == "DERAFFINEMENT_UNIFORME" :
209 self.TypeRaff = "non"
210 self.TypeDera = "uniforme"
211 elif self.mots_cles["ADAPTATION"] == "RIEN" :
212 self.TypeRaff = "non"
213 self.TypeDera = "non"
214 #gn print "... self.TypeRaff = ",self.TypeRaff
215 #gn print "... self.TypeDera = ",self.TypeDera
217 # 6.2. L'éventuel seuil de raffinement
219 if self.TypeRaff == "libre" and self.mots_cles["ADAPTATION"] != "RAFFINEMENT_ZONE" :
221 d_aux["CRIT_RAFF_ABS"] = ("SeuilHau", 1)
222 d_aux["CRIT_RAFF_REL"] = ("SeuilHRe", 100)
223 d_aux["CRIT_RAFF_PE" ] = ("SeuilHPE", 100)
225 for mot_cle in l_aux :
226 if self.mots_cles[mot_cle] is not None :
227 aux = self.mots_cles[mot_cle]*d_aux[mot_cle][1]
228 self.critere_raffinement = (d_aux[mot_cle][0], aux)
230 self.critere_raffinement = None
231 #gn print "... self.critere_raffinement = ", self.critere_raffinement
233 # 6.3. L'éventuel seuil de déraffinement
235 if self.TypeDera == "libre" :
237 d_aux["CRIT_DERA_ABS"] = ("SeuilBas", 1)
238 d_aux["CRIT_DERA_REL"] = ("SeuilBRe", 100)
239 d_aux["CRIT_DERA_PE" ] = ("SeuilBPE", 100)
241 for mot_cle in l_aux :
242 if self.mots_cles[mot_cle] is not None :
243 aux = self.mots_cles[mot_cle]*d_aux[mot_cle][1]
244 self.critere_deraffinement = (d_aux[mot_cle][0], aux)
246 self.critere_deraffinement = None
247 #gn print "... self.critere_deraffinement = ", self.critere_deraffinement
249 # 6.4. Les niveaux extremes
252 for mot_cle in [ "NIVE_MIN", "NIVE_MAX" ] :
253 if self.mots_cles.has_key(mot_cle) :
254 if self.mots_cles[mot_cle] is not None :
255 if mot_cle == "NIVE_MIN" :
259 self.niveau.append((aux, self.mots_cles[mot_cle]))
260 if len(self.niveau) == 2 :
261 #gn print self.mots_cles["NIVE_MIN"]
262 #gn print self.mots_cles["NIVE_MAX"]
263 if self.mots_cles["NIVE_MIN"] >= self.mots_cles["NIVE_MAX"] :
264 message_erreur = "Le niveau mini ,"+str(self.mots_cles["NIVE_MIN"])+\
265 ", doit etre < au niveau maxi, "+str(self.mots_cles["NIVE_MAX"])+"."
268 # 6.5. Les éventuelles zones de raffinement
270 if self.dico_configuration.has_key("Zones") :
272 for zone in self.dico_configuration["Zones"] :
274 s_aux_1 = "Zone numero "+str(iaux)+" : "
275 s_aux_2 = ", doit etre < au "
276 if zone.has_key("X_MINI") :
277 if zone["X_MINI"] > zone["X_MAXI"] :
278 message_erreur = s_aux_1+"X mini ,"+str(zone["X_MINI"])+s_aux_2+"X maxi, "+str(zone["X_MAXI"])+"."
279 if zone["Y_MINI"] > zone["Y_MAXI"] :
280 message_erreur = s_aux_1+"Y mini ,"+str(zone["Y_MINI"])+s_aux_2+"Y maxi, "+str(zone["Y_MAXI"])+"."
281 if zone.has_key("Z_MINI") :
282 if zone["Z_MINI"] > zone["Z_MAXI"] :
283 message_erreur = s_aux_1+"Z mini ,"+str(zone["Z_MINI"])+s_aux_2+"Z maxi, "+str(zone["Z_MAXI"])+"."
287 if message_erreur is not None :
288 UTMESS("F",'HOMARD0_2',valk=message_erreur)
290 return self.fic_homard_niter, self.fic_homard_niterp1
291 # ------------------------------------------------------------------------------
292 def ouvre_fichier (self, nomfic_local) :
293 """Ouvre en écriture un fichier après l'avoir éventuellement détruit
296 ### print nomfic_local
297 Rep_Calc_HOMARD_global = self.dico_configuration["Rep_Calc_HOMARD_global"]
298 nomfic = os.path.join ( Rep_Calc_HOMARD_global , nomfic_local )
300 if os.path.isfile (nomfic) :
303 except os.error, codret_partiel :
304 print "Probleme au remove, erreur numéro ", codret_partiel[0], ":", codret_partiel[1]
305 UTMESS("F",'HOMARD0_3',valk=nomfic)
307 fichier = open (nomfic,"w")
308 self.fichier = fichier
310 return fichier, nomfic
311 def ecrire_ligne_configuration_0 (self, commentaire) :
312 """Ecrit une ligne de commentaires du fichier de configuration
314 . commentaire : le commentaire à écrire
318 ligne = ligne + "# " + commentaire + "\n"
319 ligne = ligne + "#\n"
320 self.fichier.write(ligne)
323 # ------------------------------------------------------------------------------
324 def ecrire_ligne_configuration_2 (self, motcle, valeur) :
325 """Ecrit une ligne du fichier de configuration dans le cas : motcle + valeur
327 . motcle : le mot-clé HOMARD à écrire
328 . valeur : la valeur associée
331 ligne = motcle + " " + str(valeur) + "\n"
332 self.fichier.write(ligne)
335 # ------------------------------------------------------------------------------
336 def ecrire_ligne_configuration_3 (self, motcle, valeur1, valeur2) :
337 """Ecrit une ligne du fichier de configuration dans le cas : motcle + valeur1 + valeur2
339 . motcle : le mot-clé HOMARD à écrire
340 . valeur : la valeur associée
343 ligne = motcle + " " + str(valeur1) + " " + str(valeur2) + "\n"
344 self.fichier.write(ligne)
347 # ------------------------------------------------------------------------------
348 def ecrire_fichier_configuration (self) :
349 """Ecrit le fichier de configuration
351 message_erreur = None
353 while message_erreur is None :
355 # 1. Ouverture du fichier
357 fichier, nomfic_global = self.ouvre_fichier(self.Nom_Fichier_Configuration)
361 self.ecrire_ligne_configuration_0("Generalites")
362 self.ecrire_ligne_configuration_2("ModeHOMA", self.ModeHOMA)
363 self.ecrire_ligne_configuration_2("ListeStd", self.ListeStd)
364 self.ecrire_ligne_configuration_2("TypeBila", self.TypeBila)
365 self.ecrire_ligne_configuration_2("CCAssoci", "MED")
366 self.ecrire_ligne_configuration_2("NumeIter", self.dico_configuration["niter"])
368 # 3. Les fichiers externes
370 self.ecrire_ligne_configuration_0("Les fichiers de Code_Aster, au format MED")
371 self.ecrire_ligne_configuration_2("CCNoMN__", self.CCNoMN__)
372 self.ecrire_ligne_configuration_2("CCMaiN__", self.dico_configuration["Fichier_ASTER_vers_HOMARD"])
373 if self.mode_homard == "ADAP" :
374 self.ecrire_ligne_configuration_2("CCNoMNP1", self.CCNoMNP1)
375 self.ecrire_ligne_configuration_2("CCMaiNP1", self.dico_configuration["Fichier_HOMARD_vers_ASTER"])
377 self.ecrire_ligne_configuration_0("Le répertoire des fichiers de bilan")
378 self.ecrire_ligne_configuration_2("RepeInfo", self.dico_configuration["Rep_Calc_HOMARD_global"])
380 # 4. Les fichiers HOMARD
382 self.ecrire_ligne_configuration_0("Les fichiers de HOMARD, au format MED")
383 if self.mode_homard == "ADAP" :
384 self.ecrire_ligne_configuration_3("HOMaiN__", "M_"+self.str_niter , self.fic_homard_niter )
385 self.ecrire_ligne_configuration_3("HOMaiNP1", "M_"+self.str_niterp1, self.fic_homard_niterp1)
389 self.ecrire_ligne_configuration_2("EcriFiHO", aux)
391 # 5. Le pilotage de l'adaptation
393 if self.mode_homard == "ADAP" :
394 self.ecrire_ligne_configuration_0("Le pilotage de l'adaptation")
396 # 5.1. Type d'adaptation
398 self.ecrire_ligne_configuration_2("TypeRaff", self.TypeRaff)
399 if self.critere_raffinement is not None :
400 self.ecrire_ligne_configuration_2(self.critere_raffinement[0], self.critere_raffinement[1])
401 self.ecrire_ligne_configuration_2("TypeDera", self.TypeDera)
402 if self.critere_deraffinement is not None :
403 self.ecrire_ligne_configuration_2(self.critere_deraffinement[0], self.critere_deraffinement[1])
405 # 5.2. L'eventuel indicateur d'erreur
407 if self.dico_configuration.has_key("Indicateur") :
409 self.ecrire_ligne_configuration_0("L'indicateur d'erreur")
410 self.ecrire_ligne_configuration_2("CCIndica", self.dico_configuration["Fichier_ASTER_vers_HOMARD"])
411 self.ecrire_ligne_configuration_2("CCNoChaI", self.dico_configuration["Indicateur"]["NOM_MED"])
412 self.ecrire_ligne_configuration_2("CCCoChaI", self.dico_configuration["Indicateur"]["COMPOSANTE"])
413 if self.dico_configuration["Indicateur"].has_key("NUME_ORDRE") :
414 self.ecrire_ligne_configuration_2("CCNumOrI", self.dico_configuration["Indicateur"]["NUME_ORDRE"])
415 self.ecrire_ligne_configuration_2("CCNumPTI", self.dico_configuration["Indicateur"]["NUME_ORDRE"])
416 if self.mots_cles.has_key("TYPE_VALEUR_INDICA") :
417 self.ecrire_ligne_configuration_2("CCTyVaIn", self.mots_cles["TYPE_VALEUR_INDICA"])
419 # 5.3. Les éventuelles zones de raffinement
421 if self.dico_configuration.has_key("Zones") :
423 for zone in self.dico_configuration["Zones"] :
425 self.ecrire_ligne_configuration_0("Zone de raffinement numéro "+str(iaux))
426 if zone.has_key("X_MINI") :
427 self.ecrire_ligne_configuration_3("ZoRaXmin", iaux, zone["X_MINI"])
428 self.ecrire_ligne_configuration_3("ZoRaXmax", iaux, zone["X_MAXI"])
429 self.ecrire_ligne_configuration_3("ZoRaYmin", iaux, zone["Y_MINI"])
430 self.ecrire_ligne_configuration_3("ZoRaYmax", iaux, zone["Y_MAXI"])
431 if zone.has_key("Z_MINI") :
432 self.ecrire_ligne_configuration_3("ZoRaZmin", iaux, zone["Z_MINI"])
433 self.ecrire_ligne_configuration_3("ZoRaZmax", iaux, zone["Z_MAXI"])
434 if zone.has_key("X_CENTRE") :
435 self.ecrire_ligne_configuration_3("ZoRaXCen", iaux, zone["X_CENTRE"])
436 self.ecrire_ligne_configuration_3("ZoRaYCen", iaux, zone["Y_CENTRE"])
437 self.ecrire_ligne_configuration_3("ZoRaRayo", iaux, zone["RAYON"])
438 if zone.has_key("Z_CENTRE") :
439 self.ecrire_ligne_configuration_3("ZoRaZCen", iaux, zone["Z_CENTRE"])
441 # 5.4. Les niveaux extremes
443 for aux in self.niveau :
444 self.ecrire_ligne_configuration_2(aux[0], aux[1])
446 # 5.5. L'usage de l'indicateur
448 if self.mots_cles.has_key("TYPE_OPER_INDICA") :
449 if self.mots_cles["TYPE_OPER_INDICA"] is not None :
450 self.ecrire_ligne_configuration_2("CCModeFI", self.mots_cles["TYPE_OPER_INDICA"])
452 # 5.6. Les éventuels groupes de filtrage du raffinement/deraffinement
454 for cle in ( "GROUP_MA", "GROUP_NO" ) :
455 if self.mots_cles.has_key(cle) :
456 if self.mots_cles[cle] is not None :
457 if not type(self.mots_cles[cle]) in EnumTypes :
458 self.ecrire_ligne_configuration_2("CCGroAda", self.mots_cles[cle])
460 for group in self.mots_cles[cle] :
461 self.ecrire_ligne_configuration_2("CCGroAda", group)
463 # 6. Les éventuels champs à mettre à jour
465 if self.dico_configuration.has_key("Champs") :
466 self.ecrire_ligne_configuration_0("Champs à mettre à jour")
467 self.ecrire_ligne_configuration_2("CCSolN__", self.dico_configuration["Fichier_ASTER_vers_HOMARD"])
468 self.ecrire_ligne_configuration_2("CCSolNP1", self.dico_configuration["Fichier_HOMARD_vers_ASTER"])
470 for maj_champ in self.dico_configuration["Champs"] :
472 self.ecrire_ligne_configuration_0("Mise à jour du champ numéro "+str(iaux))
473 self.ecrire_ligne_configuration_3("CCChaNom", iaux, maj_champ["NOM_MED"])
474 if maj_champ.has_key("NUME_ORDRE") :
475 self.ecrire_ligne_configuration_3("CCChaNuO", iaux, maj_champ["NUME_ORDRE"])
476 self.ecrire_ligne_configuration_3("CCChaPdT", iaux, maj_champ["NUME_ORDRE"])
477 elif maj_champ.has_key("INST") :
478 self.ecrire_ligne_configuration_3("CCChaIns", iaux, maj_champ["INST"])
480 # 7. L'éventuel maillage de frontière
482 if self.dico_configuration.has_key("NOM_MED_MAILLAGE_FRONTIERE") :
483 self.ecrire_ligne_configuration_0("Maillage de frontière")
484 self.ecrire_ligne_configuration_2("SuivFron", "oui")
485 self.ecrire_ligne_configuration_2("CCFronti", self.dico_configuration["Fichier_ASTER_vers_HOMARD"])
486 self.ecrire_ligne_configuration_2("CCNoMFro", self.dico_configuration["NOM_MED_MAILLAGE_FRONTIERE"])
487 if self.mots_cles.has_key("GROUP_MA_FRONT") :
488 if self.mots_cles["GROUP_MA_FRONT"] is not None :
489 if not type(self.mots_cles["GROUP_MA_FRONT"]) in EnumTypes :
490 self.ecrire_ligne_configuration_2("CCGroFro", self.mots_cles["GROUP_MA_FRONT"])
492 for group_ma in self.mots_cles["GROUP_MA_FRONT"] :
493 self.ecrire_ligne_configuration_2("CCGroFro", group_ma)
495 # 8. L'éventuel maillage annexe
497 if self.mode_homard == "ADAP" :
498 if self.CCMaiAnn is not None :
499 self.ecrire_ligne_configuration_0("Maillage d'autre degré")
500 self.ecrire_ligne_configuration_2("ModDegre", "oui")
501 self.ecrire_ligne_configuration_2("CCNoMAnn", self.CCMaiAnn)
502 self.ecrire_ligne_configuration_2("CCMaiAnn", self.dico_configuration["Fichier_HOMARD_vers_ASTER"])
504 # 9. Options particulières
506 self.ecrire_ligne_configuration_0("Autres options")
507 if self.mots_cles.has_key("LANGUE") :
508 self.ecrire_ligne_configuration_2("Langue", self.mots_cles["LANGUE"])
509 self.ecrire_ligne_configuration_2("MessInfo", self.dico_configuration["INFO"])
510 if self.dico_configuration["version_perso"] :
511 VERSION_HOMARD = self.dico_configuration["VERSION_HOMARD"]
512 self.ecrire_ligne_configuration_2("DicoOSGM", "$HOMARD_USER/"+VERSION_HOMARD+"/CONFIG/typobj.stu")
514 # 10. L'usage des éléments incompatibles avec HOMARD
516 if self.elements_incompatibles is not None :
517 self.ecrire_ligne_configuration_0("Les éléments incompatibles avec HOMARD")
518 self.ecrire_ligne_configuration_2("TypeElem", self.elements_incompatibles)
520 # 11. Fermeture du fichier
525 if message_erreur is not None :
526 message_erreur = "Ecriture de "+nomfic_global+". "+message_erreur
527 UTMESS("F",'HOMARD0_2',valk=message_erreur)
530 # ------------------------------------------------------------------------------
531 def ecrire_fichier_donnees (self) :
532 """Ecrit le fichier des donnees dans le cas d'une demande d'information
534 message_erreur = None
536 while message_erreur is None :
538 # 1. Ouverture du fichier
540 fichier, nomfic_global = self.ouvre_fichier(self.Nom_Fichier_Donnees)
542 # 2. On ne demande rien pour le moment
549 # n. Fermeture du fichier
554 if message_erreur is not None :
555 UTMESS("F",'HOMARD0_2',valk=message_erreur)