From a9550690021ad4845f2241cb5e917a61f1d7febd Mon Sep 17 00:00:00 2001 From: PASCALE NOYRET Date: Thu, 25 Nov 2021 15:58:27 +0100 Subject: [PATCH] Traducteur devient Traducteur2 ( python 2) --- Extensions/pluginloader.py | 4 +- InterfaceQT4/eficas_go.py | 1 + InterfaceQT4/monWidgetMatrice.py | 22 +- InterfaceQT4/qtEficas.py | 5 +- Noyau/.context.py.swp | Bin 0 -> 12288 bytes Noyau/N_MCLIST.py | 4 +- Noyau/N_MCSIMP.py | 7 +- Noyau/N_MCSIMP.py.pn | 350 ++ Noyau/N_TUPLE.py | 6 +- Noyau/N_UserASSDMultiple.py | 6 +- Noyau/N__F.py | 4 +- ReacteurNumerique/cata_RN_EDG_PN.py | 385 ++ .../cata_RN_EDG_PN_TraductionV0.py | 377 ++ ReacteurNumerique/cata_RN_EDG_PN_UQ.py | 385 ++ ReacteurNumerique/edg_REP1300_FULL.comm | 201 + ReacteurNumerique/edg_REP1300_FULL_PN.comm | 177 + ReacteurNumerique/prefs.py | 22 + ReacteurNumerique/prefs_ReacteurNumerique.py | 50 + .../qtEficasReacteurNumerique.py | 36 + ReacteurNumerique/test.comm | 177 + Traducteur/toto.comm | 10 - Traducteur2/.renamemocle.py.swp | Bin 0 -> 16384 bytes {Traducteur => Traducteur2}/CMakeLists.txt | 0 {Traducteur => Traducteur2}/__init__.py | 0 {Traducteur => Traducteur2}/calcG.py | 10 +- {Traducteur => Traducteur2}/changeValeur.py | 0 Traducteur2/demosRN.py | 523 +++ {Traducteur => Traducteur2}/dictErreurs.py | 0 Traducteur2/edg_REP1300_FULL_PN.comm | 159 + {Traducteur => Traducteur2}/inseremocle.py | 0 {Traducteur => Traducteur2}/load.py | 0 {Traducteur => Traducteur2}/log.py | 0 {Traducteur => Traducteur2}/mocles.py | 0 {Traducteur => Traducteur2}/movemocle.py | 0 {Traducteur => Traducteur2}/parseur.py | 0 {Traducteur => Traducteur2}/regles.py | 0 {Traducteur => Traducteur2}/removemocle.py | 0 {Traducteur => Traducteur2}/renamemocle.py | 0 Traducteur2/toto.comm | 1 + {Traducteur => Traducteur2}/traduitV10V11.py | 0 {Traducteur => Traducteur2}/traduitV11V12.py | 0 {Traducteur => Traducteur2}/traduitV7V8.py | 0 {Traducteur => Traducteur2}/traduitV8V9.py | 0 {Traducteur => Traducteur2}/traduitV9V10.py | 0 {Traducteur => Traducteur2}/utils.py | 0 {Traducteur => Traducteur2}/visiteur.py | 0 Traducteur3/.mocles.py.swp | Bin 0 -> 20480 bytes Traducteur3/.toto.comm.swp | Bin 0 -> 24576 bytes Traducteur3/.visiteur.py.swp | Bin 0 -> 12288 bytes Traducteur3/CMakeLists.txt | 34 + Traducteur3/__init__.py | 19 + Traducteur3/changeValeur.py | 317 ++ Traducteur3/demosRN.py | 94 + Traducteur3/dictErreurs.py | 110 + Traducteur3/edg_REP1300_FULL_PN.comm | 159 + Traducteur3/inseremocle.py | 289 ++ Traducteur3/load.py | 146 + Traducteur3/log.py | 48 + Traducteur3/log.txt | 1 + Traducteur3/mocles.py | 168 + Traducteur3/movemocle.py | 346 ++ Traducteur3/parseur.py | 280 ++ Traducteur3/regles.py | 524 +++ Traducteur3/removemocle.py | 215 + Traducteur3/renamemocle.py | 188 + Traducteur3/toto.comm | 161 + Traducteur3/tutu.comm | 161 + Traducteur3/utils.py | 45 + Traducteur3/visiteur.py | 98 + UiQT5/Tuple10.ui | 20 +- UiQT5/Tuple2.ui | 4 +- UiQT5/Tuple3.ui | 6 +- UiQT5/Tuple4.ui | 8 +- UiQT5/Tuple5.ui | 10 +- UiQT5/Tuple6.ui | 12 +- UiQT5/Tuple7.ui | 14 +- UiQT5/Tuple8.ui | 16 +- UiQT5/Tuple9.ui | 18 +- UiQT5/desWidgetFact.ui | 4 +- UiQT5/desWidgetFactHorizon.ui | 428 ++ UiQT5/desWidgetMatrice.ui | 232 +- UiQT5/desWidgetPlusieursBase.ui | 7 + UiQT5/desWidgetPlusieursTuple.ui | 11 +- UiQT5/desWidgetSimpBase.ui | 59 +- UiQT5/desWidgetSimpComplexe.ui | 143 +- UiQT5/desWidgetTuple10.ui | 62 +- UiQT5/desWidgetTuple2.ui | 28 +- UiQT5/desWidgetTuple3.ui | 27 +- UiQT5/desWidgetTuple4.ui | 34 +- UiQT5/desWidgetTuple5.ui | 36 +- UiQT5/desWidgetTuple6.ui | 38 +- UiQT5/desWidgetTuple7.ui | 53 +- UiQT5/desWidgetTuple8.ui | 58 +- UiQT5/desWidgetTuple9.ui | 62 +- UiQT5/eficas_en.qm | Bin 0 -> 81252 bytes UiQT5/eficas_fr.qm | Bin 0 -> 23 bytes UiQT5/myMain.ui.pn | 497 ++ Vimmp/cata_CSAndCPS_v16.py | 6 +- Vimmp/cata_CSAndCPS_v16.xsd | 4058 +++++++++++++++++ Vimmp/generateXSD.py | 33 + 100 files changed, 11965 insertions(+), 344 deletions(-) create mode 100644 Noyau/.context.py.swp create mode 100644 Noyau/N_MCSIMP.py.pn create mode 100755 ReacteurNumerique/cata_RN_EDG_PN.py create mode 100755 ReacteurNumerique/cata_RN_EDG_PN_TraductionV0.py create mode 100755 ReacteurNumerique/cata_RN_EDG_PN_UQ.py create mode 100755 ReacteurNumerique/edg_REP1300_FULL.comm create mode 100755 ReacteurNumerique/edg_REP1300_FULL_PN.comm create mode 100644 ReacteurNumerique/prefs.py create mode 100644 ReacteurNumerique/prefs_ReacteurNumerique.py create mode 100755 ReacteurNumerique/qtEficasReacteurNumerique.py create mode 100755 ReacteurNumerique/test.comm delete mode 100644 Traducteur/toto.comm create mode 100644 Traducteur2/.renamemocle.py.swp rename {Traducteur => Traducteur2}/CMakeLists.txt (100%) rename {Traducteur => Traducteur2}/__init__.py (100%) rename {Traducteur => Traducteur2}/calcG.py (95%) rename {Traducteur => Traducteur2}/changeValeur.py (100%) create mode 100755 Traducteur2/demosRN.py rename {Traducteur => Traducteur2}/dictErreurs.py (100%) create mode 100755 Traducteur2/edg_REP1300_FULL_PN.comm rename {Traducteur => Traducteur2}/inseremocle.py (100%) rename {Traducteur => Traducteur2}/load.py (100%) rename {Traducteur => Traducteur2}/log.py (100%) rename {Traducteur => Traducteur2}/mocles.py (100%) rename {Traducteur => Traducteur2}/movemocle.py (100%) rename {Traducteur => Traducteur2}/parseur.py (100%) rename {Traducteur => Traducteur2}/regles.py (100%) rename {Traducteur => Traducteur2}/removemocle.py (100%) rename {Traducteur => Traducteur2}/renamemocle.py (100%) create mode 120000 Traducteur2/toto.comm rename {Traducteur => Traducteur2}/traduitV10V11.py (100%) rename {Traducteur => Traducteur2}/traduitV11V12.py (100%) rename {Traducteur => Traducteur2}/traduitV7V8.py (100%) rename {Traducteur => Traducteur2}/traduitV8V9.py (100%) rename {Traducteur => Traducteur2}/traduitV9V10.py (100%) rename {Traducteur => Traducteur2}/utils.py (100%) rename {Traducteur => Traducteur2}/visiteur.py (100%) create mode 100644 Traducteur3/.mocles.py.swp create mode 100644 Traducteur3/.toto.comm.swp create mode 100644 Traducteur3/.visiteur.py.swp create mode 100644 Traducteur3/CMakeLists.txt create mode 100644 Traducteur3/__init__.py create mode 100644 Traducteur3/changeValeur.py create mode 100755 Traducteur3/demosRN.py create mode 100644 Traducteur3/dictErreurs.py create mode 100755 Traducteur3/edg_REP1300_FULL_PN.comm create mode 100644 Traducteur3/inseremocle.py create mode 100644 Traducteur3/load.py create mode 100644 Traducteur3/log.py create mode 100644 Traducteur3/log.txt create mode 100644 Traducteur3/mocles.py create mode 100644 Traducteur3/movemocle.py create mode 100644 Traducteur3/parseur.py create mode 100644 Traducteur3/regles.py create mode 100644 Traducteur3/removemocle.py create mode 100644 Traducteur3/renamemocle.py create mode 100755 Traducteur3/toto.comm create mode 100644 Traducteur3/tutu.comm create mode 100644 Traducteur3/utils.py create mode 100644 Traducteur3/visiteur.py create mode 100644 UiQT5/desWidgetFactHorizon.ui create mode 100644 UiQT5/eficas_en.qm create mode 100644 UiQT5/eficas_fr.qm create mode 100644 UiQT5/myMain.ui.pn create mode 100644 Vimmp/cata_CSAndCPS_v16.xsd create mode 100755 Vimmp/generateXSD.py diff --git a/Extensions/pluginloader.py b/Extensions/pluginloader.py index 6dbd8342..ff6cf249 100644 --- a/Extensions/pluginloader.py +++ b/Extensions/pluginloader.py @@ -24,9 +24,9 @@ from __future__ import absolute_import import glob,os,sys,traceback try: - from UserDict import UserDict -except ImportError: from collections import UserDict +except ImportError: + from UserDict import UserDict class PluginLoader(UserDict): diff --git a/InterfaceQT4/eficas_go.py b/InterfaceQT4/eficas_go.py index 95f75811..fbbcf3ed 100755 --- a/InterfaceQT4/eficas_go.py +++ b/InterfaceQT4/eficas_go.py @@ -57,6 +57,7 @@ def lanceEficas(code=None, multi=False, langue='en', labelCode=None): from InterfaceQT4.qtEficas import Appli app = QApplication(sys.argv) + app.setStyleSheet("QWidget { font: 19px}") Eficas=Appli(code=code,salome=0,multi=multi,langue=langue,labelCode=labelCode) Eficas.show() diff --git a/InterfaceQT4/monWidgetMatrice.py b/InterfaceQT4/monWidgetMatrice.py index 02fb9311..bf32798e 100644 --- a/InterfaceQT4/monWidgetMatrice.py +++ b/InterfaceQT4/monWidgetMatrice.py @@ -51,6 +51,7 @@ class MonWidgetMatrice (Ui_desWidgetMatrice,Feuille): self.nbLigs=0 self.nbCols=0 self.creeColonnes() + self.createListePossibles() self.connecterSignaux() self.initialValeur() @@ -66,6 +67,9 @@ class MonWidgetMatrice (Ui_desWidgetMatrice,Feuille): QTableWidget.focusOutEvent(self.TBMatrice,event) + def createListePossibles(self) : + print (dir(self.monType)) + def itemChanged(self): monItem=self.TBMatrice.currentItem() if monItem==None : return @@ -97,7 +101,7 @@ class MonWidgetMatrice (Ui_desWidgetMatrice,Feuille): try: MonWidgetMatrice.__dict__[self.monType.methodeCalculTaille](*(self,)) except : - QMessageBox.critical( self, tr("Mauvaise execution "),tr( "impossible d executer la methode ") + monType.methodeCalculTaille ) + QMessageBox.critical( self, tr("Mauvaise execution "),tr( "impossible d executer la methode ") + self.monType.methodeCalculTaille ) return else : self.nbLigs=self.monType.nbLigs @@ -208,7 +212,7 @@ class MonWidgetMatriceOT (MonWidgetMatrice): try: MonWidgetMatrice.__dict__[self.monType.methodeCalculTaille](*(self,)) except : - QMessageBox.critical( self, tr("Mauvaise execution "),tr( "impossible d executer la methode ") + monType.methodeCalculTaille ) + QMessageBox.critical( self, tr("Mauvaise execution "),tr( "impossible d executer la methode ") + self.monType.methodeCalculTaille ) return else : self.nbLigs=self.monType.nbLigs @@ -244,6 +248,20 @@ class MonWidgetMatriceOT (MonWidgetMatrice): self.TBMatrice.setVerticalHeaderLabels(header) self.TBMatrice.setHorizontalHeaderLabels(header) + def nbDeVariables(self): + # uniquement pour OT + jdc=self.node.item.object.jdc + etape=self.node.item.object.etape + self.listeVariables=jdc.getVariables(etape) + if self.listeVariables == [] : + QMessageBox.critical( self, tr("Mauvaise Commande "),tr( "Aucune variable connue. Entrez les variables avant la matrice")) + return + self.TBMatrice.setColumnCount(len(self.listeVariables)) + self.TBMatrice.setRowCount(len(self.listeVariables)) + self.nbLigs=len(self.listeVariables) + self.nbCols=len(self.listeVariables) + + def initialValeur(self): # uniquement pour OT liste=self.node.item.getValeur() diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index 32896393..b6d04c95 100755 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -29,7 +29,7 @@ import os, sys from PyQt5.QtWidgets import QApplication, QMainWindow, QGridLayout, QBoxLayout, QMenu, QAction, QMessageBox -from PyQt5.QtGui import QIcon +from PyQt5.QtGui import QIcon, QFont from PyQt5.QtCore import Qt, QSize @@ -60,6 +60,9 @@ class Appli(AppliSsIhm,Ui_Eficas,QMainWindow): QMainWindow.__init__(self,parent) Ui_Eficas.__init__(self) + maPolice= QFont("Times", 52) + self.setFont(maPolice) + self.ssIhm=False self.multi=multi self.demande=multi # voir PSEN diff --git a/Noyau/.context.py.swp b/Noyau/.context.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..1a3e2cfcd071df1f14e7aedd57b660a710f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Rc@&Q!o`NCYFhY85r%GEF)P z8Q4>_5!@2JS^=!T chgt pour Vimmp for v in self.valeur : - print (v, type(v)) - v.ajoutUtilisePar(self) - #try : v.ajoutUtilisePar(self) - #except : print ('il y a un souci ici', self.nom, self.valeur) + try : v.ajoutUtilisePar(self) + except : print ('il y a un souci ici', self.nom, self.valeur) self.buildObjPyxb() self.listeNomsObjsCrees = [] diff --git a/Noyau/N_MCSIMP.py.pn b/Noyau/N_MCSIMP.py.pn new file mode 100644 index 00000000..3e2c24bb --- /dev/null +++ b/Noyau/N_MCSIMP.py.pn @@ -0,0 +1,350 @@ +# coding=utf-8 +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com + + +""" + Ce module contient la classe MCSIMP qui sert à controler la valeur + d'un mot-clé simple par rapport à sa définition portée par un objet + de type ENTITE +""" + +from __future__ import absolute_import +from copy import copy + +from Noyau.N_ASSD import ASSD +from Noyau.N_UserASSDMultiple import UserASSDMultiple +from Noyau.N_CO import CO +from . import N_OBJECT +from .N_CONVERT import ConversionFactory +from .N_types import forceList, isSequence + + +class MCSIMP(N_OBJECT.OBJECT): + + """ + """ + nature = 'MCSIMP' + + def __init__(self, val, definition, nom, parent,objPyxbDeConstruction): + """ + Attributs : + + - val : valeur du mot clé simple + - definition + - nom + - parent + + Autres attributs : + + - valeur : valeur du mot-clé simple en tenant compte de la valeur par défaut + + """ + self.definition = definition + self.nom = nom + self.val = val + self.parent = parent + self.objPyxbDeConstruction = objPyxbDeConstruction + if parent: + self.jdc = self.parent.jdc + if self.jdc : self.cata = self.jdc.cata + else : self.cata = None + self.niveau = self.parent.niveau + self.etape = self.parent.etape + else: + # Le mot cle simple a été créé sans parent + # est-ce possible ? + self.jdc = None + self.cata = None + self.niveau = None + self.etape = None + if self.definition.creeDesObjets : + if issubclass(self.definition.creeDesObjetsDeType, UserASSDMultiple) : + self.convProto = ConversionFactory('UserASSDMultiple', self.definition.creeDesObjetsDeType) + else : + self.convProto = ConversionFactory('UserASSD', self.definition.creeDesObjetsDeType) + else : + self.convProto = ConversionFactory('type', typ=self.definition.type) + self.valeur = self.getValeurEffective(self.val) + if self.definition.utiliseUneReference : + if self.valeur != None: + if not type(self.valeur) in (list, tuple): self.valeur.ajoutUtilisePar(self) + else : + #PNPN --> chgt pour Vimmp + for v in self.valeur : + try : v.ajoutUtilisePar(self) + except : print ('il y a un souci ici', self.nom, self.valeur) + self.buildObjPyxb() + self.listeNomsObjsCrees = [] + + def getValeurEffective(self, val): + """ + Retourne la valeur effective du mot-clé en fonction + de la valeur donnée. Defaut si val == None + Attention aux UserASSD et aux into (exple Wall gp de maille et 'Wall') + """ + #print ('getValeurEffective ________________', val) + if (val is None and hasattr(self.definition, 'defaut')): val = self.definition.defaut + if self.definition.type[0] == 'TXM' and isinstance(val,str) : return val + if self.definition.creeDesObjets : + # isinstance(val, self.definition.creeDesObjetsDeType) ne fonctionne pas car il y a un avec cata devant et l autre non + if val == None : return val + if not isinstance(val,(list,tuple)) : valATraiter=[val,] + else : valATraiter=val + listeRetour=[] + for v in valATraiter: + #print (v.__class__.__name__, self.definition.creeDesObjetsDeType.__name__) + if (not(v.__class__.__name__ == self.definition.creeDesObjetsDeType.__name__)) : + if self.jdc != None and v in list(self.jdc.sdsDict.keys()): v=self.jdc.sdsDict[v] + else : v=self.convProto.convert(v) + if v.parent== None : v.initialiseParent(self) + if issubclass(self.definition.creeDesObjetsDeType, UserASSDMultiple) : + v.ajouteUnPere(self) + else : + if v.nom=='sansNom' : + for leNom,laVariable in self.jdc.g_context.items(): + if id(laVariable)== id(v) and (leNom != 'sansNom'): + v.initialiseNom(leNom) + if v.parent== None : v.initialiseParent(self) + if issubclass(self.definition.creeDesObjetsDeType, UserASSDMultiple) : + v.ajouteUnPere(self) + listeRetour.append(v) + if isinstance(val,(list,tuple)) :newVal=listeRetour + else : newVal=listeRetour[0] + return newVal + if self.convProto: + val = self.convProto.convert(val) + return val + + def creeUserASSDetSetValeur(self, val): + self.state='changed' + nomVal=val + if nomVal in self.jdc.sdsDict.keys(): + if isinstance(self.jdc.sdsDict[nomVal],self.definition.creeDesObjetsDeType): + if issubclass(self.definition.creeDesObjetsDeType, UserASSDMultiple) : + p=self.parent + while p in self.parent : + if hasattr(p, 'listeDesReferencesCrees') : p.listeDesReferencesCrees.append(self.jdc.sdsDict[nomVal]) + else : p.listeDesReferencesCrees=[self.jdc.sdsDict[nomVal],] + p=p.parent + self.jdc.sdsDict[nomVal].ajouteUnPere(self) + #return (1, 'reference ajoutee') + else : + return (0, 'concept non multiple deja reference') + else : return (0, 'concept d un autre type existe deja') + if self.convProto: + objVal = self.convProto.convert(nomVal) + objVal.initialiseNom(nomVal) + if objVal.parent== None : objVal.initialiseParent(self) + objVal.ajouteUnPere(self) + p=self.parent + while p in self.parent : + if hasattr(p, 'listeDesReferencesCrees') : p.listeDesReferencesCrees.append(objVal) + else : p.listeDesReferencesCrees=[objVal,] + p=p.parent + return (self.setValeur(objVal), 'reference creee') + + def creeUserASSD(self, val): + self.state='changed' + nomVal=val + if nomVal in self.jdc.sdsDict.keys(): + if isinstance(self.jdc.sdsDict[nomVal],self.definition.creeDesObjetsDeType): + if issubclass(self.definition.creeDesObjetsDeType, UserASSDMultiple) : + p=self.parent + while p in self.parent : + if hasattr(p, 'listeDesReferencesCrees') : p.listeDesReferencesCrees.append(self.jdc.sdsDict[nomVal]) + else : p.listeDesReferencesCrees=[self.jdc.sdsDict[nomVal],] + p=p.parent + self.jdc.sdsDict[nomVal].ajouteUnPere(self) + return (1,self.jdc.sdsDict[nomVal], 'reference ajoutee') + else : return (0, None, 'concept d un autre type existe deja') + else : return (0, None, 'concept d un autre type existe deja') + if self.convProto: + objVal = self.convProto.convert(nomVal) + objVal.initialiseNom(nomVal) + objVal.ajouteUnPere(self) + return (1, objVal, 'reference creee') + + def rattacheUserASSD(self, objASSD): + if objASSD.parent== None : objASSD.initialiseParent(self) + p=self.parent + while p in self.parent : + if hasattr(p, 'listeDesReferencesCrees') : p.listeDesReferencesCrees.append(objASSD) + else : p.listeDesReferencesCrees=[objASSD,] + p=p.parent + + + def getValeur(self): + """ + Retourne la "valeur" d'un mot-clé simple. + Cette valeur est utilisée lors de la création d'un contexte + d'évaluation d'expressions à l'aide d'un interpréteur Python + """ + v = self.valeur + # Si singleton et max=1, on retourne la valeur. + # Si une valeur simple et max='**', on retourne un singleton. + # (si liste de longueur > 1 et max=1, on sera arrêté plus tard) + # Pour accepter les numpy.array, on remplace : "type(v) not in (list, tuple)" + # par "not has_attr(v, '__iter__')". + if v is None: + pass + elif isSequence(v) and len(v) == 1 and self.definition.max == 1: + v = v[0] + elif not isSequence(v) and self.definition.max != 1: + v = (v, ) + # traitement particulier pour les complexes ('RI', r, i) + if 'C' in self.definition.type and self.definition.max != 1 and v != None and v[0] in ('RI', 'MP'): + v = (v, ) + return v + + def getVal(self): + """ + Une autre méthode qui retourne une "autre" valeur du mot clé simple. + Elle est utilisée par la méthode getMocle + """ + return self.valeur + + def accept(self, visitor): + """ + Cette methode permet de parcourir l'arborescence des objets + en utilisant le pattern VISITEUR + """ + visitor.visitMCSIMP(self) + + def copy(self): + """ Retourne une copie de self """ + objet = self.makeobjet() + # il faut copier les listes et les tuples mais pas les autres valeurs + # possibles (réel,SD,...) + if type(self.valeur) in (list, tuple): + objet.valeur = copy(self.valeur) + else: + objet.valeur = self.valeur + objet.val = objet.valeur + return objet + + def makeobjet(self): + return self.definition(val=None, nom=self.nom, parent=self.parent) + + def reparent(self, parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent = parent + self.jdc = parent.jdc + self.etape = parent.etape + + def getSd_utilisees(self): + """ + Retourne une liste qui contient la ou les SD utilisée par self si c'est le cas + ou alors une liste vide + """ + l = [] + if isinstance(self.valeur, ASSD): + l.append(self.valeur) + elif type(self.valeur) in (list, tuple): + for val in self.valeur: + if isinstance(val, ASSD): + l.append(val) + return l + + def getSd_mcs_utilisees(self): + """ + Retourne la ou les SD utilisée par self sous forme d'un dictionnaire : + - Si aucune sd n'est utilisée, le dictionnaire est vide. + - Sinon, la clé du dictionnaire est le mot-clé simple ; la valeur est + la liste des sd attenante. + + Exemple :: + { 'VALE_F': [ , + ] } + """ + l = self.getSd_utilisees() + dico = {} + if len(l) > 0: + dico[self.nom] = l + return dico + + + def getMcsWithCo(self, co): + """ + Cette methode retourne l'objet MCSIMP self s'il a le concept co + comme valeur. + """ + if co in forceList(self.valeur): + return [self, ] + return [] + + def getAllCo(self): + """ + Cette methode retourne la liste de tous les concepts co + associés au mot cle simple + """ + return [co for co in forceList(self.valeur) + if isinstance(co, CO) and co.isTypCO()] + + def supprime(self): + if not type(self.valeur) in (list, tuple): lesValeurs=(self.valeur,) + else : lesValeurs=self.valeur + if self.valeur == None or self.valeur == [] : lesValeurs=[] + for val in lesValeurs: + if self.definition.creeDesObjets : val.deleteReference(self) + else : + if (hasattr (val, 'enleveUtilisePar')) : val.enleveUtilisePar(self) + N_OBJECT.OBJECT.supprime(self) + + def getUserAssdPossible(self): + classeAChercher = self.definition.type + l=[] + dicoValeurs={} + d={} + if self.definition.filtreVariables != None : + for (nomMC, Xpath) in self.definition.filtreVariables : + # print (nomMC, Xpath) + if Xpath == None : dicoValeurs[nomMC] = getattr(self,nomMC) + else : + try: #if 1 : + pereMC=eval(Xpath) + if pereMC : + exp=Xpath+'.getChild("'+nomMC+'")' + leMotCle=eval(exp) + else : leMotCle=None + if leMotCle : + if leMotCle.val : dicoValeurs[nomMC]=leMotCle.val + elif leMotCle.definition.max != 1 : dicoValeurs[nomMC] = [] + else : dicoValeurs[nomMC] = None + else : + #PN PN est-ce sur ? sinon quoi None ou [] + # je pense que les 2 valeurs doivent être renseignees si le filtre depend de 2 valeurs + return l + except: + return l + + + for k,v in self.parent.jdc.sdsDict.items(): + if (isinstance(v, classeAChercher)) : + if self.definition.filtreExpression : + try : + if v.executeExpression(self.definition.filtreExpression ,dicoValeurs) : l.append(v) + except : + print ('il faut comprendre except pour', self.nom) + #print (self.nom) + #print (self.parent.nom) + #print (k,v) + else : l.append(v) + return l diff --git a/Noyau/N_TUPLE.py b/Noyau/N_TUPLE.py index d4f9ccbc..a5b656cf 100644 --- a/Noyau/N_TUPLE.py +++ b/Noyau/N_TUPLE.py @@ -20,7 +20,8 @@ class N_Matrice: def __init__(self, nbLigs=None, nbCols=None, methodeCalculTaille=None, formatSortie="ligne", valSup=None, valMin=None, structure=None, typElt='R', - typEltInto=None, listeHeaders=None, coloree=False): + typEltInto=None, listeHeaders=None, coloree=False, + defaut=None): self.nbLigs = nbLigs self.nbCols = nbCols self.methodeCalculTaille = methodeCalculTaille @@ -33,6 +34,7 @@ class N_Matrice: self.typEltInto = typEltInto self.jdc=None self.coloree=coloree + self.defaut=defaut if self.coloree : self.activeCouleur() def __convert__(self, valeur): @@ -85,3 +87,5 @@ class N_Matrice: __repr__ = info __str__ = info +class N_Matrice_Correlation(N_Matrice): + pass diff --git a/Noyau/N_UserASSDMultiple.py b/Noyau/N_UserASSDMultiple.py index d2dc5603..d9471952 100644 --- a/Noyau/N_UserASSDMultiple.py +++ b/Noyau/N_UserASSDMultiple.py @@ -32,7 +32,11 @@ import sys from .N_UserASSD import UserASSD from .N_ASSD import ASSD -from collections import UserList +try: + from collections import UserList +except ImportError: + from UserList import UserList + class UserASSDMultiple(UserASSD): """ Classe de base pour definir des types de structures de donnees definie par diff --git a/Noyau/N__F.py b/Noyau/N__F.py index 07a405d9..57124770 100644 --- a/Noyau/N__F.py +++ b/Noyau/N__F.py @@ -24,9 +24,9 @@ try : except : pass try: - from UserDict import UserDict -except ImportError: from collections import UserDict +except ImportError: + from UserDict import UserDict class _F(UserDict): diff --git a/ReacteurNumerique/cata_RN_EDG_PN.py b/ReacteurNumerique/cata_RN_EDG_PN.py new file mode 100755 index 00000000..fe1126a1 --- /dev/null +++ b/ReacteurNumerique/cata_RN_EDG_PN.py @@ -0,0 +1,385 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2008-2018 EDF R&D +# +# This file is part of SALOME ADAO module +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +import os +from Accas import OPER, BLOC, FACT, SIMP, ASSD, JDC_CATA, VerifTypeTuple, Matrice +from Extensions.i18n import tr +import types +monFichier = os.path.abspath(__file__) + +JdC = JDC_CATA( + code='RN_EDG' +) +VERSION_CATALOGUE = 'V_0' + + +NMIN_ASSEMBLY = 1 +NMAX_ASSEMBLY = 18 + + +class Tuple: + def __init__(self, ntuple): + self.ntuple = ntuple + + def __convert__(self, valeur): + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + +class VerifPostTreatment(VerifTypeTuple): + + def __init__(self): + super(VerifPostTreatment, self).__init__(('TXM', 'TXM')) + self.cata_info = "" + self.physValeurs = ('Neutronics', 'Thermalhydraulics') + self.typeValeurs = ('MED', 'SUM', 'MIN', 'MAX', 'MEAN') + + def info(self): + return tr(": verifie les \ntypes dans un tuple") + + def infoErreurListe(self): + return tr("Les types entres ne sont pas permis") + + def default(self, valeur): + return valeur + + def isList(self): + return 1 + + def convertItem(self, valeur): + if len(valeur) != len(self.typeDesTuples): + raise ValueError( + tr("%s devrait etre de type %s ") % (valeur, self.typeDesTuples)) + ok = self.verifType(valeur) + if ok == 0: + raise ValueError( + tr("%s devrait etre de type %s (%d)") % (valeur, self.typeDesTuples, ok)) + if ok < 0: + raise ValueError( + tr("%s devrait etre dans %s ") % (valeur[1], self.typeValeurs)) + return valeur + + def verifItem(self, valeur): + try: + if len(valeur) != len(self.typeDesTuples): + return 0 + ok = self.verifType(valeur) + if ok != 1: + return 0 + except: + return 0 + return 1 + + def verifType(self, valeur): + ok = 0 + for v in valeur: + if type(v) == bytes or type(v) == str: + ok += 1 + if ok == len(self.typeDesTuples): + if valeur[1] in self.typeValeurs: # and valeur[1] in self.physValeurs: + return 1 + return -1 + return 0 + + def verif(self, valeur): + if type(valeur) in (list, tuple): + liste = list(valeur) + for val in liste: + if self.verifItem(val) != 1: + return 0 + return 1 + return 0 + + +class VerifNeutLib(VerifTypeTuple): + + def __init__(self): + super(VerifNeutLib, self).__init__((myAssembly, 'TXM')) + self.cata_info = "" + + def info(self): + return tr(": verifie les \ntypes dans un tuple") + + def infoErreurListe(self): + return tr("Les types entres ne sont pas permis") + + def default(self, valeur): + return valeur + + def isList(self): + return 1 + + def convertItem(self, valeur): + if len(valeur) != len(self.typeDesTuples): + raise ValueError( + tr("%s devrait etre de type %s ") % (valeur, self.typeDesTuples)) + ok = self.verifType(valeur) + if ok == 0: + raise ValueError( + tr("%s devrait etre de type %s (%d)") % (valeur, self.typeDesTuples, ok)) + return valeur + + def verifItem(self, valeur): + try: + if len(valeur) != len(self.typeDesTuples): + return 0 + ok = self.verifType(valeur) + if ok != 1: + return 0 + except: + return 0 + return 1 + + def verifType(self, valeur): + ok = 0 + a, v = valeur + if isinstance(a, myAssembly): + ok += 1 + if type(v) == bytes or type(v) == str: + ok += 1 + if ok == len(self.typeDesTuples): + return 1 + return 0 + + def verif(self, valeur): + if type(valeur) in (list, tuple): + liste = list(valeur) + for val in liste: + if self.verifItem(val) != 1: + return 0 + return 1 + return 0 + + +class myAssembly(ASSD): + pass + + +class myTechnoData(ASSD): + pass + + +class myRodBank(ASSD): + pass + + +class myModelData(ASSD): + pass + + +class myScenarioData(ASSD): + pass + + +Assembly = OPER(nom='Assembly', sd_prod=myAssembly, + #assembly_name=SIMP(statut='o', typ='TXM'), + assembly_type=SIMP(statut='o', typ='TXM', into=("UOX", "MOX", "REF")), + description=BLOC(condition='assembly_type != "REF"', + assembly_width=SIMP(statut='o', typ='R'), + fuel_density=SIMP(statut='o', typ='R', defaut=0.95), + radial_description=FACT(statut='o', + clad_outer_radius=SIMP(statut='o', typ='R'), + guide_tube_outer_radius=SIMP(statut='o', typ='R'), + fuel_rod_pitch=SIMP(statut='o', typ='R'), + nfuel_rods=SIMP(statut='o', typ='I')), + axial_description=FACT(statut='o', + active_length_start=SIMP(statut='o', typ='R'), + active_length_end=SIMP(statut='o', typ='R')), + grids=FACT(statut='o', + mixing=FACT(statut='o', + positions=SIMP( + statut='f', typ='R', max="**"), + size=SIMP(statut='o', typ='R')), + non_mixing=FACT(statut='o', + positions=SIMP( + statut='f', typ='R', max='**'), + size=SIMP(statut='o', typ='R')), + ) + ) + ) + + +RodBank = OPER(nom="RodBank", sd_prod=myRodBank, + #rodbank_name=SIMP(statut='o', typ='TXM'), + rod_type=SIMP(statut='o', typ='TXM', into=("homogeneous", "heterogeneous")), + description_HOM=BLOC(condition='rod_type == "homogeneous"', + rod_composition=SIMP(statut='o', typ='TXM')), + description_HET=BLOC(condition='rod_type == "heterogeneous"', + bottom_composition=SIMP(statut='o', typ='TXM'), + splitting_heigh=SIMP(statut='o', typ='R'), + upper_composition=SIMP(statut='o', typ='TXM')), + step_height=SIMP(statut='o', typ='R'), + nsteps=SIMP(statut='o', typ='I')) + + +def add_lr_refl(ass_list): + return ["RW"] + ass_list + ["RE"] + + +def add_tb_refl(ass_list): + return ["RS"] + ass_list + ["RN"] + + +def generate_ass_map(nass_list): + xsym_list = [a for a in 'ABCDEFGHJKLNPRSTUVWXYZ'] + xsym_list.reverse() + ysym_list = ["%02d" % i for i in range(NMIN_ASSEMBLY, NMAX_ASSEMBLY+1)] + ysym_list.reverse() + def_xaxis = {} + def_yaxis = {} + for n in range(NMIN_ASSEMBLY, NMAX_ASSEMBLY+1): + def_xaxis[n] = add_lr_refl(xsym_list[-n:]) + def_yaxis[n] = add_tb_refl(ysym_list[-n:]) + + dico = {} + for n in nass_list: + dico['assembly_map_%d' % n] = BLOC(condition="nb_assembly==%d" % n, + xaxis=SIMP(statut='o', + typ='TXM', + min=n+2, max=n+2, + defaut=def_xaxis[n]), + yaxis=SIMP(statut='o', + typ='TXM', + min=n+2, max=n+2, + defaut=def_yaxis[n]), + assembly_map=SIMP(statut="o", + typ=Matrice(nbLigs=n+2, + nbCols=n+2, + typElt=myAssembly, # ici c'est le nom de l'assemblage + listeHeaders=(('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',),('RS','15','14','13','12','11','10','09','08','07','06','05','04','03','02','01','RN',)), + defaut=(n+2)*[(n+2)*['.']], coloree=True), + ), + rod_map=SIMP(statut="o", + typ=Matrice(nbLigs=n+2, + nbCols=n+2, + valSup=1, + valMin=-1, + #typElt=myAssembly, # ici c'est le nom de l'assemblage + typElt='TXM', # ici c'est le nom de l'assemblage + listeHeaders=None), + defaut=(n+2)*[(n+2)*['.']]), + BU_map=SIMP(statut="o", + typ=Matrice(nbLigs=n+2, + nbCols=n+2, + valSup=90000., + valMin=0., + typElt='R', # ici c'est le BU + listeHeaders=None, + coloree=True), + defaut=(n+2)*[(n+2)*['.']])) + + return dico + + +Techno_data = OPER(nom='Techno_data', sd_prod=myTechnoData, + assembly_list=SIMP(statut='o', typ=myAssembly, min=1, max="**"), # à resorber quand on mettra dans la Matrice + rodbank_list=SIMP(statut='o', typ=myRodBank, min=0, max="**"), # idem + radial_description=FACT(statut='o', + nb_assembly=SIMP(statut='o', typ='I', into=list(range(NMIN_ASSEMBLY, NMAX_ASSEMBLY))), + **(generate_ass_map(range(NMIN_ASSEMBLY, NMAX_ASSEMBLY))) + ), # Radial_Description + axial_description=FACT(statut='o', + lower_refl_size=SIMP(statut='o', typ='R'), + upper_refl_size=SIMP(statut='o', typ='R'), + ), + nominal_power=SIMP(statut='o', typ='R'), + Fuel_power_fraction=SIMP(statut='o', typ='R', defaut=0.974), + by_pass=SIMP(statut='o', typ='R', defaut=0.07), + core_volumic_flowrate=SIMP(statut='o', typ='R'), + ) # Techno data + +Model_data = OPER(nom='Model_data', sd_prod=myModelData, + physics=SIMP(statut='o', typ='TXM', into=( + 'Neutronics', 'Thermalhydraulics')), + scale=SIMP(statut='o', typ='TXM', into=( + 'system', 'component', 'local')), + b_neutro_compo=BLOC(condition='physics=="Neutronics" and scale=="component"', + library_map=SIMP(statut='f', typ=Tuple(2), + validators=VerifNeutLib(), + max='**'), + code=SIMP(statut='o', typ='TXM', into=('COCAGNE', 'APOLLO3')), + radial_meshing=FACT(statut='o', + flux_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')), + b_flux_subdivision=BLOC(condition='flux_solver=="subdivision"', + flux_subdivision=SIMP(statut='o', typ='I')), + feedback_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')), + b_feedback_subdivision=BLOC(condition='feedback_solver=="subdivision"', + feedback_subdivision=SIMP(statut='o', typ='I')))), + b_thermo_compo=BLOC(condition='physics=="Thermalhydraulics" and scale=="component"', + code=SIMP(statut='o', typ='TXM', into=('THYC', 'CATHARE3', 'FLICA4')), + radial_meshing=FACT(statut='o', + fluid=SIMP(statut='o', typ='TXM', into=('subdivision', 'subchannel')), + b_fluid_subdivision=BLOC(condition='fluid=="subdivision"', + fluid_subdivision=SIMP(statut='o', typ='I')), + pellet=SIMP(statut='o', typ='I'), + clad=SIMP(statut='o', typ='I')), + ), + b_scale_compo=BLOC(condition='scale=="component"', + axial_meshing=FACT(statut='o', + lower_refl=SIMP(statut='o', typ='I'), + fuel=SIMP(statut='o', typ='I'), + upper_refl=SIMP(statut='o', typ='I'))), + b_scale_local=BLOC(condition='scale=="local"', + mesh_file=SIMP(statut='o', typ='Fichier')), + ) + + +Scenario_data = OPER(nom='Scenario_data', sd_prod=myScenarioData, + initial_power=SIMP(statut='o', typ='R', val_min=0., + defaut=100.), + initial_power_unit=SIMP(statut='o', typ='TXM', + into=('% Nominal power', 'W'), + defaut='% Nominal power'), + initial_core_inlet_temperature=SIMP(statut='o', typ='R', val_min=0., + defaut=280.), + initial_boron_concentration=SIMP(statut='o', typ='R', val_min=0., + defaut=1300.), + initial_inlet_pressure=SIMP(statut='o', typ='R', defaut=160.2), + initial_outlet_pressure=SIMP(statut='o', typ='R', defaut=157.2), + initial_rod_positions=SIMP(statut='o', + typ=Tuple(2), + validators=VerifTypeTuple(['TXM', 'I']), + ang="Type@label, position (e.g. RodBank@RB, 0)", + max='**'), + scenario_type=SIMP(statut='o', + typ='TXM', + into=['RIA']), + b_ria=BLOC(condition='scenario_type=="RIA"', + ejected_rod=SIMP(statut='o', + typ='TXM'), + rod_position_program=SIMP(statut='o', + typ=Tuple(2), + validators=VerifTypeTuple(['R', 'I']), + max='**'), + SCRAM=SIMP(statut='o', typ='TXM', into=("YES", "NO")), + SCRAM_option=BLOC(condition='SCRAM == "YES"', + SCRAM_power=SIMP(statut='o', typ='R'), + complete_SCRAM_time=SIMP(statut='o', typ='R'), + ), + ), + post_processing=SIMP(statut='f', + typ=Tuple(2), + validators=VerifPostTreatment(), + max='**'), + ) diff --git a/ReacteurNumerique/cata_RN_EDG_PN_TraductionV0.py b/ReacteurNumerique/cata_RN_EDG_PN_TraductionV0.py new file mode 100755 index 00000000..24f7bcaa --- /dev/null +++ b/ReacteurNumerique/cata_RN_EDG_PN_TraductionV0.py @@ -0,0 +1,377 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2008-2018 EDF R&D +# +# This file is part of SALOME ADAO module +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +import os +from Accas import OPER, BLOC, FACT, SIMP, ASSD, JDC_CATA, VerifTypeTuple, Matrice, PROC, Tuple +from Extensions.i18n import tr +import types +monFichier = os.path.abspath(__file__) + +JdC = JDC_CATA( + code='RN_EDG' +) +VERSION_CATALOGUE = 'V_0' + + +NMIN_ASSEMBLY = 1 +NMAX_ASSEMBLY = 18 + + + +class VerifPostTreatment(VerifTypeTuple): + + def __init__(self): + super(VerifPostTreatment, self).__init__(('TXM', 'TXM')) + self.cata_info = "" + self.physValeurs = ('Neutronics', 'Thermalhydraulics') + self.typeValeurs = ('MED', 'SUM', 'MIN', 'MAX', 'MEAN') + + def info(self): + return tr(": verifie les \ntypes dans un tuple") + + def infoErreurListe(self): + return tr("Les types entres ne sont pas permis") + + def default(self, valeur): + return valeur + + def isList(self): + return 1 + + def convertItem(self, valeur): + if len(valeur) != len(self.typeDesTuples): + raise ValueError( + tr("%s devrait etre de type %s ") % (valeur, self.typeDesTuples)) + ok = self.verifType(valeur) + if ok == 0: + raise ValueError( + tr("%s devrait etre de type %s (%d)") % (valeur, self.typeDesTuples, ok)) + if ok < 0: + raise ValueError( + tr("%s devrait etre dans %s ") % (valeur[1], self.typeValeurs)) + return valeur + + def verifItem(self, valeur): + try: + if len(valeur) != len(self.typeDesTuples): + return 0 + ok = self.verifType(valeur) + if ok != 1: + return 0 + except: + return 0 + return 1 + + def verifType(self, valeur): + ok = 0 + for v in valeur: + if type(v) == bytes or type(v) == str: + ok += 1 + if ok == len(self.typeDesTuples): + if valeur[1] in self.typeValeurs: # and valeur[1] in self.physValeurs: + return 1 + return -1 + return 0 + + def verif(self, valeur): + if type(valeur) in (list, tuple): + liste = list(valeur) + for val in liste: + if self.verifItem(val) != 1: + return 0 + return 1 + return 0 + + +class VerifNeutLib(VerifTypeTuple): + + def __init__(self): + super(VerifNeutLib, self).__init__((myAssembly, 'TXM')) + self.cata_info = "" + + def info(self): + return tr(": verifie les \ntypes dans un tuple") + + def infoErreurListe(self): + return tr("Les types entres ne sont pas permis") + + def default(self, valeur): + return valeur + + def isList(self): + return 1 + + def convertItem(self, valeur): + if len(valeur) != len(self.typeDesTuples): + raise ValueError( + tr("%s devrait etre de type %s ") % (valeur, self.typeDesTuples)) + ok = self.verifType(valeur) + if ok == 0: + raise ValueError( + tr("%s devrait etre de type %s (%d)") % (valeur, self.typeDesTuples, ok)) + return valeur + + def verifItem(self, valeur): + try: + if len(valeur) != len(self.typeDesTuples): + return 0 + ok = self.verifType(valeur) + if ok != 1: + return 0 + except: + return 0 + return 1 + + def verifType(self, valeur): + ok = 0 + a, v = valeur + if isinstance(a, myAssembly): + ok += 1 + if type(v) == bytes or type(v) == str: + ok += 1 + if ok == len(self.typeDesTuples): + return 1 + return 0 + + def verif(self, valeur): + if type(valeur) in (list, tuple): + liste = list(valeur) + for val in liste: + if self.verifItem(val) != 1: + return 0 + return 1 + return 0 + + +class myAssembly(ASSD): + pass + + +class myTechnoData(ASSD): + pass + + +class myRodBank(ASSD): + pass + + +class myModelData(ASSD): + pass + + +class myScenarioData(ASSD): + pass + + +Assembly = OPER(nom='Assembly', sd_prod=myAssembly, + #assembly_name=SIMP(statut='o', typ='TXM'), + assembly_type=SIMP(statut='o', typ='TXM', into=("UOX", "MOX", "REF")), + description=BLOC(condition='assembly_type != "REF"', + assembly_width=SIMP(statut='o', typ='R'), + fuel_density=SIMP(statut='o', typ='R', defaut=0.95), + radial_description=FACT(statut='o', + clad_outer_radius=SIMP(statut='o', typ='R'), + guide_tube_outer_radius=SIMP(statut='o', typ='R'), + fuel_rod_pitch=SIMP(statut='o', typ='R'), + nfuel_rods=SIMP(statut='o', typ='I')), + axial_description=FACT(statut='o', + active_length_start=SIMP(statut='o', typ='R'), + active_length_end=SIMP(statut='o', typ='R')), + grids=FACT(statut='o', + mixing=FACT(statut='o', + positions=SIMP( + statut='f', typ='R', max="**"), + size=SIMP(statut='o', typ='R')), + non_mixing=FACT(statut='o', + positions=SIMP( + statut='f', typ='R', max='**'), + size=SIMP(statut='o', typ='R')), + ) + ) + ) + + +RodBank = OPER(nom="RodBank", sd_prod=myRodBank, + #rodbank_name=SIMP(statut='o', typ='TXM'), + rod_type=SIMP(statut='o', typ='TXM', into=("homogeneous", "heterogeneous")), + description_HOM=BLOC(condition='rod_type == "homogeneous"', + rod_composition=SIMP(statut='o', typ='TXM')), + description_HET=BLOC(condition='rod_type == "heterogeneous"', + bottom_composition=SIMP(statut='o', typ='TXM'), + splitting_heigh=SIMP(statut='o', typ='R'), + upper_composition=SIMP(statut='o', typ='TXM')), + step_height=SIMP(statut='o', typ='R'), + nsteps=SIMP(statut='o', typ='I')) + + +def add_lr_refl(ass_list): + return ["RW"] + ass_list + ["RE"] + + +def add_tb_refl(ass_list): + return ["RS"] + ass_list + ["RN"] + + +def generate_ass_map(nass_list): + xsym_list = [a for a in 'ABCDEFGHJKLNPRSTUVWXYZ'] + xsym_list.reverse() + ysym_list = ["%02d" % i for i in range(NMIN_ASSEMBLY, NMAX_ASSEMBLY+1)] + ysym_list.reverse() + def_xaxis = {} + def_yaxis = {} + for n in range(NMIN_ASSEMBLY, NMAX_ASSEMBLY+1): + def_xaxis[n] = add_lr_refl(xsym_list[-n:]) + def_yaxis[n] = add_tb_refl(ysym_list[-n:]) + + dico = {} + for n in nass_list: + dico['assembly_map_%d' % n] = BLOC(condition="nb_assembly==%d" % n, + xaxis=SIMP(statut='o', + typ='TXM', + min=n+2, max=n+2, + defaut=def_xaxis[n]), + yaxis=SIMP(statut='o', + typ='TXM', + min=n+2, max=n+2, + defaut=def_yaxis[n]), + assembly_map=SIMP(statut="o", + typ=Matrice(nbLigs=n+2, + nbCols=n+2, + typElt=myAssembly, # ici c'est le nom de l'assemblage + listeHeaders=(('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',),('RS','15','14','13','12','11','10','09','08','07','06','05','04','03','02','01','RN',)), + defaut=(n+2)*[(n+2)*['.']], coloree=True), + ), + rod_map=SIMP(statut="o", + typ=Matrice(nbLigs=n+2, + nbCols=n+2, + valSup=1, + valMin=-1, + #typElt=myAssembly, # ici c'est le nom de l'assemblage + typElt='TXM', # ici c'est le nom de l'assemblage + listeHeaders=None), + defaut=(n+2)*[(n+2)*['.']]), + BU_map=SIMP(statut="o", + typ=Matrice(nbLigs=n+2, + nbCols=n+2, + valSup=90000., + valMin=0., + typElt='R', # ici c'est le BU + listeHeaders=None, + coloree=True), + defaut=(n+2)*[(n+2)*['.']])) + + return dico + + +Techno_data = OPER(nom='Techno_data', sd_prod=myTechnoData, + assembly_list=SIMP(statut='o', typ=myAssembly, min=1, max="**"), # à resorber quand on mettra dans la Matrice + rodbank_list=SIMP(statut='o', typ=myRodBank, min=0, max="**"), # idem + radial_description=FACT(statut='o', + nb_assembly=SIMP(statut='o', typ='I', into=list(range(NMIN_ASSEMBLY, NMAX_ASSEMBLY))), + **(generate_ass_map(range(NMIN_ASSEMBLY, NMAX_ASSEMBLY))) + ), # Radial_Description + axial_description=FACT(statut='o', + lower_refl_size=SIMP(statut='o', typ='R'), + upper_refl_size=SIMP(statut='o', typ='R'), + ), + nominal_power=SIMP(statut='o', typ='R'), + Fuel_power_fraction=SIMP(statut='o', typ='R', defaut=0.974), + by_pass=SIMP(statut='o', typ='R', defaut=0.07), + core_volumic_flowrate=SIMP(statut='o', typ='R'), + ) # Techno data + +Model_data = OPER(nom='Model_data', sd_prod=myModelData, + physics=SIMP(statut='o', typ='TXM', into=( + 'Neutronics', 'Thermalhydraulics')), + scale=SIMP(statut='o', typ='TXM', into=( + 'system', 'component', 'local')), + b_neutro_compo=BLOC(condition='physics=="Neutronics" and scale=="component"', + library_map=SIMP(statut='f', typ=Tuple(2), + validators=VerifNeutLib(), + max='**'), + code=SIMP(statut='o', typ='TXM', into=('COCAGNE', 'APOLLO3')), + radial_meshing=FACT(statut='o', + flux_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')), + b_flux_subdivision=BLOC(condition='flux_solver=="subdivision"', + flux_subdivision=SIMP(statut='o', typ='I')), + feedback_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')), + b_feedback_subdivision=BLOC(condition='feedback_solver=="subdivision"', + feedback_subdivision=SIMP(statut='o', typ='I')))), + b_thermo_compo=BLOC(condition='physics=="Thermalhydraulics" and scale=="component"', + code=SIMP(statut='o', typ='TXM', into=('THYC', 'CATHARE3', 'FLICA4')), + radial_meshing=FACT(statut='o', + fluid=SIMP(statut='o', typ='TXM', into=('subdivision', 'subchannel')), + b_fluid_subdivision=BLOC(condition='fluid=="subdivision"', + fluid_subdivision=SIMP(statut='o', typ='I')), + pellet=SIMP(statut='o', typ='I'), + clad=SIMP(statut='o', typ='I')), + ), + b_scale_compo=BLOC(condition='scale=="component"', + axial_meshing=FACT(statut='o', + lower_refl=SIMP(statut='o', typ='I'), + fuel=SIMP(statut='o', typ='I'), + upper_refl=SIMP(statut='o', typ='I'))), + b_scale_local=BLOC(condition='scale=="local"', + mesh_file=SIMP(statut='o', typ='Fichier')), + ) + + +Scenario_data = OPER(nom='Scenario_data', sd_prod=myScenarioData, + initial_power=SIMP(statut='o', typ='R', val_min=0., + defaut=100.), + initial_power_unit=SIMP(statut='o', typ='TXM', + into=('% Nominal power', 'W'), + defaut='% Nominal power'), + initial_core_inlet_temperature=SIMP(statut='o', typ='R', val_min=0., + defaut=280.), + initial_boron_concentration=SIMP(statut='o', typ='R', val_min=0., + defaut=1300.), + initial_inlet_pressure=SIMP(statut='o', typ='R', defaut=160.2), + initial_outlet_pressure=SIMP(statut='o', typ='R', defaut=157.2), + initial_rod_positions=SIMP(statut='o', + typ=Tuple(2), + validators=VerifTypeTuple(['TXM', 'I']), + ang="Type@label, position (e.g. RodBank@RB, 0)", + max='**'), + scenario_type=SIMP(statut='o', + typ='TXM', + into=['RIA']), + b_ria=BLOC(condition='scenario_type=="RIA"', + ejected_rod=SIMP(statut='o', + typ='TXM'), + rod_position_program=SIMP(statut='o', + typ=Tuple(2), + validators=VerifTypeTuple(['R', 'I']), + max='**'), + SCRAM=SIMP(statut='o', typ='TXM', into=("YES", "NO")), + SCRAM_option=BLOC(condition='SCRAM == "YES"', + SCRAM_power=SIMP(statut='o', typ='R'), + complete_SCRAM_time=SIMP(statut='o', typ='R'), + ), + ), + post_processing=SIMP(statut='f', + typ=Tuple(2), + validators=VerifPostTreatment(), + max='**'), + ) +Genere_Une_Erreur_Traduction = PROC(nom='Genere_Une_Erreur_Traduction', + essai=SIMP(statut='o', typ='TXM'), +) + diff --git a/ReacteurNumerique/cata_RN_EDG_PN_UQ.py b/ReacteurNumerique/cata_RN_EDG_PN_UQ.py new file mode 100755 index 00000000..fe1126a1 --- /dev/null +++ b/ReacteurNumerique/cata_RN_EDG_PN_UQ.py @@ -0,0 +1,385 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2008-2018 EDF R&D +# +# This file is part of SALOME ADAO module +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +import os +from Accas import OPER, BLOC, FACT, SIMP, ASSD, JDC_CATA, VerifTypeTuple, Matrice +from Extensions.i18n import tr +import types +monFichier = os.path.abspath(__file__) + +JdC = JDC_CATA( + code='RN_EDG' +) +VERSION_CATALOGUE = 'V_0' + + +NMIN_ASSEMBLY = 1 +NMAX_ASSEMBLY = 18 + + +class Tuple: + def __init__(self, ntuple): + self.ntuple = ntuple + + def __convert__(self, valeur): + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + +class VerifPostTreatment(VerifTypeTuple): + + def __init__(self): + super(VerifPostTreatment, self).__init__(('TXM', 'TXM')) + self.cata_info = "" + self.physValeurs = ('Neutronics', 'Thermalhydraulics') + self.typeValeurs = ('MED', 'SUM', 'MIN', 'MAX', 'MEAN') + + def info(self): + return tr(": verifie les \ntypes dans un tuple") + + def infoErreurListe(self): + return tr("Les types entres ne sont pas permis") + + def default(self, valeur): + return valeur + + def isList(self): + return 1 + + def convertItem(self, valeur): + if len(valeur) != len(self.typeDesTuples): + raise ValueError( + tr("%s devrait etre de type %s ") % (valeur, self.typeDesTuples)) + ok = self.verifType(valeur) + if ok == 0: + raise ValueError( + tr("%s devrait etre de type %s (%d)") % (valeur, self.typeDesTuples, ok)) + if ok < 0: + raise ValueError( + tr("%s devrait etre dans %s ") % (valeur[1], self.typeValeurs)) + return valeur + + def verifItem(self, valeur): + try: + if len(valeur) != len(self.typeDesTuples): + return 0 + ok = self.verifType(valeur) + if ok != 1: + return 0 + except: + return 0 + return 1 + + def verifType(self, valeur): + ok = 0 + for v in valeur: + if type(v) == bytes or type(v) == str: + ok += 1 + if ok == len(self.typeDesTuples): + if valeur[1] in self.typeValeurs: # and valeur[1] in self.physValeurs: + return 1 + return -1 + return 0 + + def verif(self, valeur): + if type(valeur) in (list, tuple): + liste = list(valeur) + for val in liste: + if self.verifItem(val) != 1: + return 0 + return 1 + return 0 + + +class VerifNeutLib(VerifTypeTuple): + + def __init__(self): + super(VerifNeutLib, self).__init__((myAssembly, 'TXM')) + self.cata_info = "" + + def info(self): + return tr(": verifie les \ntypes dans un tuple") + + def infoErreurListe(self): + return tr("Les types entres ne sont pas permis") + + def default(self, valeur): + return valeur + + def isList(self): + return 1 + + def convertItem(self, valeur): + if len(valeur) != len(self.typeDesTuples): + raise ValueError( + tr("%s devrait etre de type %s ") % (valeur, self.typeDesTuples)) + ok = self.verifType(valeur) + if ok == 0: + raise ValueError( + tr("%s devrait etre de type %s (%d)") % (valeur, self.typeDesTuples, ok)) + return valeur + + def verifItem(self, valeur): + try: + if len(valeur) != len(self.typeDesTuples): + return 0 + ok = self.verifType(valeur) + if ok != 1: + return 0 + except: + return 0 + return 1 + + def verifType(self, valeur): + ok = 0 + a, v = valeur + if isinstance(a, myAssembly): + ok += 1 + if type(v) == bytes or type(v) == str: + ok += 1 + if ok == len(self.typeDesTuples): + return 1 + return 0 + + def verif(self, valeur): + if type(valeur) in (list, tuple): + liste = list(valeur) + for val in liste: + if self.verifItem(val) != 1: + return 0 + return 1 + return 0 + + +class myAssembly(ASSD): + pass + + +class myTechnoData(ASSD): + pass + + +class myRodBank(ASSD): + pass + + +class myModelData(ASSD): + pass + + +class myScenarioData(ASSD): + pass + + +Assembly = OPER(nom='Assembly', sd_prod=myAssembly, + #assembly_name=SIMP(statut='o', typ='TXM'), + assembly_type=SIMP(statut='o', typ='TXM', into=("UOX", "MOX", "REF")), + description=BLOC(condition='assembly_type != "REF"', + assembly_width=SIMP(statut='o', typ='R'), + fuel_density=SIMP(statut='o', typ='R', defaut=0.95), + radial_description=FACT(statut='o', + clad_outer_radius=SIMP(statut='o', typ='R'), + guide_tube_outer_radius=SIMP(statut='o', typ='R'), + fuel_rod_pitch=SIMP(statut='o', typ='R'), + nfuel_rods=SIMP(statut='o', typ='I')), + axial_description=FACT(statut='o', + active_length_start=SIMP(statut='o', typ='R'), + active_length_end=SIMP(statut='o', typ='R')), + grids=FACT(statut='o', + mixing=FACT(statut='o', + positions=SIMP( + statut='f', typ='R', max="**"), + size=SIMP(statut='o', typ='R')), + non_mixing=FACT(statut='o', + positions=SIMP( + statut='f', typ='R', max='**'), + size=SIMP(statut='o', typ='R')), + ) + ) + ) + + +RodBank = OPER(nom="RodBank", sd_prod=myRodBank, + #rodbank_name=SIMP(statut='o', typ='TXM'), + rod_type=SIMP(statut='o', typ='TXM', into=("homogeneous", "heterogeneous")), + description_HOM=BLOC(condition='rod_type == "homogeneous"', + rod_composition=SIMP(statut='o', typ='TXM')), + description_HET=BLOC(condition='rod_type == "heterogeneous"', + bottom_composition=SIMP(statut='o', typ='TXM'), + splitting_heigh=SIMP(statut='o', typ='R'), + upper_composition=SIMP(statut='o', typ='TXM')), + step_height=SIMP(statut='o', typ='R'), + nsteps=SIMP(statut='o', typ='I')) + + +def add_lr_refl(ass_list): + return ["RW"] + ass_list + ["RE"] + + +def add_tb_refl(ass_list): + return ["RS"] + ass_list + ["RN"] + + +def generate_ass_map(nass_list): + xsym_list = [a for a in 'ABCDEFGHJKLNPRSTUVWXYZ'] + xsym_list.reverse() + ysym_list = ["%02d" % i for i in range(NMIN_ASSEMBLY, NMAX_ASSEMBLY+1)] + ysym_list.reverse() + def_xaxis = {} + def_yaxis = {} + for n in range(NMIN_ASSEMBLY, NMAX_ASSEMBLY+1): + def_xaxis[n] = add_lr_refl(xsym_list[-n:]) + def_yaxis[n] = add_tb_refl(ysym_list[-n:]) + + dico = {} + for n in nass_list: + dico['assembly_map_%d' % n] = BLOC(condition="nb_assembly==%d" % n, + xaxis=SIMP(statut='o', + typ='TXM', + min=n+2, max=n+2, + defaut=def_xaxis[n]), + yaxis=SIMP(statut='o', + typ='TXM', + min=n+2, max=n+2, + defaut=def_yaxis[n]), + assembly_map=SIMP(statut="o", + typ=Matrice(nbLigs=n+2, + nbCols=n+2, + typElt=myAssembly, # ici c'est le nom de l'assemblage + listeHeaders=(('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',),('RS','15','14','13','12','11','10','09','08','07','06','05','04','03','02','01','RN',)), + defaut=(n+2)*[(n+2)*['.']], coloree=True), + ), + rod_map=SIMP(statut="o", + typ=Matrice(nbLigs=n+2, + nbCols=n+2, + valSup=1, + valMin=-1, + #typElt=myAssembly, # ici c'est le nom de l'assemblage + typElt='TXM', # ici c'est le nom de l'assemblage + listeHeaders=None), + defaut=(n+2)*[(n+2)*['.']]), + BU_map=SIMP(statut="o", + typ=Matrice(nbLigs=n+2, + nbCols=n+2, + valSup=90000., + valMin=0., + typElt='R', # ici c'est le BU + listeHeaders=None, + coloree=True), + defaut=(n+2)*[(n+2)*['.']])) + + return dico + + +Techno_data = OPER(nom='Techno_data', sd_prod=myTechnoData, + assembly_list=SIMP(statut='o', typ=myAssembly, min=1, max="**"), # à resorber quand on mettra dans la Matrice + rodbank_list=SIMP(statut='o', typ=myRodBank, min=0, max="**"), # idem + radial_description=FACT(statut='o', + nb_assembly=SIMP(statut='o', typ='I', into=list(range(NMIN_ASSEMBLY, NMAX_ASSEMBLY))), + **(generate_ass_map(range(NMIN_ASSEMBLY, NMAX_ASSEMBLY))) + ), # Radial_Description + axial_description=FACT(statut='o', + lower_refl_size=SIMP(statut='o', typ='R'), + upper_refl_size=SIMP(statut='o', typ='R'), + ), + nominal_power=SIMP(statut='o', typ='R'), + Fuel_power_fraction=SIMP(statut='o', typ='R', defaut=0.974), + by_pass=SIMP(statut='o', typ='R', defaut=0.07), + core_volumic_flowrate=SIMP(statut='o', typ='R'), + ) # Techno data + +Model_data = OPER(nom='Model_data', sd_prod=myModelData, + physics=SIMP(statut='o', typ='TXM', into=( + 'Neutronics', 'Thermalhydraulics')), + scale=SIMP(statut='o', typ='TXM', into=( + 'system', 'component', 'local')), + b_neutro_compo=BLOC(condition='physics=="Neutronics" and scale=="component"', + library_map=SIMP(statut='f', typ=Tuple(2), + validators=VerifNeutLib(), + max='**'), + code=SIMP(statut='o', typ='TXM', into=('COCAGNE', 'APOLLO3')), + radial_meshing=FACT(statut='o', + flux_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')), + b_flux_subdivision=BLOC(condition='flux_solver=="subdivision"', + flux_subdivision=SIMP(statut='o', typ='I')), + feedback_solver=SIMP(statut='o', typ='TXM', into=('subdivision', 'pin-by-pin')), + b_feedback_subdivision=BLOC(condition='feedback_solver=="subdivision"', + feedback_subdivision=SIMP(statut='o', typ='I')))), + b_thermo_compo=BLOC(condition='physics=="Thermalhydraulics" and scale=="component"', + code=SIMP(statut='o', typ='TXM', into=('THYC', 'CATHARE3', 'FLICA4')), + radial_meshing=FACT(statut='o', + fluid=SIMP(statut='o', typ='TXM', into=('subdivision', 'subchannel')), + b_fluid_subdivision=BLOC(condition='fluid=="subdivision"', + fluid_subdivision=SIMP(statut='o', typ='I')), + pellet=SIMP(statut='o', typ='I'), + clad=SIMP(statut='o', typ='I')), + ), + b_scale_compo=BLOC(condition='scale=="component"', + axial_meshing=FACT(statut='o', + lower_refl=SIMP(statut='o', typ='I'), + fuel=SIMP(statut='o', typ='I'), + upper_refl=SIMP(statut='o', typ='I'))), + b_scale_local=BLOC(condition='scale=="local"', + mesh_file=SIMP(statut='o', typ='Fichier')), + ) + + +Scenario_data = OPER(nom='Scenario_data', sd_prod=myScenarioData, + initial_power=SIMP(statut='o', typ='R', val_min=0., + defaut=100.), + initial_power_unit=SIMP(statut='o', typ='TXM', + into=('% Nominal power', 'W'), + defaut='% Nominal power'), + initial_core_inlet_temperature=SIMP(statut='o', typ='R', val_min=0., + defaut=280.), + initial_boron_concentration=SIMP(statut='o', typ='R', val_min=0., + defaut=1300.), + initial_inlet_pressure=SIMP(statut='o', typ='R', defaut=160.2), + initial_outlet_pressure=SIMP(statut='o', typ='R', defaut=157.2), + initial_rod_positions=SIMP(statut='o', + typ=Tuple(2), + validators=VerifTypeTuple(['TXM', 'I']), + ang="Type@label, position (e.g. RodBank@RB, 0)", + max='**'), + scenario_type=SIMP(statut='o', + typ='TXM', + into=['RIA']), + b_ria=BLOC(condition='scenario_type=="RIA"', + ejected_rod=SIMP(statut='o', + typ='TXM'), + rod_position_program=SIMP(statut='o', + typ=Tuple(2), + validators=VerifTypeTuple(['R', 'I']), + max='**'), + SCRAM=SIMP(statut='o', typ='TXM', into=("YES", "NO")), + SCRAM_option=BLOC(condition='SCRAM == "YES"', + SCRAM_power=SIMP(statut='o', typ='R'), + complete_SCRAM_time=SIMP(statut='o', typ='R'), + ), + ), + post_processing=SIMP(statut='f', + typ=Tuple(2), + validators=VerifPostTreatment(), + max='**'), + ) diff --git a/ReacteurNumerique/edg_REP1300_FULL.comm b/ReacteurNumerique/edg_REP1300_FULL.comm new file mode 100755 index 00000000..55be8503 --- /dev/null +++ b/ReacteurNumerique/edg_REP1300_FULL.comm @@ -0,0 +1,201 @@ + +REF=Assembly(assembly_name='REF', + assembly_type='REF',); + +U1=Assembly(assembly_name='U1', + assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,4.2412,), + size=0.033,),),); + +UGD=Assembly(assembly_name='UGD', + assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,), + size=0.033,),),); + +RB=RodBank(rodbank_name='RB', + rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N1=RodBank(rodbank_name='N1', + rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N2=RodBank(rodbank_name='N2', + rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +G1=RodBank(rodbank_name='G1', + rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +G2=RodBank(rodbank_name='G2', + rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +techno_data=Techno_data(assembly_list=(REF,U1,UGD,), + rodbank_list=(RB,G1,G2,N1,N2,), + radial_description=_F(nb_assembly=15, + xaxis=('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',), + yaxis= + ('RS','15','14','13','12','11', + '10','09','08','07','06','05','04','03','02','01','RN',), + assembly_map= + (['REF','REF','REF','REF', + 'REF','REF','REF','REF','REF','REF','REF','REF','REF', + 'REF','REF','REF','REF'],['REF','REF','REF','REF','REF', + 'U1','U1','U1','U1','U1','U1','U1','REF','REF','REF', + 'REF','REF'],['REF','REF','REF','UGD','U1','UGD','UGD', + 'U1','U1','U1','UGD','UGD','U1','UGD','REF','REF','REF'], + ['REF','REF','UGD','U1','U1','U1','U1','UGD','U1','UGD', + 'U1','U1','U1','U1','UGD','REF','REF'],['REF','REF','U1', + 'U1','U1','UGD','U1','UGD','U1','UGD','U1','UGD','U1', + 'U1','U1','REF','REF'],['REF','U1','UGD','U1','UGD','U1', + 'U1','UGD','U1','UGD','U1','U1','UGD','U1','UGD','U1', + 'REF'],['REF','U1','UGD','U1','U1','U1','UGD','UGD','U1', + 'UGD','UGD','U1','U1','U1','UGD','U1','REF'],['REF','U1', + 'U1','UGD','UGD','UGD','UGD','U1','UGD','U1','UGD','UGD', + 'UGD','UGD','U1','U1','REF'],['REF','U1','U1','U1','U1', + 'U1','U1','UGD','UGD','UGD','U1','U1','U1','U1','U1','U1', + 'REF'],['REF','U1','U1','UGD','UGD','UGD','UGD','U1', + 'UGD','U1','UGD','UGD','UGD','UGD','U1','U1','REF'], + ['REF','U1','UGD','U1','U1','U1','UGD','UGD','U1','UGD', + 'UGD','U1','U1','U1','UGD','U1','REF'],['REF','U1','UGD', + 'U1','UGD','U1','U1','UGD','U1','UGD','U1','U1','UGD', + 'U1','UGD','U1','REF'],['REF','REF','U1','U1','U1','UGD', + 'U1','UGD','U1','UGD','U1','UGD','U1','U1','U1','REF', + 'REF'],['REF','REF','UGD','U1','U1','U1','U1','UGD','U1', + 'UGD','U1','U1','U1','U1','UGD','REF','REF'],['REF','REF', + 'REF','UGD','U1','UGD','UGD','U1','U1','U1','UGD','UGD', + 'U1','UGD','REF','REF','REF'],['REF','REF','REF','REF', + 'REF','U1','U1','U1','U1','U1','U1','U1','REF','REF', + 'REF','REF','REF'],['REF','REF','REF','REF','REF','REF', + 'REF','REF','REF','REF','REF','REF','REF','REF','REF', + 'REF','REF'],), + rod_map= + (['#','#','#','#','#','#','#', + '#','#','#','#','#','#','#','#','#','#'],['#','#','#','#','#','.', + '.','.','.','.','.','.','#','#','#','#','#'],['#','#','#','.','.', + '.','.','.','RB','.','.','.','.','.','#','#','#'],['#','#','.','.', + '.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'],['#','#', + '.','.','N1','.','.','.','G1','.','.','.','N1','.','.','#','#'], + ['#','.','.','G2','.','RB','.','.','.','.','.','RB','.','G2','.', + '.','#'],['#','.','.','.','.','.','.','.','N1','.','.','.','.','.', + '.','.','#'],['#','.','.','N2','.','.','.','.','.','.','.','.','.', + 'N2','.','.','#'],['#','.','RB','.','G1','.','N1','.','RB','.','N1', + '.','G1','.','RB','.','#'],['#','.','.','N2','.','.','.','.','.', + '.','.','.','.','N2','.','.','#'],['#','.','.','.','.','.','.','.', + 'N1','.','.','.','.','.','.','.','#'],['#','.','.','G2','.','RB', + '.','.','.','.','.','RB','.','G2','.','.','#'],['#','#','.','.', + 'N1','.','.','.','G1','.','.','.','N1','.','.','#','#'],['#','#', + '.','.','.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'], + ['#','#','#','.','.','.','.','.','RB','.','.','.','.','.','#','#', + '#'],['#','#','#','#','#','.','.','.','.','.','.','.','#','#','#', + '#','#'],['#','#','#','#','#','#','#','#','#','#','#','#','#','#', + '#','#','#'],), + BU_map= + (['0.','0.','0.','0.','0.','0.', + '0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.'],['0.','0.', + '0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.', + '0.'],['0.','0.','0.','40.','0.','0.','40.','40.','20.','40.','40.', + '0.','0.','40.','0.','0.','0.'],['0.','0.','40.','0.','40.','20.', + '40.','0.','40.','0.','40.','20.','40.','0.','40.','0.','0.'],['0.', + '0.','0.','40.','20.','20.','20.','40.','20.','40.','20.','20.','20.', + '40.','0.','0.','0.'],['0.','0.','0.','20.','20.','20.','40.','0.', + '40.','0.','40.','20.','20.','20.','0.','0.','0.'],['0.','0.','40.', + '40.','20.','40.','20.','40.','20.','40.','20.','40.','20.','40.', + '40.','0.','0.'],['0.','0.','40.','0.','40.','0.','40.','20.','20.', + '20.','40.','0.','40.','0.','40.','0.','0.'],['0.','0.','20.','40.', + '20.','40.','20.','20.','60.','20.','20.','40.','20.','40.','20.', + '0.','0.'],['0.','0.','40.','0.','40.','0.','40.','20.','20.','20.', + '40.','0.','40.','0.','40.','0.','0.'],['0.','0.','40.','40.','20.', + '40.','20.','40.','20.','40.','20.','40.','20.','40.','40.','0.', + '0.'],['0.','0.','0.','20.','20.','20.','40.','0.','40.','0.','40.', + '20.','20.','20.','0.','0.','0.'],['0.','0.','0.','40.','20.','20.', + '20.','40.','20.','40.','20.','20.','20.','40.','0.','0.','0.'],['0.', + '0.','40.','0.','40.','20.','40.','0.','40.','0.','40.','20.','40.', + '0.','40.','0.','0.'],['0.','0.','0.','40.','0.','0.','40.','40.', + '20.','40.','40.','0.','0.','40.','0.','0.','0.'],['0.','0.','0.', + '0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.', + '0.'],['0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.','0.', + '0.','0.','0.','0.','0.'],),), + axial_description=_F(lower_refl_size=0.21, + upper_refl_size=0.21,), + nominal_power=4000000000.0, + Fuel_power_fraction=0.974, + by_pass=0.07, + inlet_pressure=160.2, + outlet_pressure=157.2, + core_volumic_flowrate=90940.0,); + +neutro_model=Model_data(physics='Neutronics', + scale='component', + code='APOLLO3', + radial_meshing=_F(flux_solver='subdivision', + flux_subdivision=2, + feedback_solver='subdivision', + feedback_subdivision=1,), + axial_meshing=_F(lower_refl=2, + fuel=42, + upper_refl=2,),); + +thermo_model=Model_data(physics='Thermalhydraulics', + scale='component', + code='FLICA4', + radial_meshing=_F(fluid='subdivision', + fluid_subdivision=1, + pellet=8, + clad=2,), + axial_meshing=_F(lower_refl=1, + fuel=40, + upper_refl=1,),); + +scenario_data=Scenario_data(initial_power=0.1, + initial_power_unit='% Nominal power', + initial_core_inlet_temperature=290.0, + initial_boron_concentration=1300.0, + initial_rod_positions=(('Rodbank@RB',201),('Rodbank@N1',96),('Rodbank@N2',260),('Rodbank@G1',260),('Rodbank@G2',260),('Rodcluster@H08',260)), + scenario_type='RIA', + ejected_rod='H02', + rod_position_program=((0.0,0),(0.1,260)), + SCRAM='YES', + SCRAM_power=1130.0, + complete_SCRAM_time=1.0, + post_processing=(('Fuel temperature@Thermalhydraulics','MAX'),('Neutronic power@Neutronics','SUM'),('Fuel temperature@Thermalhydraulics','MED'),('Neutronic power@Neutronics','MED')),); +#VERSION_CATALOGUE:V_0:FIN VERSION_CATALOGUE +#CHECKSUM:6732ab23879f88de0b8f989f9a2dbc9d -:FIN CHECKSUM diff --git a/ReacteurNumerique/edg_REP1300_FULL_PN.comm b/ReacteurNumerique/edg_REP1300_FULL_PN.comm new file mode 100755 index 00000000..38b5d3da --- /dev/null +++ b/ReacteurNumerique/edg_REP1300_FULL_PN.comm @@ -0,0 +1,177 @@ + +REF=Assembly(assembly_type='REF',); + +U1=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,4.2412,), + size=0.033,),),); + +UGD=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,), + size=0.033,),),); + +RB=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N1=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N2=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4226, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +G1=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +G2=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +techno_data=Techno_data(assembly_list=(REF,U1,UGD,), + rodbank_list=(RB,G1,G2,N1,N2,), + radial_description=_F(nb_assembly=15, + xaxis=('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',), + yaxis= + ('RS','15','14','13','12','11', + '10','09','08','07','06','05','04','03','02','01','RN',), + assembly_map= + ([REF,REF,REF,REF,REF,REF, + REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,],[REF,REF, + REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,], + [REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF, + REF,REF,],[REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1, + UGD,REF,REF,],[REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD, + U1,U1,U1,REF,REF,],[REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1, + U1,UGD,U1,UGD,U1,REF,],[REF,U1,UGD,U1,U1,U1,UGD,UGD,U1, + UGD,UGD,U1,U1,U1,UGD,U1,REF,],[REF,U1,U1,UGD,UGD,UGD,UGD, + U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,],[REF,U1,U1,U1,U1,U1, + U1,UGD,UGD,UGD,U1,U1,U1,U1,U1,U1,REF,],[REF,U1,U1,UGD,UGD, + UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,],[REF,U1,UGD, + U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,],[REF,U1, + UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,], + [REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF, + REF,],[REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD, + REF,REF,],[REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1, + UGD,REF,REF,REF,],[REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1, + U1,REF,REF,REF,REF,REF,],[REF,REF,REF,REF,REF,REF,REF,REF, + REF,REF,REF,REF,REF,REF,REF,REF,REF,],), + rod_map= + (['#','#','#','#','#','#','#', + '#','#','#','#','#','#','#','#','#','#'],['#','#','#','#','#','.', + '.','.','.','.','.','.','#','#','#','#','#'],['#','#','#','.','.', + '.','.','.','RB','.','.','.','.','.','#','#','#'],['#','#','.','.', + '.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'],['#','#', + '.','.','N1','.','.','.','G1','.','.','.','N1','.','.','#','#'], + ['#','.','.','G2','.','RB','.','.','.','.','.','RB','.','G2','.', + '.','#'],['#','.','.','.','.','.','.','.','N1','.','.','.','.','.', + '.','.','#'],['#','.','.','N2','.','.','.','.','.','.','.','.','.', + 'N2','.','.','#'],['#','.','RB','.','G1','.','N1','.','RB','.','N1', + '.','G1','.','RB','.','#'],['#','.','.','N2','.','.','.','.','.', + '.','.','.','.','N2','.','.','#'],['#','.','.','.','.','.','.','.', + 'N1','.','.','.','.','.','.','.','#'],['#','.','.','G2','.','RB', + '.','.','.','.','.','RB','.','G2','.','.','#'],['#','#','.','.', + 'N1','.','.','.','G1','.','.','.','N1','.','.','#','#'],['#','#', + '.','.','.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'], + ['#','#','#','.','.','.','.','.','RB','.','.','.','.','.','#','#', + '#'],['#','#','#','#','#','.','.','.','.','.','.','.','#','#','#', + '#','#'],['#','#','#','#','#','#','#','#','#','#','#','#','#','#', + '#','#','#'],), + BU_map= + ([0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,0.0,0.0, + 40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0, + 40.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0, + 0.0,40.0,20.0,20.0,20.0,40.0,20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0, + 0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0, + 20.0,0.0,0.0,0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0, + 20.0,40.0,20.0,40.0,40.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,20.0,40.0, + 20.0,40.0,20.0,20.0,60.0,20.0,20.0,40.0,20.0,40.0,20.0,0.0,0.0],[0.0, + 0.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0, + 0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0, + 40.0,40.0,0.0,0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,20.0,20.0,20.0,40.0, + 20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0, + 20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,0.0, + 40.0,0.0,0.0,40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],),), + axial_description=_F(lower_refl_size=0.21, + upper_refl_size=0.21,), + nominal_power=4000000000.0, + Fuel_power_fraction=0.974, + by_pass=0.07, + core_volumic_flowrate=90940.0,); + +neutro_model=Model_data(physics='Neutronics', + scale='component', + code='APOLLO3', + radial_meshing=_F(flux_solver='subdivision', + flux_subdivision=2, + feedback_solver='subdivision', + feedback_subdivision=1,), + axial_meshing=_F(lower_refl=2, + fuel=42, + upper_refl=2,),); + +thermo_model=Model_data(physics='Thermalhydraulics', + scale='component', + code='FLICA4', + radial_meshing=_F(fluid='subdivision', + fluid_subdivision=1, + pellet=8, + clad=2,), + axial_meshing=_F(lower_refl=1, + fuel=40, + upper_refl=1,),); + +scenario_data=Scenario_data(initial_power=0.1, + initial_power_unit='% Nominal power', + initial_core_inlet_temperature=290.0, + initial_boron_concentration=1300.0, + initial_inlet_pressure=160.2, + initial_outlet_pressure=157.2, + initial_rod_positions=(('Rodbank@RB',201),('Rodbank@N1',96),('Rodbank@N2',260),('Rodbank@G1',260),('Rodbank@G2',260),('Rodcluster@H08',260)), + scenario_type='RIA', + ejected_rod='H02', + rod_position_program=((0.0,0),(0.1,260)), + SCRAM='YES', + SCRAM_power=1130.0, + complete_SCRAM_time=1.0, + post_processing=(('Fuel temperature@Thermalhydraulics','MAX'),('Neutronic power@Neutronics','SUM'),('Fuel temperature@Thermalhydraulics','MED'),('Neutronic power@Neutronics','MED')),); +#VERSION_CATALOGUE:V_0:FIN VERSION_CATALOGUE +#CHECKSUM:25881dd6462363b8aeb1384fa470b79e:FIN CHECKSUM \ No newline at end of file diff --git a/ReacteurNumerique/prefs.py b/ReacteurNumerique/prefs.py new file mode 100644 index 00000000..e4ed9a42 --- /dev/null +++ b/ReacteurNumerique/prefs.py @@ -0,0 +1,22 @@ +# Copyright (C) 2007-2012 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +code="ReacteurNumerique" +import sys, os +if os.path.dirname(os.path.abspath(__file__)) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/ReacteurNumerique/prefs_ReacteurNumerique.py b/ReacteurNumerique/prefs_ReacteurNumerique.py new file mode 100644 index 00000000..14d878cf --- /dev/null +++ b/ReacteurNumerique/prefs_ReacteurNumerique.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# maConfiguration MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='fr' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' + +# +#typeDeCata='XML' +catalogues=( + ('ReacteurNumerique','Version Beta',os.path.join(repIni,'cata_RN_EDG_PN.py'),'python','python'), +) +#nombreDeBoutonParLigne=4 +simpleClic=True +#closeFrameRechercheCommande=True +boutonDsMenuBar=False +#closeArbre=True +afficheListesPliees=False +#withXSD=True +afficheCommandesPliees = False +#dumpXSD=True +#afficheIhm=False diff --git a/ReacteurNumerique/qtEficasReacteurNumerique.py b/ReacteurNumerique/qtEficasReacteurNumerique.py new file mode 100755 index 00000000..4fcb6536 --- /dev/null +++ b/ReacteurNumerique/qtEficasReacteurNumerique.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour MAP +""" +# Modules Python +# Modules Eficas +import prefs +name='prefs_'+prefs.code +__import__(name) + +import os, sys +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import prefs +from InterfaceQT4 import eficas_go +print (prefs.code) +eficas_go.lanceEficas(code=prefs.code) diff --git a/ReacteurNumerique/test.comm b/ReacteurNumerique/test.comm new file mode 100755 index 00000000..38b5d3da --- /dev/null +++ b/ReacteurNumerique/test.comm @@ -0,0 +1,177 @@ + +REF=Assembly(assembly_type='REF',); + +U1=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,4.2412,), + size=0.033,),),); + +UGD=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,), + size=0.033,),),); + +RB=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N1=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N2=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4226, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +G1=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +G2=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +techno_data=Techno_data(assembly_list=(REF,U1,UGD,), + rodbank_list=(RB,G1,G2,N1,N2,), + radial_description=_F(nb_assembly=15, + xaxis=('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',), + yaxis= + ('RS','15','14','13','12','11', + '10','09','08','07','06','05','04','03','02','01','RN',), + assembly_map= + ([REF,REF,REF,REF,REF,REF, + REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,],[REF,REF, + REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,], + [REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF, + REF,REF,],[REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1, + UGD,REF,REF,],[REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD, + U1,U1,U1,REF,REF,],[REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1, + U1,UGD,U1,UGD,U1,REF,],[REF,U1,UGD,U1,U1,U1,UGD,UGD,U1, + UGD,UGD,U1,U1,U1,UGD,U1,REF,],[REF,U1,U1,UGD,UGD,UGD,UGD, + U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,],[REF,U1,U1,U1,U1,U1, + U1,UGD,UGD,UGD,U1,U1,U1,U1,U1,U1,REF,],[REF,U1,U1,UGD,UGD, + UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,],[REF,U1,UGD, + U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,],[REF,U1, + UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,], + [REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF, + REF,],[REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD, + REF,REF,],[REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1, + UGD,REF,REF,REF,],[REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1, + U1,REF,REF,REF,REF,REF,],[REF,REF,REF,REF,REF,REF,REF,REF, + REF,REF,REF,REF,REF,REF,REF,REF,REF,],), + rod_map= + (['#','#','#','#','#','#','#', + '#','#','#','#','#','#','#','#','#','#'],['#','#','#','#','#','.', + '.','.','.','.','.','.','#','#','#','#','#'],['#','#','#','.','.', + '.','.','.','RB','.','.','.','.','.','#','#','#'],['#','#','.','.', + '.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'],['#','#', + '.','.','N1','.','.','.','G1','.','.','.','N1','.','.','#','#'], + ['#','.','.','G2','.','RB','.','.','.','.','.','RB','.','G2','.', + '.','#'],['#','.','.','.','.','.','.','.','N1','.','.','.','.','.', + '.','.','#'],['#','.','.','N2','.','.','.','.','.','.','.','.','.', + 'N2','.','.','#'],['#','.','RB','.','G1','.','N1','.','RB','.','N1', + '.','G1','.','RB','.','#'],['#','.','.','N2','.','.','.','.','.', + '.','.','.','.','N2','.','.','#'],['#','.','.','.','.','.','.','.', + 'N1','.','.','.','.','.','.','.','#'],['#','.','.','G2','.','RB', + '.','.','.','.','.','RB','.','G2','.','.','#'],['#','#','.','.', + 'N1','.','.','.','G1','.','.','.','N1','.','.','#','#'],['#','#', + '.','.','.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'], + ['#','#','#','.','.','.','.','.','RB','.','.','.','.','.','#','#', + '#'],['#','#','#','#','#','.','.','.','.','.','.','.','#','#','#', + '#','#'],['#','#','#','#','#','#','#','#','#','#','#','#','#','#', + '#','#','#'],), + BU_map= + ([0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,0.0,0.0, + 40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0, + 40.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0, + 0.0,40.0,20.0,20.0,20.0,40.0,20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0, + 0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0, + 20.0,0.0,0.0,0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0, + 20.0,40.0,20.0,40.0,40.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,20.0,40.0, + 20.0,40.0,20.0,20.0,60.0,20.0,20.0,40.0,20.0,40.0,20.0,0.0,0.0],[0.0, + 0.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0, + 0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0, + 40.0,40.0,0.0,0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,20.0,20.0,20.0,40.0, + 20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0, + 20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,0.0, + 40.0,0.0,0.0,40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],),), + axial_description=_F(lower_refl_size=0.21, + upper_refl_size=0.21,), + nominal_power=4000000000.0, + Fuel_power_fraction=0.974, + by_pass=0.07, + core_volumic_flowrate=90940.0,); + +neutro_model=Model_data(physics='Neutronics', + scale='component', + code='APOLLO3', + radial_meshing=_F(flux_solver='subdivision', + flux_subdivision=2, + feedback_solver='subdivision', + feedback_subdivision=1,), + axial_meshing=_F(lower_refl=2, + fuel=42, + upper_refl=2,),); + +thermo_model=Model_data(physics='Thermalhydraulics', + scale='component', + code='FLICA4', + radial_meshing=_F(fluid='subdivision', + fluid_subdivision=1, + pellet=8, + clad=2,), + axial_meshing=_F(lower_refl=1, + fuel=40, + upper_refl=1,),); + +scenario_data=Scenario_data(initial_power=0.1, + initial_power_unit='% Nominal power', + initial_core_inlet_temperature=290.0, + initial_boron_concentration=1300.0, + initial_inlet_pressure=160.2, + initial_outlet_pressure=157.2, + initial_rod_positions=(('Rodbank@RB',201),('Rodbank@N1',96),('Rodbank@N2',260),('Rodbank@G1',260),('Rodbank@G2',260),('Rodcluster@H08',260)), + scenario_type='RIA', + ejected_rod='H02', + rod_position_program=((0.0,0),(0.1,260)), + SCRAM='YES', + SCRAM_power=1130.0, + complete_SCRAM_time=1.0, + post_processing=(('Fuel temperature@Thermalhydraulics','MAX'),('Neutronic power@Neutronics','SUM'),('Fuel temperature@Thermalhydraulics','MED'),('Neutronic power@Neutronics','MED')),); +#VERSION_CATALOGUE:V_0:FIN VERSION_CATALOGUE +#CHECKSUM:25881dd6462363b8aeb1384fa470b79e:FIN CHECKSUM \ No newline at end of file diff --git a/Traducteur/toto.comm b/Traducteur/toto.comm deleted file mode 100644 index a2f211ed..00000000 --- a/Traducteur/toto.comm +++ /dev/null @@ -1,10 +0,0 @@ -DEBUT(); - -CALC_NONO(reuse=MSLIN, - RESULTAT=MSLIN, - OPTION=('EPSI_NOEU','SIEQ_NOEU','EPEQ_NOEU','SIGM_NOEU',),); - -CALC_NONO(reuse=MSLIN, - RESULTAT=MSLIN, - OPTION=('AA','EPSI_NOEU','SIEQ_NOEU','EPEQ_NOEU','SIGM_NOEU',),); -FIN(); diff --git a/Traducteur2/.renamemocle.py.swp b/Traducteur2/.renamemocle.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..bd31de25089219e5df64b8212e6e0429375ad69f GIT binary patch literal 16384 zcmeHNON<;x87}N#o*^hG@+DG!dlkGJ_w>%pCVq@Hf$@4bS!s8@%*@6z!LoX~|C#Bi zyKB#+@voCFr&EDW}Wja+epc$Bx zfrrIPxl~k{7EYg{Pd&OjXMQcN8PE)91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%G%z}dE7+nPB9L&c;7iuAi z{-QE=(TI4kFh`A{*7K;v)Q`B`_l(4J1kDJoNoBK?bCorWGIQ8Q5%m;ZQ5ULPgGBX2 zOVG$ME)k0OiOR*|`9ir^I*$mxc4eLFpS}W_!czq}ii6cmh5B*3a6x?$ zYW@EWti%5fsP%t-e*YJ&^?wO`6W9Zu0{)1#{?7rm?r#ArKpFT4*80Byz61<_25<^c zI`1gG`qB(&1~dbj0nLDBKr^5j&Gz0HD18PevJt|nuHbEx#f$}4W_v3hAu5*)_ zt)kI6N^ZzOM*>58#t#FIzQ3K+;^>>)Q#;Q2ruG9q*1N|Z^MgCV%gLwVjxrvmc6<-q S?VW3 1 : - print "Le Traducteur ne sait pas gerer" + print ("Le Traducteur ne sait pas gerer") assert(0) MonTexte=jdc.getLines()[child.lineno-1] debut=MonTexte.find("NOM_PARA") @@ -74,8 +74,8 @@ def chercheValeurSelonGenea2(jdc,liste_cherche_valeur): for genea in liste_cherche_valeur: profondeur=len(genea) if profondeur > 2 : - print "la methode chercheValeurSelonGenea ne convient" - print "pas pour cette genealogie" + print ("la methode chercheValeurSelonGenea ne convient") + print ("pas pour cette genealogie") assert(0) command=genea[0] fact=genea[1] @@ -115,8 +115,8 @@ def chercheValeurSelonGenea3(jdc,liste_cherche_valeur): for genea in liste_cherche_valeur: profondeur=len(genea) if profondeur > 3 : - print "la methode chercheValeurSelonGenea ne convient" - print "pas pour cette genealogie" + print ("la methode chercheValeurSelonGenea ne convient") + print ("pas pour cette genealogie") assert(0) command=genea[0] fact=genea[1] diff --git a/Traducteur/changeValeur.py b/Traducteur2/changeValeur.py similarity index 100% rename from Traducteur/changeValeur.py rename to Traducteur2/changeValeur.py diff --git a/Traducteur2/demosRN.py b/Traducteur2/demosRN.py new file mode 100755 index 00000000..1742af7a --- /dev/null +++ b/Traducteur2/demosRN.py @@ -0,0 +1,523 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" +""" +usage="""usage: %prog [options] +Typical use is: + python traduitV11V12.py --infile=xxxx --outfile=yyyy +""" + +import os, sys +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import optparse + +from Traducteur.load import getJDC +from Traducteur.mocles import parseKeywords +from Traducteur.removemocle import * +from Traducteur.renamemocle import * +from Traducteur.renamemocle import * +from Traducteur.inseremocle import * +from Traducteur.changeValeur import * +from Traducteur.movemocle import * +from Traducteur.dictErreurs import * +from Traducteur.regles import pasDeRegle +from Traducteur import log + + + +atraiter=( + "Genere_Une_Erreur_Traduction", + ) + +dict_erreurs={ + "Genere_Une_Erreur_Traduction":"Message pour test de genereErreurpourCommande ", + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile,outfile,flog=None): + + hdlr=log.initialise(flog) + jdc=getJDC(infile,atraiter) + root=jdc.root + + #Parse les mocles des commandes + parseKeywords(root) + + #### genere une erreur si on trouve la commande dans le jdc #############################e + genereErreurPourCommande(jdc,"Genere_Une_Erreur_Traduction") + exit() + + #### traitement de AFFE_CARA_ELEM ############################## + changementValeurDsMCFSiRegle(jdc,"AFFE_CARA_ELEM","POUTRE","CARA",{"R1":"R_DEBUT","R2":"R_FIN", + "EP1":"EP_DEBUT","EP2":"EP_FIN"}, + ((("POUTRE","MAILLE",),"nexistepasMCsousMCF"), + (("POUTRE","SECTION","CERCLE",jdc),"MCsousMCFaPourValeur"), + (("POUTRE","VARI_SECT","HOMOTHETIQUE",jdc),"MCsousMCFaPourValeur"), + ), + ) + + #### traitement de AFFE_CHAR_MECA ############################## + # Suppression du mot-clé METHODE + removeMotCle(jdc,"AFFE_CHAR_MECA","METHODE",pasDeRegle(),0) + # Suppression des mot-clés LIAISON_XFEM + removeMotCle(jdc,"AFFE_CHAR_MECA","LIAISON_XFEM",pasDeRegle(),0) + removeMotCle(jdc,"AFFE_CHAR_MECA","CONTACT_XFEM",pasDeRegle(),0) + # Modification des parametres du mot-clé DDL_POUTRE + renameMotCleInFact(jdc,"AFFE_CHAR_MECA","DDL_POUTRE","GROUP_MA","GROUP_MA_REPE",pasDeRegle(),0) + renameMotCleInFact(jdc,"AFFE_CHAR_MECA","DDL_POUTRE","MAILLE","MAILLE_REPE",pasDeRegle(),0) + + # Résorption des mot-clés ANGLE_NAUT et CENTRE + removeMotCleInFact(jdc,"AFFE_CHAR_MECA","LIAISON_SOLIDE","ANGL_NAUT",pasDeRegle(),0) + removeMotCleInFact(jdc,"AFFE_CHAR_MECA","LIAISON_SOLIDE","CENTRE",pasDeRegle(),0) + + #### traitement de AFFE_CHAR_MECA_F ############################## + # Suppression du mot-clé METHODE + removeMotCle(jdc,"AFFE_CHAR_MECA_F","METHODE",pasDeRegle(),0) + # Résorption des mot-clés ANGLE_NAUT et CENTRE + removeMotCleInFact(jdc,"AFFE_CHAR_MECA_F","LIAISON_SOLIDE","ANGL_NAUT",pasDeRegle(),0) + removeMotCleInFact(jdc,"AFFE_CHAR_MECA_F","LIAISON_SOLIDE","CENTRE",pasDeRegle(),0) + + genereErreurMotCleInFact(jdc,"AFFE_CHAR_MECA_F","ONDE_PLANE","DIRECTION") + + #### traitement de AFFE_CHAR_THER ############################## + # Suppression du mot-clé METHODE + removeMotCle(jdc,"AFFE_CHAR_THER","METHODE",pasDeRegle(),0) + + #### traitement de AFFE_MODELE ############################## + # Suppression des mot-clés GRILLE et VERIF + removeMotCle(jdc,"AFFE_MODELE","GRILLE",pasDeRegle(),0) + removeMotCle(jdc,"AFFE_MODELE","VERIF",pasDeRegle(),0) + + d3DINCO={"3D_INCO":"3D_INCO_UP","3D_INCO_OSGS":"3D_INCO_UPO", + "3D_INCO_GD":"3D_INCO_UPG","3D_INCO_LOG":"3D_INCO_UPG", + "3D_INCO_LUP":"3D_INCO_UP",} + dAXIS={"AXIS_INCO":"AXIS_INCO_UP","AXIS_INCO_OSGS":"AXIS_INCO_UPO", + "AXIS_INCO_GD":"AXIS_INCO_UPG","AXIS_INCO_LOG":"AXIS_INCO_UPG", + "AXIS_INCO_LUP":"AXIS_INCO_UP",} + dDPLAN={"D_PLAN_INCO":"D_PLAN_INCO_UP","D_PLAN_INCO_OSGS":"D_PLAN_INCO_UPO", + "D_PLAN_INCO_GD":"D_PLAN_INCO_UPG","D_PLAN_INCO_LOG":"D_PLAN_INCO_UPG", + "D_PLAN_INCO_LUP":"D_PLAN_INCO_UP",} + dINCO={} + dINCO.update(d3DINCO) + dINCO.update(dAXIS) + dINCO.update(dDPLAN) + changementValeurDsMCF(jdc,"AFFE_MODELE","AFFE","MODELISATION",dINCO) + + #### traitement de ASSEMBLAGE ############################## + genereErreurValeurDsMCF(jdc,"ASSEMBLAGE","MATR_ASSE","OPTION",("'MASS_THER'",)) + + #### traitement de CALC_ESSAI_GEOMECA ############################## + renameMotCleInFact(jdc,"CALC_ESSAI_GEOMECA","ESSAI_CISA_C","EPSI_IMPOSE","GAMMA_IMPOSE",pasDeRegle(),0) + renameMotCleInFact(jdc,"CALC_ESSAI_GEOMECA","ESSAI_CISA_C","EPSI_ELAS","GAMMA_ELAS",pasDeRegle(),0) + + #### traitement de CALC_EUROPLEXUS ############################## + removeMotCle(jdc,"CALC_EUROPLEXUS","DIME",pasDeRegle(),0) + genereErreurMCF(jdc,"CALC_EUROPLEXUS","FONC_PARASOL") + removeMotCleInFact(jdc,"CALC_EUROPLEXUS","ARCHIVAGE","CONT_GENER") + + #### traitement de CALC_FERRAILLAGE ############################## + genereErreurPourCommande(jdc,"CALC_FERRAILLAGE") + + #### traitement de CALC_FONCTION ############################## + ajouteMotClefDansFacteur(jdc,"CALC_FONCTION","CORR_ACCE","METHODE='POLYNOME'",pasDeRegle(),0) + genereErreurMotCleInFact(jdc,"CALC_FONCTION","DSP","FREQ") + + #### traitement de CALC_G ############################## + removeMotCleInFact(jdc,"CALC_G","COMP_ELAS","RESI_INTE_RELA",pasDeRegle(),0) + removeMotCleInFact(jdc,"CALC_G","COMP_ELAS","ITER_INTE_MAXI",pasDeRegle(),0) + + #### traitement de CALC_FATIGUE ############################## + changementValeur(jdc,"CALC_FATIGUE","COURBE_GRD_VIE",{"MANSON_C":"MANSON_COFFIN",}) + + #### traitement de CALC_IFS_DNL ############################## + removeMotCle(jdc,"CALC_IFS_DNL","ENERGIE",pasDeRegle(),0) + + #### traitement de CALC_MAC3COEUR ############################## + ajouteMotClefDansFacteur(jdc,"CALC_MAC3COEUR","DEFORMATION","ARCHIMEDE = 'OUI'",pasDeRegle()) + + #### traitement de CALC_MATR_ELEM ############################## + genereErreurValeur(jdc,"CALC_MATR_ELEM","OPTION",("'MASS_THER'",)) + + #### traitement de CALC_MISS ############################## + genereErreurValeurDsMCF(jdc,"CALC_MISS","PARAMETRE","ISSF",("'OUI'",)) + + #### traitement de CALC_MODAL ############################## + # renameCommande(jdc,"CALC_MODAL","CALC_MODES", ) + genereErreurPourCommande(jdc,"CALC_MODAL") + + #### traitement de CALC_VECT_ELEM ############################## + genereErreurValeur(jdc,"CALC_VECT_ELEM","OPTION",("'FORC_NODA'",)) + + #### traitement de CREA_MAILLAGE ############################## + renameMotCle(jdc,"CREA_MAILLAGE","CREA_GROUP_MA","CREA_MAILLE") + genereErreurMCF(jdc,"CREA_MAILLAGE","ECLA_PG") + + lMCLEF=['COQU_VOLU', 'CREA_FISS', 'CREA_GROUP_MA', 'CREA_MAILLE', 'CREA_POI1', + 'ECLA_PG', 'HEXA20_27', 'LINE_QUAD', 'MODI_MAILLE','QUAD_LINE', + 'REPERE','RESTREINT','PENTA15_18'] + genereErreurMCF(jdc,"CREA_MAILLAGE","DETR_GROUP_MA") + removeMotCleInFactSiRegle(jdc,"CREA_MAILLAGE","DETR_GROUP_MA","NB_MAILLE",((lMCLEF,"nexistepasMCFParmi"),)) + renameMotCleInFactSiRegle(jdc,"CREA_MAILLAGE","DETR_GROUP_MA","GROUP_MA","NOM",((lMCLEF,"nexistepasMCFParmi"),)) + renameCommandeSiRegle(jdc,"CREA_MAILLAGE","DEFI_GROUP",((lMCLEF,"nexistepasMCFParmi"),)) + + #### traitement de DEBUT ############################## + # genereErreurPourCommande(jdc,("DEBUT",)) + removeMotCleInFact(jdc,"DEBUT","CODE","NOM",pasDeRegle(),0) + + #### traitement de DEFI_COMPOR ############################## + genereErreurValeur(jdc,"DEFI_COMPOR","LOCALISATION",["'RL'",]) + genereErreurValeur(jdc,"DEFI_COMPOR","RELATION_KIT",["'RVMIS_ISOT_CINE'",]) + genereErreurValeurDsMCF(jdc,"DEFI_COMPOR","MULTIFIBRE","RELATION",["'LABORD_1D'"]) + genereErreurMCF(jdc,"DEFI_COMPOR","POLYCRISTAL") + + #### traitement de DEFI_FISS_XFEM ############################## + genereErreurPourCommande(jdc,("DEFI_FISS_XFEM",)) + removeMotCle(jdc,"DEFI_FISS_XFEM","MODELE",pasDeRegle(),0) + removeMotCle(jdc,"DEFI_FISS_XFEM","MODELE_GRILLE",pasDeRegle(),0) + + #### traitement de DEFI_LIST_INST ############################## + changementValeurDsMCF(jdc,"DEFI_LIST_INST","ECHEC","ACTION",{"REAC_PRECOND":"DECOUPE"}) + + #### traitement de DEFI_MATER_GC ############################## + ajouteMotClefDansFacteur(jdc,"DEFI_MATER_GC","MAZARS","CODIFICATION='ESSAI'",pasDeRegle(),0) + + removeMotCleInFactSiRegle(jdc,"DEFI_MATER_GC","MAZARS","UNITE_LONGUEUR", + ((("MAZARS","CODIFICATION",["ESSAI"],jdc),"MCsousMCFaPourValeurDansListe"),),) + renameMotCleInFact(jdc,"DEFI_MATER_GC","MAZARS","UNITE_LONGUEUR","UNITE_CONTRAINTE") + changementValeurDsMCF(jdc,"DEFI_MATER_GC","MAZARS","UNITE_CONTRAINTE",{"MM":"MPa"}) + changementValeurDsMCF(jdc,"DEFI_MATER_GC","MAZARS","UNITE_CONTRAINTE",{"M":"Pa"}) + + genereErreurMCF(jdc,"DEFI_MATER_GC","MAZARS") + + #### traitement de DEFI_MATERIAU ############################## + lMLA=["F_MRR_RR", "C_MRR_RR", "F_MTT_TT", "C_MTT_TT", "F_MZZ_ZZ", + "C_MZZ_ZZ", "F_MRT_RT", "C_MRT_RT", "F_MRZ_RZ", "C_MRZ_RZ", + "F_MTZ_TZ", "C_MTZ_TZ",] + for param in lMLA: + removeMotCleInFact(jdc,"DEFI_MATERIAU","META_LEMA_ANI",param,pasDeRegle(),0) + removeMotCleInFact(jdc,"DEFI_MATERIAU","META_LEMA_ANI_FO",param,pasDeRegle(),0) + + lMDC=["BETA","DELTA1", "DELTA2", "DEPDT",] + for mcle in lMDC: + removeMotCleInFact(jdc,"DEFI_MATERIAU","MONO_DD_CC",mcle,pasDeRegle(),0) + removeMotCleInFact(jdc,"DEFI_MATERIAU","MONO_DD_CC_IRRA",mcle,pasDeRegle(),0) + + removeMotCleInFact(jdc,"DEFI_MATERIAU","UMAT","NB_VALE",pasDeRegle(),0) + removeMotCleInFact(jdc,"DEFI_MATERIAU","UMAT_FO","NB_VALE",pasDeRegle(),0) + listeMc=["C"+str(i) for i in range(1,198)] + fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT",listeMc,"LISTE_COEF") + fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT_FO",listeMc,"LISTE_COEF") + + removeMotCle(jdc,"DEFI_MATERIAU","LABORD_1D",pasDeRegle(),0) + + genereErreurMCF(jdc,"DEFI_MATERIAU","DIS_VISC") + lDISC=["PUIS_DX", "PUIS_DY", "PUIS_DZ", "PUIS_RX", "PUIS_RY", "PUIS_RZ", + "COEF_DX", "COEF_DY", "COEF_DZ", "COEF_RX", "COEF_RY", "COEF_RZ"] + for param in lDISC: + removeMotCleInFact(jdc,"DEFI_MATERIAU","DIS_VISC",param,pasDeRegle(),0) + + lTHMD=["PERMIN_X", "PERMIN_Y", "PERMIN_Z", "PERMINXY", "PERMINYZ", "PERMINZX",] + for param in lTHMD: + removeMotCleInFact(jdc,"DEFI_MATERIAU","THM_DIFFU",param,pasDeRegle(),0) + + # lMONODD=["DELTA1", "DELTA2"] + # for param in lMONODD: + # removeMotCleInFact(jdc,"DEFI_MATERIAU","MONO_DD_CC",param,pasDeRegle(),0) + # removeMotCleInFact(jdc,"DEFI_MATERIAU","MONO_DD_CC_IRRA",param,pasDeRegle(),0) + + removeMotCleInFact(jdc,"DEFI_MATERIAU","GLRC_DM","EF",pasDeRegle(),0) + removeMotCleInFact(jdc,"DEFI_MATERIAU","GLRC_DM","NUF",pasDeRegle(),0) + + genereErreurMCF(jdc,"DEFI_MATERIAU","THER_FO") + genereErreurMCF(jdc,"DEFI_MATERIAU","THER_NL") + genereErreurMCF(jdc,"DEFI_MATERIAU","THER_HYDR") + genereErreurMCF(jdc,"DEFI_MATERIAU","THER_COQUE") + genereErreurMCF(jdc,"DEFI_MATERIAU","THER_COQUE_FO") + + + #### traitement de DEFI_OBSTACLE ############################## + lMCLE=("CRAYON_900","CRAYON_1300","GUID_A_CARTE_900", + "GUID_B_CARTE_900","GUID_C_CARTE_900","GUID_D_CARTE_900","GUID_E_CARTE_900", + "GUID_F_CARTE_900","GUID_A_CARTE_1300","GUID_B_CARTE_1300","GUID_C_CARTE_1300", + "GUID_D_CARTE_1300","GUID_E_CARTE_1300","GUID_F_CARTE_1300","GUID_A_CARSP_900", + "GUID_B_CARSP_900","GUID_C_CARSP_900","GUID_D_CARSP_900","GUID_E_CARSP_900", + "GUID_F_CARSP_900","GUID_A_CARSP_1300","GUID_B_CARSP_1300","GUID_C_CARSP_1300", + "GUID_D_CARSP_1300","GUID_E_CARSP_1300","GUID_F_CARSP_1300","GUID_A_GCONT_900", + "GUID_B_GCONT_900","GUID_C_GCONT_900","GUID_D_GCONT_900","GUID_E_GCONT_900", + "GUID_F_GCONT_900","GUID_A_GCONT_1300","GUID_B_GCONT_1300","GUID_C_GCONT_1300", + "GUID_D_GCONT_1300","GUID_E_GCONT_1300","GUID_F_GCONT_1300","GUID_A_GCOMB_900", + "GUID_B_GCOMB_900","GUID_C_GCOMB_900","GUID_D_GCOMB_900","GUID_E_GCOMB_900", + "GUID_F_GCOMB_900","GUID_A_GCOMB_1300","GUID_B_GCOMB_1300","GUID_C_GCOMB_1300", + "GUID_D_GCOMB_1300","GUID_E_GCOMB_1300","GUID_F_GCOMB_1300",) + genereErreurValeur(jdc,"DEFI_OBSTACLE","TYPE",lMCLE) + + #### traitement de DYNA_TRAN_MODAL ############################## + removeMotCle(jdc,"DYNA_TRAN_MODAL","LAME_FLUIDE",pasDeRegle(),0) + removeMotCle(jdc,"DYNA_TRAN_MODAL","PARA_LAME_FLUI",pasDeRegle(),0) + removeMotCle(jdc,"DYNA_TRAN_MODAL","RELA_TRANSIS",pasDeRegle(),0) + + #### traitement de DYNA_VIBRA ############################## + removeMotCle(jdc,"DYNA_VIBRA","LAME_FLUIDE",pasDeRegle(),0) + removeMotCle(jdc,"DYNA_VIBRA","PARA_LAME_FLUI",pasDeRegle(),0) + removeMotCle(jdc,"DYNA_VIBRA","RELA_TRANSIS",pasDeRegle(),0) + + #### traitement de EXTR_TABLE ############################## + changementValeurDsMCF(jdc,"EXTR_TABLE","FILTRE","VALE_K",{"MATR_ELEM":"MATR_TANG_ELEM"}) + changementValeurDsMCF(jdc,"EXTR_TABLE","FILTRE","VALE_K",{"CODE_RETOUR":"CODE_RETOUR_INTE"}) + + #### traitement de FACTORISER ############################## + renameMotCle(jdc,"FACTORISER","ELIM_LAGR2","ELIM_LAGR") + changementValeur(jdc,"FACTORISER","ELIM_LAGR",{"OUI":"LAGR2",}) + + #### traitement de GENE_ACCE_SEISME ############################## + genereErreurMCF(jdc,"GENE_ACCE_SEISME","MODULATION") + moveMotCleFromFactToFather(jdc,"GENE_ACCE_SEISME","MODULATION","DUREE_PHASE_FORTE") + + + removeMotCleInFact(jdc,"GENE_ACCE_SEISME","MODULATION","PARA") + removeMotCleInFactSiRegle(jdc,"GENE_ACCE_SEISME","MODULATION","INST_INI",((("MODULATION","TYPE",["GAMMA"],jdc),"MCsousMCFnaPasPourValeurDansListe"),)) + + removeMotCleInFact(jdc,"GENE_ACCE_SEISME","DSP","FREQ_PENTE") + + #### traitement de IMPR_MISS_3D ############################## + genereErreurPourCommande(jdc,"IMPR_MISS_3D") + # removeCommande(jdc,"IMPR_MISS_3D") + + #### traitement de IMPR_RESU ############################## + removeMotCle(jdc,"IMPR_RESU","RESTREINT",pasDeRegle(),0) + + #### traitement de INFO_FONCTION ############################## + genereErreurMCF(jdc,"INFO_FONCTION","NOCI_SEISME") + + #### traitement de LIRE_MAILLAGE ############################## + removeMotCle(jdc,"LIRE_MAILLAGE","ABSC_CURV",pasDeRegle(),0) + + #### traitement de LIRE_MISS_3D ############################## + genereErreurPourCommande(jdc,"LIRE_MISS_3D") + + #### traitement de MACR_ASCOUF_CALC ############################## + removeMotCle(jdc,"MACR_ASCOUF_CALC","CL_BOL_P2_GV",pasDeRegle(),0) + # genereErreurMCF(jdc,"MACR_ASCOUF_CALC","COMP_ELAS") + + #### traitement de MACR_ASCOUF_MAIL ############################## + genereErreurValeurDsMCF(jdc,"MACR_ASCOUF_MAIL","COUDE","BOL_P2",("'GV'",)) + + #### traitement de MACR_ASPIC_CALC ############################## + # genereErreurMCF(jdc,"MACR_ASPIC_CALC","COMP_ELAS") + + #### traitement de MACR_ECREVISSE ############################## + genereErreurMCF(jdc,"MACR_ECREVISSE","COMP_INCR") + + #### traitement de MACR_INFO_MAIL ############################## + changementValeur(jdc,"MACR_INFO_MAIL","VERSION_HOMARD",{"V10_6":"V11_2"}) + changementValeur(jdc,"MACR_INFO_MAIL","VERSION_HOMARD",{"V10_N":"V11_N"}) + changementValeur(jdc,"MACR_INFO_MAIL","VERSION_HOMARD",{"V10_N_PERSO":"V11_N_PERSO"}) + + #### traitement de MACRO_BASCULE_SCHEMA ############################## + renameMotCle(jdc,"MACRO_BASCULE_SCHEMA","COMP_INCR_IMPL","COMPORTEMENT_IMPL",pasDeRegle()) + renameMotCle(jdc,"MACRO_BASCULE_SCHEMA","COMP_INCR_EXPL","COMPORTEMENT_EXPL",pasDeRegle()) + + #### traitement de MACRO_MISS_3D ############################## + genereErreurPourCommande(jdc,"MACRO_MISS_3D") + + #### traitement de MACRO_MODE_MECA ############################## + # insereMotCleDansCommande(jdc,"MACRO_MODE_MECA","TYPE_RESU='DYNAMIQUE'") + chercheOperInsereFacteur(jdc,"MACRO_MODE_MECA","SOLVEUR_MODAL",) + chercheOperInsereFacteur(jdc,"MACRO_MODE_MECA","OPTION='BANDE'",pasDeRegle(),0) + chercheOperInsereFacteurSiRegle(jdc,"MACRO_MODE_MECA","NORM_MODE",((("NORM_MODE",),"nexistepas"),),1) + + lMCLE=["PREC_SOREN", "NMAX_ITER_SOREN", "PARA_ORTHO_SOREN"] + for mcle in lMCLE: + moveMotClefInOperToFact(jdc,"MACRO_MODE_MECA",mcle,"SOLVEUR_MODAL") + + moveMotCleFromFactToFact(jdc,"MACRO_MODE_MECA","CALC_FREQ","COEF_DIM_ESPACE","SOLVEUR_MODAL") + moveMotCleFromFactToFact(jdc,"MACRO_MODE_MECA","CALC_FREQ","DIM_SOUS_ESPACE","SOLVEUR_MODAL") + renameCommande(jdc,"MACRO_MODE_MECA","CALC_MODES", ) + + #### traitement de MODE_ITER_INV ############################## + chercheOperInsereFacteur(jdc,"MODE_ITER_INV","SOLVEUR_MODAL",) + moveMotCleFromFactToFather(jdc,"MODE_ITER_INV","CALC_FREQ","OPTION") + moveMotCleFromFactToFather(jdc,"MODE_ITER_INV","CALC_CHAR_CRIT","OPTION") + + lINV=["OPTION", "PREC", "NMAX_ITER",] + for mcle in lINV: + renameMotCleInFact(jdc,"MODE_ITER_INV","CALC_MODE",mcle,mcle+"_INV",pasDeRegle(),0) + moveMotCleFromFactToFact(jdc,"MODE_ITER_INV","CALC_MODE",mcle+"_INV","SOLVEUR_MODAL") + + lMCLE=["NMAX_ITER_AJUSTE","PREC_AJUSTE",] + for mcle in lMCLE: + moveMotCleFromFactToFact(jdc,"MODE_ITER_INV","CALC_FREQ",mcle,"SOLVEUR_MODAL") + moveMotClefInOperToFact(jdc,"MODE_ITER_SIMULT","PREC_JACOBI","SOLVEUR_MODAL") + moveMotClefInOperToFact(jdc,"MODE_ITER_SIMULT","PREC_BATHE","SOLVEUR_MODAL") + + removeMotCle(jdc,"MODE_ITER_INV","CALC_MODE",pasDeRegle(),0) + + chercheOperInsereMotCleSiRegle(jdc,"MODE_ITER_INV","OPTION='AJUSTE'",((("OPTION",),"nexistepas"),),0) + + renameCommande(jdc,"MODE_ITER_INV","CALC_MODES", ) + + #### traitement de MODE_ITER_SIMULT ############################## + chercheOperInsereFacteur(jdc,"MODE_ITER_SIMULT","SOLVEUR_MODAL",) + removeMotCleSiRegle(jdc,"MODE_ITER_SIMULT","OPTION",((("METHODE","TRI_DIAG",jdc),"MCnaPasPourValeur"),),) + removeMotCleSiRegle(jdc,"MODE_ITER_SIMULT","OPTION",((("OPTION","SANS",jdc),"MCaPourValeur"),),) + moveMotClefInOperToFact(jdc,"MODE_ITER_SIMULT","OPTION","SOLVEUR_MODAL") + changementValeurDsMCF(jdc,"MODE_ITER_SIMULT","SOLVEUR_MODAL","OPTION",{"MODE_RIGIDE":"OUI"}) + renameMotCleInFact(jdc,"MODE_ITER_SIMULT","SOLVEUR_MODAL","OPTION","MODE_RIGIDE") + moveMotCleFromFactToFather(jdc,"MODE_ITER_SIMULT","CALC_FREQ","OPTION") + moveMotCleFromFactToFather(jdc,"MODE_ITER_SIMULT","CALC_CHAR_CRIT","OPTION") + + # chercheOperInsereFacteurSiRegle(jdc,"MODE_ITER_SIMULT","SOLVEUR_MODAL",((("METHODE",),"existe"),),1) + moveMotClefInOperToFact(jdc,"MODE_ITER_SIMULT","METHODE","SOLVEUR_MODAL") + moveMotClefInOperToFact(jdc,"MODE_ITER_SIMULT","TYPE_QZ","SOLVEUR_MODAL") + moveMotClefInOperToFact(jdc,"MODE_ITER_SIMULT","NMAX_ITER_BATHE","SOLVEUR_MODAL") + moveMotCleFromFactToFact(jdc,"MODE_ITER_SIMULT","CALC_FREQ","COEF_DIM_ESPACE","SOLVEUR_MODAL") + moveMotCleFromFactToFact(jdc,"MODE_ITER_SIMULT","CALC_FREQ","DIM_SOUS_ESPACE","SOLVEUR_MODAL") + moveMotCleFromFactToFact(jdc,"MODE_ITER_SIMULT","CALC_CHAR_CRIT","COEF_DIM_ESPACE","SOLVEUR_MODAL") + moveMotCleFromFactToFact(jdc,"MODE_ITER_SIMULT","CALC_CHAR_CRIT","DIM_SOUS_ESPACE","SOLVEUR_MODAL") + + removeMotCleInFactSiRegle(jdc,"MODE_ITER_SIMULT","CALC_FREQ","APPROCHE", + ((("SOLVEUR_MODAL","METHODE",["QZ"],jdc),"MCsousMCFnaPasPourValeurDansListe")or + (("SOLVEUR_MODAL","METHODE",),"nexistepasMCsousMCF"), + ) + ) + + moveMotCleFromFactToFact(jdc,"MODE_ITER_SIMULT","CALC_FREQ","APPROCHE","SOLVEUR_MODAL") + moveMotCleFromFactToFact(jdc,"MODE_ITER_SIMULT","CALC_CHAR_CRIT","APPROCHE","SOLVEUR_MODAL") + + lMCLE=["PREC_SOREN", "NMAX_ITER_SOREN", "PARA_ORTHO_SOREN"] + for mcle in lMCLE: + moveMotClefInOperToFact(jdc,"MODE_ITER_SIMULT",mcle,"SOLVEUR_MODAL") + + lMCLE=["NMAX_ITER_QR", "PREC_ORTHO", "NMAX_ITER_ORTHO", "PREC_LANCZOS"] + for mcle in lMCLE: + moveMotClefInOperToFact(jdc,"MODE_ITER_SIMULT",mcle,"SOLVEUR_MODAL") + + + renameCommande(jdc,"MODE_ITER_SIMULT","CALC_MODES", ) + + #### traitement de MODI_MAILLAGE ############################## + genereErreurValeurDsMCF(jdc,"MODI_MAILLAGE","DEFORME","OPTION",("'TRAN_APPUI'",)) + removeMotCleInFact(jdc,"MODI_MAILLAGE","DEFORME",["GROUP_NO_APPUI"],pasDeRegle(),0) + removeMotCleInFact(jdc,"MODI_MAILLAGE","DEFORME",["GROUP_NO_STRU"],pasDeRegle(),0) + + #### traitement de MODI_MODELE_XFEM ############################## + changementValeur(jdc,"MODI_MODELE_XFEM","CONTACT",{"P1P1":"STANDARD",}) + changementValeur(jdc,"MODI_MODELE_XFEM","CONTACT",{"P2P1":"STANDARD",}) + + + #### traitement de POST_DYNA_ALEA ############################## + chercheOperInsereFacteurSiRegle(jdc,"POST_DYNA_ALEA","INTERSPECTRE",((("INTE_SPEC",),"existe"),),1) + lPDA=["INTE_SPEC", "NUME_ORDRE_I", "NOEUD_I", "OPTION", "NUME_ORDRE_J", + "NOEUD_J", "NOM_CMP_I", "NOM_CMP_J", "MOMENT", "DUREE"] + for mcle in lPDA: + moveMotClefInOperToFact(jdc,"POST_DYNA_ALEA",mcle,"INTERSPECTRE") + removeMotCle(jdc,"POST_DYNA_ALEA","TOUT_ORDRE",pasDeRegle(),0) + + ajouteMotClefDansFacteur(jdc,"POST_DYNA_ALEA","FRAGILITE","METHODE = 'EMV'",pasDeRegle()) + + #### traitement de POST_ELEM ############################## + ajouteMotClefDansFacteurSiRegle(jdc,"POST_ELEM","VOLUMOGRAMME","NB_INTERV=5", + ((("VOLUMOGRAMME","NB_INTERV",),"nexistepasMCsousMCF"),),) + + #### traitement de POST_FATIGUE ############################## + changementValeur(jdc,"POST_FATIGUE","DOMMAGE",{"MANSON_C":"MANSON_COFFIN",}) + + #### traitement de POURSUITE ############################## + removeMotCle(jdc,"POURSUITE","CODE",)#"NOM",pasDeRegle(),0) + + #### traitement de RECU_FONCTION ############################## + genereErreurMCF(jdc,"RECU_FONCTION","TABLE") + + #### traitement de C_COMP_INCR et C_COMP_ELAS ############################## + lCOM=["CALCUL","STAT_NON_LINE","CALC_G", "CALC_PRECONT","DYNA_NON_LINE","CALC_META", + "TEST_COMPOR","SIMU_POINT_MAT","CALC_ESSAI_GEOMECA","CALC_FORC_NONL","LIRE_RESU", + "MACR_ASCOUF_CALC","MACR_ASPIC_CALC","CALC_EUROPLEXUS","MACR_ECREVISSE",] + for com in lCOM: + # chercheOperInsereFacteurSiRegle(jdc,com,"COMPORTEMENT",(((["COMPORTEMENT"],),"nexistepasMCFParmi"),),1) + fusionMCFToMCF(jdc,com,["COMP_ELAS","COMP_INCR"],"COMPORTEMENT") + # renameMotCle(jdc,com,"COMP_ELAS","COMPORTEMENT") + # renameMotCle(jdc,com,"COMP_INCR","COMPORTEMENT") + chercheOperInsereFacteurSiRegle(jdc,com,"ETAT_INIT",((("COMPORTEMENT","SIGM_INIT",),"existeMCsousMCF"),),1) + moveMotCleFromFactToFact(jdc,com,"COMPORTEMENT","SIGM_INIT","ETAT_INIT") + renameMotCleInFact(jdc,com,"ETAT_INIT","SIGM_INIT","SIGM",pasDeRegle(),0) + removeMotCleInFact(jdc,com,"COMPORTEMENT","SIGM_INIT",pasDeRegle(),0) + + changementValeur(jdc,com,"OPTION",{"FORC_INT_ELEM":"FORC_INTE_ELEM"}) + + removeMotCleInFactSiRegle(jdc,com,"COMPORTEMENT","NB_VARI",((("COMPORTEMENT","RELATION","'MFRONT'",jdc),"MCsousMCFaPourValeur"),)) + + + #### traitement de TEST_COMPOR ############################## + genereErreurPourCommande(jdc,"TEST_COMPOR") + + #### traitement de THER_NON_LINE ############################## + renameMotCle(jdc,"THER_NON_LINE","COMP_THER_NL","COMPORTEMENT") + + #### traitement de C_SOLVEUR ############################## + lCOM=['CALC_ERREUR', 'CALC_FORC_AJOU', 'CALC_IFS_DNL', 'CALC_MATR_AJOU', 'CALC_PRECONT', + 'CREA_ELEM_SSD', 'DEFI_BASE_MODALE', 'DYNA_LINE_HARM', 'DYNA_LINE_TRAN', 'DYNA_NON_LINE', + 'DYNA_TRAN_MODAL', 'INFO_MODE', 'MACR_ASCOUF_CALC', 'MACR_ASPIC_CALC', 'MACRO_BASCULE_SCHEMA', + 'MACRO_MATR_AJOU', 'MECA_STATIQUE', 'MODE_ITER_SIMULT', 'MODE_ITER_INV', 'MODE_STATIQUE', + 'STAT_NON_LINE', 'THER_LINEAIRE', 'THER_NON_LINE', 'THER_NON_LINE_MO', 'CALC_ERC_DYN','CALC_MODES',] + for com in lCOM: + # Suppression de ELIM_LAGR2 + changementValeurDsMCF(jdc,com,"SOLVEUR","ELIM_LAGR2",{"OUI":"LAGR2"}) + removeMotCleInFactSiRegle(jdc,com,"SOLVEUR","ELIM_LAGR2",((("SOLVEUR","ELIM_LAGR2","NON",jdc),"MCsousMCFaPourValeur"),)) + renameMotCleInFact(jdc,com,"SOLVEUR","ELIM_LAGR2","ELIM_LAGR") + + # Suppression de la méthode FETI + genereErreurValeurDsMCF(jdc,com,"SOLVEUR","METHODE",["FETI"]) + lMCLE=["NB_REORTHO_DD","NMAX_ITER","INFO_FETI","RESI_RELA","PARTITION"] + for mocle in lMCLE: + genereErreurMotCleInFact(jdc,com,"SOLVEUR",mocle) + + #### traitement de DEFI_PART_FETI ############################## + genereErreurMCF(jdc,"DEFI_PART_FETI","EXCIT") + removeMotCle(jdc,"DEFI_PART_FETI","EXCIT",pasDeRegle(),0) + removeMotCle(jdc,"DEFI_PART_FETI","CORRECTION_CONNEX",pasDeRegle(),0) + genereErreurPourCommande(jdc,"DEFI_PART_FETI") + renameCommande(jdc,"DEFI_PART_FETI","DEFI_PARTITION", ) + + ################################################################# + f=open(outfile,'w') + f.write(jdc.getSource()) + f.close() + + log.ferme(hdlr) + +def main(): + parser = optparse.OptionParser(usage=usage) + + parser.add_option('-i','--infile', dest="infile", default='toto.comm', + help="Le fichier à traduire") + parser.add_option('-o','--outfile', dest="outfile", default='tutu.comm', + help="Le fichier traduit") + + parser.add_option('-l','--logfile', dest="flog", default='log.txt', + help="fichier de log") + + options, args = parser.parse_args() + traduc(options.infile,options.outfile,options.flog) + +if __name__ == '__main__': + main() diff --git a/Traducteur/dictErreurs.py b/Traducteur2/dictErreurs.py similarity index 100% rename from Traducteur/dictErreurs.py rename to Traducteur2/dictErreurs.py diff --git a/Traducteur2/edg_REP1300_FULL_PN.comm b/Traducteur2/edg_REP1300_FULL_PN.comm new file mode 100755 index 00000000..ee4744a9 --- /dev/null +++ b/Traducteur2/edg_REP1300_FULL_PN.comm @@ -0,0 +1,159 @@ + +REF=Assembly(assembly_type='REF',); + +U1=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,4.2412,), + size=0.033,),),); + +UGD=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,), + size=0.033,),),); + +RB=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N1=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N2=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4226, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +G1=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +G2=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +techno_data=Techno_data(assembly_list=(REF,U1,UGD,), + rodbank_list=(RB,G1,G2,N1,N2,), + radial_description=_F(nb_assembly=15, + xaxis=('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',), + yaxis= + ('RS','15','14','13','12','11', + '10','09','08','07','06','05','04','03','02','01','RN',), + assembly_map=((REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,),(REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,),(REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF,REF,REF,),(REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD,REF,REF,),(REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF,REF,),(REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,),(REF,U1,UGD,U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,),(REF,U1,U1,UGD,UGD,UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,),(REF,U1,U1,U1,U1,U1,U1,UGD,UGD,UGD,U1,U1,U1,U1,U1,U1,REF,),(REF,U1,U1,UGD,UGD,UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,),(REF,U1,UGD,U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,),(REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,),(REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF,REF,),(REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD,REF,REF,),(REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF,REF,REF,),(REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,),(REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,),), + rod_map= + (['#','#','#','#','#','#','#', + '#','#','#','#','#','#','#','#','#','#'],['#','#','#','#','#','.', + '.','.','.','.','.','.','#','#','#','#','#'],['#','#','#','.','.', + '.','.','.','RB','.','.','.','.','.','#','#','#'],['#','#','.','.', + '.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'],['#','#', + '.','.','N1','.','.','.','G1','.','.','.','N1','.','.','#','#'], + ['#','.','.','G2','.','RB','.','.','.','.','.','RB','.','G2','.', + '.','#'],['#','.','.','.','.','.','.','.','N1','.','.','.','.','.', + '.','.','#'],['#','.','.','N2','.','.','.','.','.','.','.','.','.', + 'N2','.','.','#'],['#','.','RB','.','G1','.','N1','.','RB','.','N1', + '.','G1','.','RB','.','#'],['#','.','.','N2','.','.','.','.','.', + '.','.','.','.','N2','.','.','#'],['#','.','.','.','.','.','.','.', + 'N1','.','.','.','.','.','.','.','#'],['#','.','.','G2','.','RB', + '.','.','.','.','.','RB','.','G2','.','.','#'],['#','#','.','.', + 'N1','.','.','.','G1','.','.','.','N1','.','.','#','#'],['#','#', + '.','.','.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'], + ['#','#','#','.','.','.','.','.','RB','.','.','.','.','.','#','#', + '#'],['#','#','#','#','#','.','.','.','.','.','.','.','#','#','#', + '#','#'],['#','#','#','#','#','#','#','#','#','#','#','#','#','#', + '#','#','#'],), + BU_map= + ([0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,0.0,0.0, + 40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0, + 40.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0, + 0.0,40.0,20.0,20.0,20.0,40.0,20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0, + 0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0, + 20.0,0.0,0.0,0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0, + 20.0,40.0,20.0,40.0,40.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,20.0,40.0, + 20.0,40.0,20.0,20.0,60.0,20.0,20.0,40.0,20.0,40.0,20.0,0.0,0.0],[0.0, + 0.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0, + 0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0, + 40.0,40.0,0.0,0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,20.0,20.0,20.0,40.0, + 20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0, + 20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,0.0, + 40.0,0.0,0.0,40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],),), + axial_description=_F(lower_refl_size=0.21, + upper_refl_size=0.21,), + nominal_power=4000000000.0, + Fuel_power_fraction=0.974, + by_pass=0.07, + core_volumic_flowrate=90940.0,); + +neutro_model=Model_data(physics='Neutronics', + scale='component', + code='APOLLO3', + radial_meshing=_F(flux_solver='subdivision', + flux_subdivision=2, + feedback_solver='subdivision', + feedback_subdivision=1,), + axial_meshing=_F(lower_refl=2, + fuel=42, + upper_refl=2,),); + +thermo_model=Model_data(physics='Thermalhydraulics', + scale='component', + code='FLICA4', + radial_meshing=_F(fluid='subdivision', + fluid_subdivision=1, + pellet=8, + clad=2,), + axial_meshing=_F(lower_refl=1, + fuel=40, + upper_refl=1,),); + +scenario_data=Scenario_data(initial_power=0.1, + initial_power_unit='% Nominal power', + initial_core_inlet_temperature=290.0, + initial_boron_concentration=1300.0, + initial_inlet_pressure=160.2, + initial_outlet_pressure=157.2, + initial_rod_positions=(('Rodbank@RB',201),('Rodbank@N1',96),('Rodbank@N2',260),('Rodbank@G1',260),('Rodbank@G2',260),('Rodcluster@H08',260)), + scenario_type='RIA', + ejected_rod='H02', + rod_position_program=((0.0,0),(0.1,260)), + SCRAM='YES', + SCRAM_power=1130.0, + complete_SCRAM_time=1.0, + post_processing=(('Fuel temperature@Thermalhydraulics','MAX'),('Neutronic power@Neutronics','SUM'),('Fuel temperature@Thermalhydraulics','MED'),('Neutronic power@Neutronics','MED')),); + +Genere_Une_Erreur_Traduction(essai='3',); +#VERSION_CATALOGUE:V_0:FIN VERSION_CATALOGUE +#CHECKSUM:f62a6f71fcde9f983479fc749f7e334c -:FIN CHECKSUM \ No newline at end of file diff --git a/Traducteur/inseremocle.py b/Traducteur2/inseremocle.py similarity index 100% rename from Traducteur/inseremocle.py rename to Traducteur2/inseremocle.py diff --git a/Traducteur/load.py b/Traducteur2/load.py similarity index 100% rename from Traducteur/load.py rename to Traducteur2/load.py diff --git a/Traducteur/log.py b/Traducteur2/log.py similarity index 100% rename from Traducteur/log.py rename to Traducteur2/log.py diff --git a/Traducteur/mocles.py b/Traducteur2/mocles.py similarity index 100% rename from Traducteur/mocles.py rename to Traducteur2/mocles.py diff --git a/Traducteur/movemocle.py b/Traducteur2/movemocle.py similarity index 100% rename from Traducteur/movemocle.py rename to Traducteur2/movemocle.py diff --git a/Traducteur/parseur.py b/Traducteur2/parseur.py similarity index 100% rename from Traducteur/parseur.py rename to Traducteur2/parseur.py diff --git a/Traducteur/regles.py b/Traducteur2/regles.py similarity index 100% rename from Traducteur/regles.py rename to Traducteur2/regles.py diff --git a/Traducteur/removemocle.py b/Traducteur2/removemocle.py similarity index 100% rename from Traducteur/removemocle.py rename to Traducteur2/removemocle.py diff --git a/Traducteur/renamemocle.py b/Traducteur2/renamemocle.py similarity index 100% rename from Traducteur/renamemocle.py rename to Traducteur2/renamemocle.py diff --git a/Traducteur2/toto.comm b/Traducteur2/toto.comm new file mode 120000 index 00000000..d710d2b2 --- /dev/null +++ b/Traducteur2/toto.comm @@ -0,0 +1 @@ +edg_REP1300_FULL_PN.comm \ No newline at end of file diff --git a/Traducteur/traduitV10V11.py b/Traducteur2/traduitV10V11.py similarity index 100% rename from Traducteur/traduitV10V11.py rename to Traducteur2/traduitV10V11.py diff --git a/Traducteur/traduitV11V12.py b/Traducteur2/traduitV11V12.py similarity index 100% rename from Traducteur/traduitV11V12.py rename to Traducteur2/traduitV11V12.py diff --git a/Traducteur/traduitV7V8.py b/Traducteur2/traduitV7V8.py similarity index 100% rename from Traducteur/traduitV7V8.py rename to Traducteur2/traduitV7V8.py diff --git a/Traducteur/traduitV8V9.py b/Traducteur2/traduitV8V9.py similarity index 100% rename from Traducteur/traduitV8V9.py rename to Traducteur2/traduitV8V9.py diff --git a/Traducteur/traduitV9V10.py b/Traducteur2/traduitV9V10.py similarity index 100% rename from Traducteur/traduitV9V10.py rename to Traducteur2/traduitV9V10.py diff --git a/Traducteur/utils.py b/Traducteur2/utils.py similarity index 100% rename from Traducteur/utils.py rename to Traducteur2/utils.py diff --git a/Traducteur/visiteur.py b/Traducteur2/visiteur.py similarity index 100% rename from Traducteur/visiteur.py rename to Traducteur2/visiteur.py diff --git a/Traducteur3/.mocles.py.swp b/Traducteur3/.mocles.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..9a2f56692d9be04d4bf3acbacc1015a1280f73f0 GIT binary patch literal 20480 zcmeI2ZEPGz8OJA08`45(OIuOCl&P;I=jMFAJCiuM=m=NGPAp=_*ymKKYtY{AoW1tm z?rCS&FHiv@2q=7@FDVr$2q6`zYJnh1X!(FdNxv0Jt0E9m5GqomNF`8-6d?$R|FbW? zx4lc;L?FVh^z-_5XP%w;&pbOb&rUgWcyx^KN@p34n;3iK_&1gNZ~fCXk4eUgyLV=C zyXZ#uLzA`4?wz^Z&cW{KKII$i|7dB)KC#pS*A_OA%VsEJqUTP2%X_BRXCqD>D-bIXD-bIXD-bIXD-bIXD-bL2 zKdpdM+sHnR8e9|9;;!Jlq2+vS@OwBof1u_5#^Cqf;H z04jJtIJbqdH^7si4BiWF1E=1_*z@40-~@OAJProIg?BRcL+}iE8axFa0xp;V!{AnM zCMereIDZ|~z%GbxpFs*-~KnZG!Ek#mIOIuAF(y{egvLRu@H-&_2c@y|i zP_1fBH-vq$>{U?}Tg~QxjZBhfCMyHN%xUc7{l9=yRr!Tng9VhVZK4Q2Lr9 z>W{Td1qIcarXH?(m}6Ee@d zl2jE(ogdMmhh6xHSY5Vk&Ht6`^%EoQ5Vx*8+=?k_&;grRoyA<@SowecOmN; z?CI$Vt60$uiF(_%kTuKH6v(8wE8O3I1C1J6Bg|XmsFVY}v~8}*6}xN;m@pk-Qg)P^ zg!I}^rns_Txem z68_1zUtwe)W3MiC6GNY=iezZQ_mULsJH6cRy$Pfwi!Et7m<|2S^P47z3;Zp-5jtG> zWK0<_Y|rFoI}Trc^%0L=07)-HN=+>;cNz2g7;<6i2DfDu+p6;Vw%N4n&}gn#YnJVx z#;rqA%4^V)wNF=_6x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+7GQHVFPv;_&G1iL|V{a=z#-60evyde+wCA+0?qLZ+Eu9UJM8>we%> z<&uFi&98!1NiV@E13N8l$-@3f=LGPb?&9utX)es8{Vc3go2Q`wog5c4a8t)DJaAx! zq-#e4uK@q9@1ha@MrkkNb5R~g*&uc})-{iSbThmYJqqfxt)n32=`s@1?Td_tu(=-Z zBa5xwCDH>ajuh>G>wjRR2U1CJqg&LAl5~wlMV34&21b^m228r%Jr+hO)?bG9C>+^o z75-BElq}`D)U#zU^@48AF}H}!?P2UhSJ!NLNCKW3H6Dx59pMK$4bhBh9UciRoc+&F zZ(}S*H*cMaBpSXQ24A)O!B{qo#*n<@So|Rxio?={ZBzen+7lsMPbzBqSbrNgX7OTe z;aAtS=QO6kr#V5v!QfM5-ArO!;Pr%Wp~0t41o`omE%FPe;(g!rZd)e4#JN>rTL_=f zhdTtL5Cf$3|4UdC{|oD7TK^9Ri=Nl8=6?}910Dn>*bD9iTfi$=|Nj7d1KbA=fGpSq z{)kw>Y49EJF!&58f83XiZ@2B zO<<{`bX^by-__%dQJ1x}#df6s@ItnIV+S>LyfKQA40K%P-k-K8NSElxdL67aw$VAJ x(baNu7iiem)41U<-WV0VA+%XM>M#ugu4iLZJt)y>b7Azx!nRF*y0oyv@85F*5@P@W literal 0 HcmV?d00001 diff --git a/Traducteur3/.toto.comm.swp b/Traducteur3/.toto.comm.swp new file mode 100644 index 0000000000000000000000000000000000000000..824366dd9b98c9f527b4d99ad4e82494f9c22c8f GIT binary patch literal 24576 zcmeHOU5p!76&^xETOg%PK$Qq8ZbGqx9IwZA>~*4n>?Zry>~7lKY)FZsk=GvYPHKCs znejH;hZa%sf{=)i0u>U1f&{8m`T~MNr3wi_CEx`K@gr1(1X3iBcz{=$@|~HvGxv_i zv;NtFDvgtG=Kh`Y-E;1pYtOlNH}jX5R#MYBS;FUjNqX?>->6;w;6D%CUXi4kYB^t+ zri%Da!|LX%mZRF}kyB)76 zsZBhPcwjUS^z7!z=|fVnAm>T&__2pmM-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02f1g9+M2cP9V2W}C{^{yV*M)8(djc~m=jr?SXXOdGAPsWpz|rLS<)w2oIDjsR9SL$)z1BiI z=d5!Fa}!N%3R@d$8wy&=3SFJ^*O~72u7x1Bl8%ULk2fR8<)hDtm`5&dM#P8(?qI2= zrr}_E{mIZ^?GbBc((XObVYGHMbJ&3sl~4}jenaR;j46?`2GS#S!JRuZk6m0|zKFdL zslQ8ZNyOyoIQtqglZW5v7(8p7^=`*#_1bz}ZQ{AcnyD$(eAS82#>|<`UA2o}#&r6$ zGPvWkv4Xt?S}mF;9c9FFjMJnQ@!+>$cE?>YT`4R}?6cPjE-0Z)up+A70Z*LkjhR@H zCn$rJj#DD_aSc}xjuwxYrx0&U|M%#_h-Be_z86Iw*K{G^?_``yfqE5WSs#VgD4dWy zVDahv#DKbhlv)zTwLBnjQo&__k$%to#6-*iA2S4Z&!4O$7>b~^Q#LNMBh1?uA`EDp zl;2WJjLR+>81yCJ8X`3TxjUiBxuQM8Sxs`|l85YaviR+s$G#}LI9&?0qe@^up0W@T zX%?Lza#1em%s!bNjCem;e`lPMiI_bW&V^JG^dc}YDm5-OIL3Oaf)Sd4*|jcE6=hgd kEpyel)Q(dFGT+aBVnChftcln|U2w9@EFmLu`c=|@0V%`2?EnA( literal 0 HcmV?d00001 diff --git a/Traducteur3/.visiteur.py.swp b/Traducteur3/.visiteur.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..9ad7b7357045a75b7034b48434cc7246379b2b82 GIT binary patch literal 12288 zcmeHN&2J>d6|aTtLIO)7NW>)ykC`YQ?~dogX1}}|#H`nbQM_JfJZ9N!h|@D≫7{ zyQ!-7tT}-AIB?;>hZKnmQUD1>k#Y+X2R;&z5C;-+O)j~>N-L1~5Av&;?&)cdF)V_^ zO5M`W)6-S;>b>9l)vL1I?aG6Vb9Ay)Ww?IA*neJp#k%ydu`!%ogUW6+JAUyPNK~ee+r@WPLLRG6pgRG6pgRG6pgRG6pgRG6t@522^l> zJ%Jc*h~j8Rp9gk*Mqjg!jDd`SjDd`SjDd`SjDd`SjDd`SjDd`SjDd`S>yQDz+J%ShZ(yHyaBX1|y25LY7`0^lQZvkzf0vrTB{Q+Yi0)GY`0jj_O;D0wV_73ni@G9^p;Ax-< zl!4oT!@yPK;Z5Krz~tmQ)YM)s)AS{|+b#9D$A#0`GH-qqJm2QCEbeML1b%SA7q;9C zTE1y7Id;;;>5|RcVUHFm5RRv)Fk>uj)umjs27IPS+U9tS&AXK9P|%YU&Af{&J@fbF z+Wvm&)@i3kKCe1b)ke3iFmQR|aQ>T-xizpCupr%jJk;e0Bw1?Fo4(xty9QPwRdth;QSSA7Mr*9h4-lNV|qR zB;N5XM{rq84M*Bdz_DA4saDfuXexC2jyoY2?R07&)#%d0Aw`4_`u&1Rv<~-J3DglWAH5Y5x+s)^W=U=T9QMj@#+epxj+E<`B8#ZU zv@mkH+=J2keiZ0Rpx1uXTarB!qN;TK!N7uRgwCwvT2jUeSaI-J6wc{_HoC{^ObTKo z_lOLjgu8}kcFUvH#iXnyQO83J1z**DLL7UUPV6SrrR+x3 z>Nye~^x}weqHl5KY3O@1irSp4HkPyUsf(nL>O09^f#Rm^P_0I}Be_xe)l{YQZBk_V zO_H_8(E#@0gyafxO-M!gNq(%$TQG3r=EGuX_^%CQl|! zb`mEwSK1t!Cbp+!G@c7yl7Z`}Lay+;;n7)aH?HIHS%jKvb(W1gsTPL_E?-AI{cu2Bq=%NPr_ZAp&prpKjTayXqyicC$c;fYmC1--YL zLf{LXKXaa|RasZ~1G1zdXAt;8(L^^EJrXzp23n{IF zV{%Nt1OW)A*T?TaOS3dzshpUbuT)Qq2{m7qR-rsIS2*k>E0rlmx1*Y_J3Ty BeKi08 literal 0 HcmV?d00001 diff --git a/Traducteur3/CMakeLists.txt b/Traducteur3/CMakeLists.txt new file mode 100644 index 00000000..d1c51c80 --- /dev/null +++ b/Traducteur3/CMakeLists.txt @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +# Installation de tous les fichiers Python, texte et images du repertoire et des sous-repertoires (sauf CVS) +install ( + FILES + calcG.py changeValeur.py dictErreurs.py __init__.py inseremocle.py + load.py log.py mocles.py movemocle.py parseur.py regles.py removemocle.py + renamemocle.py traduitV7V8.py traduitV8V9.py traduitV9V10.py utils.py + visiteur.py + DESTINATION ${CMAKE_INSTALL_PREFIX}/Traducteur + ) + +### Local Variables: +### mode: cmake +### End: diff --git a/Traducteur3/__init__.py b/Traducteur3/__init__.py new file mode 100644 index 00000000..e4044aec --- /dev/null +++ b/Traducteur3/__init__.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# diff --git a/Traducteur3/changeValeur.py b/Traducteur3/changeValeur.py new file mode 100644 index 00000000..50b0c9c9 --- /dev/null +++ b/Traducteur3/changeValeur.py @@ -0,0 +1,317 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +from Traducteur.utils import lineToDict +import logging +from Traducteur.dictErreurs import ecritErreur +from Traducteur.load import jdcSet +from Traducteur.renamemocle import decaleLignesdeNBlancs +from Traducteur.removemocle import removeMotCleInFact +from Traducteur import regles + + +#-------------------------------------------------------------------------- +def changementValeur(jdc,command,motcle,DictNouvVal,liste=(),defaut=0): +#-------------------------------------------------------------------------- + if command not in jdcSet : return + boolChange=0 + for c in jdc.root.childNodes: + if c.name != command : continue + trouveUnMC=0 + for mc in c.childNodes: + if mc.name != motcle : continue + trouveUnMC=1 + TexteMC=mc.getText(jdc) + liste_ligne_MC=TexteMC.splitlines() + indexLigneGlob=mc.lineno-1 + indexTexteMC=0 + while indexLigneGlob < mc.endline : + if indexTexteMC > len(liste_ligne_MC)-1 : break + MaLigneGlob=jdc.getLines()[indexLigneGlob] + MaLigneTexte=liste_ligne_MC[indexTexteMC] + for Valeur in DictNouvVal : + MaLigneTexteDict=lineToDict(MaLigneTexte) + trouvecol=MaLigneTexte.find(Valeur) + if trouvecol > -1: + trouve=(Valeur==MaLigneTexteDict[trouvecol]) + else: + trouve=False + if trouve: + debut=MaLigneGlob.find(motcle) + if debut==-1 : debut=0 + Nouveau=MaLigneGlob[debut:].replace(Valeur,DictNouvVal[Valeur]) + Nouveau=MaLigneGlob[0:debut]+Nouveau + jdc.getLines()[indexLigneGlob]=Nouveau + MaLigneTexte=Nouveau # raccourci honteux mais ... + MaLigneGlob=Nouveau + if Valeur in liste : + ecritErreur((command,motcle,Valeur),indexLigneGlob) + else : + logging.info("Changement de %s par %s dans %s ligne %d",Valeur,DictNouvVal[Valeur],command,indexLigneGlob) + boolChange=1 + indexLigneGlob=indexLigneGlob+1 + indexTexteMC=indexTexteMC+1 + if (trouveUnMC == 0) and ( defaut == 1): + ecritErreur((command,motcle,"DEFAUT"),c.lineno) + if boolChange : jdc.reset(jdc.getSource()) + +#-------------------------------------------------------------------------------- +def changementValeurDsMCF(jdc,command,fact,motcle,DictNouvVal,liste=(),ensemble=regles.SansRegle,defaut=0): +#-------------------------------------------------------------------------------- + + if command not in jdcSet : return + boolChange=0 + for c in jdc.root.childNodes: + if c.name != command : continue + for mcF in c.childNodes: + if mcF.name != fact : continue + l=mcF.childNodes[:] + l.reverse() + for ll in l: + trouveUnMC=0 + for mc in ll.childNodes: + if mc.name != motcle:continue + if ensemble.verif(c) == 0 : continue + trouveUnMC=1 + TexteMC=mc.getText(jdc) + liste_ligne_MC=TexteMC.splitlines() + indexLigneGlob=mc.lineno-1 + indexTexteMC=0 + while indexLigneGlob < mc.endline : + if indexTexteMC > len(liste_ligne_MC)-1 : break + MaLigneGlob=jdc.getLines()[indexLigneGlob] + MaLigneTexte=liste_ligne_MC[indexTexteMC] + for Valeur in DictNouvVal : + MaLigneTexteDict=lineToDict(MaLigneTexte) + trouvecol=MaLigneTexte.find(Valeur) + if trouvecol > -1: + trouve=(Valeur==MaLigneTexteDict[trouvecol]) + else: + trouve=False + if trouve: + debut=MaLigneGlob.find(motcle) + if debut==-1 : debut=0 + Nouveau=MaLigneGlob[debut:].replace(Valeur,DictNouvVal[Valeur]) + Nouveau=MaLigneGlob[0:debut]+Nouveau + jdc.getLines()[indexLigneGlob]=Nouveau + MaLigneTexte=Nouveau # raccourci honteux mais ... + MaLigneGlob=Nouveau + if Valeur in liste : + ecritErreur((command,fact,motcle,Valeur),indexLigneGlob) + else : + logging.info("Changement de %s par %s dans %s ligne %d",Valeur,DictNouvVal[Valeur],command,indexLigneGlob) + boolChange=1 + indexLigneGlob=indexLigneGlob+1 + indexTexteMC=indexTexteMC+1 + if (trouveUnMC == 0) and ( defaut == 1): + logging.warning("OPTION (defaut) de CALCG a verifier ligne %s" ,c.lineno ) + ecritErreur((command,fact,motcle,"DEFAUT"),c.lineno) + if boolChange : jdc.reset(jdc.getSource()) + +#-------------------------------------------------------------------------------- +def changementValeurDsMCFSiRegle(jdc,command,fact,motcle,DictNouvVal,liste_regles,defaut=0): +#-------------------------------------------------------------------------------- + if command not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + liste=() + changementValeurDsMCF(jdc,command,fact,motcle,DictNouvVal,liste,mesRegles,defaut) + +#--------------------------------------------------------------------------------------- +def changementValeurDsMCFAvecAvertissement(jdc, command, fact,motcle,DictNouvVal,liste): +#--------------------------------------------------------------------------------------- + if command not in jdcSet : return + defaut=0 + if liste[-1] == "defaut" : + defaut=1 + changementValeurDsMCF(jdc,command,fact,motcle,DictNouvVal,liste,defaut) + +#-------------------------------------------------------------------------- +def changementValeurAvecAvertissement(jdc, command,motcle,DictNouvVal,liste): +#-------------------------------------------------------------------------- + if command not in jdcSet : return + defaut=0 + if liste[-1] == "defaut" : + defaut=1 + changementValeur(jdc,command,motcle,DictNouvVal,liste,defaut) + +#-------------------------------------------------------------------------- +def suppressionValeurs(jdc, command,motcle,liste): +#-------------------------------------------------------------------------- + + if command not in jdcSet : return + boolChange=0 + for c in jdc.root.childNodes: + if c.name != command : continue + for mc in c.childNodes: + if mc.name != motcle : continue + indexLigneGlob=mc.lineno-1 + while indexLigneGlob < mc.endline-1 : + MaLigneTexte = jdc.getLines()[indexLigneGlob] + MaLigne=MaLigneTexte + for Valeur in liste : + debutMC =MaLigne.find(motcle) + if debutMC ==-1 : debutMC=0 + debut1=MaLigne[0:debutMC] + chercheLigne=MaLigne[debutMC:] + trouve=chercheLigne.find(Valeur) + premier=0 + if trouve > 1 : #on a au moins une quote + debut=debut1 + chercheLigne[0:trouve-1] + index = -1 + while (-1 * index) < len(debut) : + if (debut[index] == "(") : + premier = 1 + if index == -1 : + index=len(debut) + else : + index=index+1 + break + if (debut[index] == "," ) : + break + if (debut[index] != " " ) : + assert(0) + index = index -1 + debLigne = debut[0:index] + fin=trouve+len(Valeur)+1 + if premier == 1 and chercheLigne[fin] == ',': fin = fin + 1 # on supprime la , + finLigne = chercheLigne[fin:] + MaLigne_tmp=debLigne+finLigne + # traitement ligne commancant par , + if len(MaLigne_tmp.strip()) > 0 : + if MaLigne_tmp.strip()[0]==',' : + MaLigne=MaLigne_tmp.strip()[1:] + else : + MaLigne=MaLigne_tmp[0:] + else : + MaLigne=MaLigne_tmp[0:] + boolChange=1 + jdc.getLines()[indexLigneGlob]=MaLigne + indexLigneGlob=indexLigneGlob+1 + if boolChange : jdc.reset(jdc.getSource()) + +#---------------------------------------------- +def appelleMacroSelonValeurConcept(jdc,macro,genea): +#---------------------------------------------- + if macro not in jdcSet : return + boolChange=0 + fact=genea[0] + motcle=genea[1] + chaine="CO" + for c in jdc.root.childNodes: + if c.name != macro : continue + for mcF in c.childNodes: + if mcF.name != fact : continue + l=mcF.childNodes[:] + l.reverse() + for ll in l: + trouveValeur=0 + for mc in ll.childNodes: + if mc.name != motcle:continue + TexteMC=mc.getText(jdc) + liste_ligne_MC=TexteMC.splitlines() + indexLigneGlob=mc.lineno-2 + trouveTexteMC=0 + trouveegal=0 + trouvechaine=0 + trouveparent=0 + trouvequote=0 + while indexLigneGlob < mc.endline : + indexLigneGlob=indexLigneGlob+1 + MaLigneTexte=jdc.getLines()[indexLigneGlob] + + # on commence par chercher TABLE par exemple + # si on ne trouve pas on passe a la ligne suivante + if ( trouveTexteMC == 0 ) : + indice=MaLigneTexte.find(motcle) + if indice < 0 : continue + trouveTexteMC=1 + else : + indice=0 + + # on cherche = + aChercher=MaLigneTexte[indice:] + if (trouveegal == 0 ): + indice=aChercher.find("=") + if indice < 0 : continue + trouveegal = 1 + else : + indice = 0 + + # on cherche CO + aChercher2=aChercher[indice:] + if (trouvechaine == 0 ): + indice=aChercher2.find(chaine) + if indice < 0 : continue + trouvechaine = 1 + else : + indice = 0 + + #on cherche ( + aChercher3=aChercher2[indice:] + if (trouveparent == 0 ): + indice=aChercher3.find('(') + if indice < 0 : continue + trouveparent = 1 + else : + indice = 0 + + #on cherche la ' + aChercher4=aChercher3[indice:] + if (trouvequote == 0 ): + indice=aChercher4.find("'") + indice2=aChercher4.find('"') + if (indice < 0) and (indice2 < 0): continue + if (indice < 0) : indice=indice2 + trouvequote = 1 + else : + indice = 0 + + trouveValeur=1 + aChercher5=aChercher4[indice+1:] + indice=aChercher5.find("'") + if indice < 0 : indice=aChercher5.find('"') + valeur=aChercher5[:indice] + break + + if trouveValeur==0 : + logging.error("Pb de traduction pour MACR_LIGNE_COUPE : Pas de nom de Concept identifiable") + return + + if boolChange : + jdc.reset(jdc.getSource()) + logging.error("Pb du traduction pour MACR_LIGNE_COUPE : Deux noms de Concept possibles") + return + + boolChange=1 + ligneaTraiter=jdc.getLines()[c.lineno-1] + debut=ligneaTraiter[0:c.colno] + suite=valeur+"=" + fin=ligneaTraiter[c.colno:] + ligne=debut+suite+fin + jdc.getLines()[c.lineno-1]=ligne + nbBlanc=len(valeur)+1 + if c.lineno < c.endline: + decaleLignesdeNBlancs(jdc,c.lineno,c.endline-1,nbBlanc) + if boolChange : jdc.reset(jdc.getSource()) + +#---------------------------------------------- +def changeTouteValeur(jdc,command,motcle,DictNouvVal,liste=(),defaut=0): +#---------------------------------------------- + if macro not in jdcSet : return + boolChange=0 diff --git a/Traducteur3/demosRN.py b/Traducteur3/demosRN.py new file mode 100755 index 00000000..477603f4 --- /dev/null +++ b/Traducteur3/demosRN.py @@ -0,0 +1,94 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" +""" +usage="""usage: %prog [options] +Typical use is: + python traduitV11V12.py --infile=xxxx --outfile=yyyy +""" + +import os, sys +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import optparse + +from Traducteur.load import getJDC +from Traducteur.mocles import parseKeywords +from Traducteur.removemocle import * +from Traducteur.renamemocle import * +from Traducteur.renamemocle import * +from Traducteur.inseremocle import * +from Traducteur.changeValeur import * +from Traducteur.movemocle import * +from Traducteur.dictErreurs import * +from Traducteur.regles import pasDeRegle +from Traducteur import log + + + +atraiter=( + "Genere_Une_Erreur_Traduction", + "RodBank", + "Assembly", + "Techno_data", + "Model_data", + ) + +dict_erreurs={ + "Genere_Une_Erreur_Traduction":"Message pour test de genereErreurpourCommande ", + } + +sys.dict_erreurs=dict_erreurs + +def traduc(infile,outfile,flog=None): + + hdlr=log.initialise(flog) + jdc=getJDC(infile,atraiter) + root=jdc.root + + #Parse les mocles des commandes + parseKeywords(root) + + # genere une erreur si on trouve la commande dans le jdc # + genereErreurPourCommande(jdc,"Genere_Une_Erreur_Traduction") + + f=open(outfile,'w') + f.write(jdc.getSource()) + f.close() + + log.ferme(hdlr) + +def main(): + parser = optparse.OptionParser(usage=usage) + + parser.add_option('-i','--infile', dest="infile", default='toto.comm', + help="Le fichier à traduire") + parser.add_option('-o','--outfile', dest="outfile", default='tutu.comm', + help="Le fichier traduit") + + parser.add_option('-l','--logfile', dest="flog", default='log.txt', + help="fichier de log") + + options, args = parser.parse_args() + traduc(options.infile,options.outfile,options.flog) + +if __name__ == '__main__': + main() diff --git a/Traducteur3/dictErreurs.py b/Traducteur3/dictErreurs.py new file mode 100644 index 00000000..82fc058f --- /dev/null +++ b/Traducteur3/dictErreurs.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import logging +from Traducteur.load import jdcSet + + +def ecritErreur(listeGena,ligne=None) : + from sys import dict_erreurs + maCle="" + for Mot in listeGena : + maCle=maCle+"_"+Mot + #try : + if ( 1 == 1) : + maClef=maCle[1:] + if maClef in dict_erreurs : + if ligne != None : + logging.warning("ligne %d : %s ",ligne,dict_erreurs[maClef]) + else : + logging.warning("%s",dict_erreurs[maClef]) + else : + maCle="" + for Mot in listeGena[:-1] : + maCle=maCle+"_"+Mot + maClef=maCle[1:] + maClef=maCle+"_"+"VALEUR" + if maClef in dict_erreurs : + if ligne != None : + logging.warning("ligne %d : %s ",ligne,dict_erreurs[maClef]) + else : + logging.warning("%s",dict_erreurs[maClef]) + #except : + # pass + +def genereErreurPourCommande(jdc,listeCommande) : + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if type(listeCommande)==list: + for Mot in listeCommande : + if c.name != Mot :continue + ecritErreur((Mot,),c.lineno) + else: + if c.name != listeCommande :continue + ecritErreur((listeCommande,),c.lineno) + +def genereErreurMotCleInFact(jdc,command,fact,mocle): + for c in jdc.root.childNodes: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != fact:continue + l=mc.childNodes[:] + for ll in l: + for n in ll.childNodes: + if n.name != mocle: + continue + else : + ecritErreur((command,fact,mocle,),c.lineno) + +def genereErreurMCF(jdc,command,fact): + for c in jdc.root.childNodes: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != fact: + continue + else : + ecritErreur((command,fact,),c.lineno) + +def genereErreurValeur(jdc,command,fact,list_valeur): + for c in jdc.root.childNodes: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != fact:continue + texte=mc.getText(jdc) + for valeur in list_valeur: + trouve=texte.find(valeur) + if trouve > -1 : + logging.warning("%s doit etre supprimee ou modifiee dans %s : ligne %d",valeur,c.name,mc.lineno) + +def genereErreurValeurDsMCF(jdc,command,fact,mocle,list_valeur): + for c in jdc.root.childNodes: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != fact:continue + l=mc.childNodes[:] + for ll in l: + for n in ll.childNodes: + if n.name != mocle:continue + texte=n.getText(jdc) + for valeur in list_valeur: + trouve=texte.find(valeur) + if trouve > -1 : + logging.warning("%s doit etre supprimee ou modifiee dans %s : ligne %d",valeur,c.name,n.lineno) diff --git a/Traducteur3/edg_REP1300_FULL_PN.comm b/Traducteur3/edg_REP1300_FULL_PN.comm new file mode 100755 index 00000000..ee4744a9 --- /dev/null +++ b/Traducteur3/edg_REP1300_FULL_PN.comm @@ -0,0 +1,159 @@ + +REF=Assembly(assembly_type='REF',); + +U1=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,4.2412,), + size=0.033,),),); + +UGD=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,), + size=0.033,),),); + +RB=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N1=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N2=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4226, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +G1=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +G2=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +techno_data=Techno_data(assembly_list=(REF,U1,UGD,), + rodbank_list=(RB,G1,G2,N1,N2,), + radial_description=_F(nb_assembly=15, + xaxis=('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',), + yaxis= + ('RS','15','14','13','12','11', + '10','09','08','07','06','05','04','03','02','01','RN',), + assembly_map=((REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,),(REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,),(REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF,REF,REF,),(REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD,REF,REF,),(REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF,REF,),(REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,),(REF,U1,UGD,U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,),(REF,U1,U1,UGD,UGD,UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,),(REF,U1,U1,U1,U1,U1,U1,UGD,UGD,UGD,U1,U1,U1,U1,U1,U1,REF,),(REF,U1,U1,UGD,UGD,UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,),(REF,U1,UGD,U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,),(REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,),(REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF,REF,),(REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD,REF,REF,),(REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF,REF,REF,),(REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,),(REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,),), + rod_map= + (['#','#','#','#','#','#','#', + '#','#','#','#','#','#','#','#','#','#'],['#','#','#','#','#','.', + '.','.','.','.','.','.','#','#','#','#','#'],['#','#','#','.','.', + '.','.','.','RB','.','.','.','.','.','#','#','#'],['#','#','.','.', + '.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'],['#','#', + '.','.','N1','.','.','.','G1','.','.','.','N1','.','.','#','#'], + ['#','.','.','G2','.','RB','.','.','.','.','.','RB','.','G2','.', + '.','#'],['#','.','.','.','.','.','.','.','N1','.','.','.','.','.', + '.','.','#'],['#','.','.','N2','.','.','.','.','.','.','.','.','.', + 'N2','.','.','#'],['#','.','RB','.','G1','.','N1','.','RB','.','N1', + '.','G1','.','RB','.','#'],['#','.','.','N2','.','.','.','.','.', + '.','.','.','.','N2','.','.','#'],['#','.','.','.','.','.','.','.', + 'N1','.','.','.','.','.','.','.','#'],['#','.','.','G2','.','RB', + '.','.','.','.','.','RB','.','G2','.','.','#'],['#','#','.','.', + 'N1','.','.','.','G1','.','.','.','N1','.','.','#','#'],['#','#', + '.','.','.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'], + ['#','#','#','.','.','.','.','.','RB','.','.','.','.','.','#','#', + '#'],['#','#','#','#','#','.','.','.','.','.','.','.','#','#','#', + '#','#'],['#','#','#','#','#','#','#','#','#','#','#','#','#','#', + '#','#','#'],), + BU_map= + ([0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,0.0,0.0, + 40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0, + 40.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0, + 0.0,40.0,20.0,20.0,20.0,40.0,20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0, + 0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0, + 20.0,0.0,0.0,0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0, + 20.0,40.0,20.0,40.0,40.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,20.0,40.0, + 20.0,40.0,20.0,20.0,60.0,20.0,20.0,40.0,20.0,40.0,20.0,0.0,0.0],[0.0, + 0.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0, + 0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0, + 40.0,40.0,0.0,0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,20.0,20.0,20.0,40.0, + 20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0, + 20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,0.0, + 40.0,0.0,0.0,40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],),), + axial_description=_F(lower_refl_size=0.21, + upper_refl_size=0.21,), + nominal_power=4000000000.0, + Fuel_power_fraction=0.974, + by_pass=0.07, + core_volumic_flowrate=90940.0,); + +neutro_model=Model_data(physics='Neutronics', + scale='component', + code='APOLLO3', + radial_meshing=_F(flux_solver='subdivision', + flux_subdivision=2, + feedback_solver='subdivision', + feedback_subdivision=1,), + axial_meshing=_F(lower_refl=2, + fuel=42, + upper_refl=2,),); + +thermo_model=Model_data(physics='Thermalhydraulics', + scale='component', + code='FLICA4', + radial_meshing=_F(fluid='subdivision', + fluid_subdivision=1, + pellet=8, + clad=2,), + axial_meshing=_F(lower_refl=1, + fuel=40, + upper_refl=1,),); + +scenario_data=Scenario_data(initial_power=0.1, + initial_power_unit='% Nominal power', + initial_core_inlet_temperature=290.0, + initial_boron_concentration=1300.0, + initial_inlet_pressure=160.2, + initial_outlet_pressure=157.2, + initial_rod_positions=(('Rodbank@RB',201),('Rodbank@N1',96),('Rodbank@N2',260),('Rodbank@G1',260),('Rodbank@G2',260),('Rodcluster@H08',260)), + scenario_type='RIA', + ejected_rod='H02', + rod_position_program=((0.0,0),(0.1,260)), + SCRAM='YES', + SCRAM_power=1130.0, + complete_SCRAM_time=1.0, + post_processing=(('Fuel temperature@Thermalhydraulics','MAX'),('Neutronic power@Neutronics','SUM'),('Fuel temperature@Thermalhydraulics','MED'),('Neutronic power@Neutronics','MED')),); + +Genere_Une_Erreur_Traduction(essai='3',); +#VERSION_CATALOGUE:V_0:FIN VERSION_CATALOGUE +#CHECKSUM:f62a6f71fcde9f983479fc749f7e334c -:FIN CHECKSUM \ No newline at end of file diff --git a/Traducteur3/inseremocle.py b/Traducteur3/inseremocle.py new file mode 100644 index 00000000..19dc1ceb --- /dev/null +++ b/Traducteur3/inseremocle.py @@ -0,0 +1,289 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +import logging +from Traducteur.parseur import FactNode +from Traducteur.load import jdcSet +from Traducteur.dictErreurs import ecritErreur +from Traducteur import regles +debug=0 + + +#----------------------------------- +def insereMotCle(jdc,recepteur,texte): +#----------------------------------- +# appelle la methode selon la classe +# du recepteur + + if recepteur.name not in jdcSet : return + if recepteur.__class__.__name__ == "Command" : + if debug : print (" Ajout de ", texte, "dans la commande : " ,recepteur.name ) + insereMotCleDansCommande(jdc,recepteur,texte) + return + + +#-------------------------------------------- +def insereMotCleDansCommande(jdc,command,texte): +#--------------------------------------------- +# insere le texte comme 1er mot cle +# de la commande + if command.name not in jdcSet : return + if debug : print ("insereMotCle ", texte , " dans ", command.name) + numcol=chercheDebut1Mot(jdc,command) + if numcol > 0 : + jdc.splitLine(command.lineno,numcol) + indice = -1 + while texte[indice] == " " or texte[indice] == "\n": + indice = indice -1 + if texte[indice] != "," : texte=texte+"," + texteinfo=texte + texte=texte+'\n' + jdc.addLine(texte,command.lineno) + logging.info("Insertion de : %s ligne %d", texteinfo,command.lineno) + if numcol > 0 : # Les mots clefs etaient sur la meme ligne + jdc.joinLineandNext(command.lineno) + +#------------------------------------------------------------- +def insereMotCleDansFacteur(jdc,facteur,texte,plusieursFois=True): +#---------------------------------------------------------------- + if debug : print ("insereMotCle ", texte , " dans ", facteur.name) + + if texte[-1] == "\n" : texte=texte[0:-1] + ancien=jdc.getLine(facteur.lineno) + + # On va chercher la derniere ) pour ajouter avant + # on va verifier s il il y a un , avant + # si le texte ne finit pas par une "," + # on en met une + + indice = -1 + while texte[indice] == " " : + indice = indice -1 + if texte[indice] != "," : + texte=texte+"," + if (texte.find("#") > -1) and (texte.find("#") < texte.find(",")) : + texte=texte+"\n," + + texteinfo=texte + texte=texte+"\n" + + ligneaCouper=facteur.lineno + while ligneaCouper < facteur.endline + 1 : + trouve=0 + trouveF=0 + trouveP=0 + indiceDeCoupe=0 + while ancien.find("_F") > 0 : + longueur=len(ancien) + indice=ancien.find("_F") + indiceParcours=0 + # pour ne pas tenir compte des autres noms + # Attention si 2 MCF sur la meme ligne (la 1ere) + if trouveF == 0 : + if ((ligneaCouper!=facteur.lineno) or ((ancien.find(facteur.name) < indice ) or (ancien.find(facteur.name) < 0))) : + trouveF=1 + indiceParcours=indice + 2 + # attention pour regler DEFI_FONCTION .. + else : + indiceDeCoupe=indiceDeCoupe+indice+2 + ancien=ancien[indice +2:] + continue + if trouveF == 1 : + indiceDeCoupe=indiceDeCoupe+indice + # print "indice de Parcours" ,indiceParcours + # print ancien[indiceParcours] + # print ancien[indiceParcours+1] + # print ancien[indiceParcours+2] + while indiceParcours < longueur : + if ancien[indiceParcours] == "(" : + trouveP=1 + # print ("trouve". + break + if ancien[indiceParcours] != " " : + trouveP=0 + # print ("mouv") + break + indiceParcours = indiceParcours+1 + trouve = trouveP * trouveF + if trouve : break + ancien=ancien[indice+1:] + if trouve : + debut=indiceDeCoupe + 3 + if(jdc.getLine(ligneaCouper)[debut:]!="\n"): + jdc.splitLine(ligneaCouper,debut) + jdc.addLine(texte,ligneaCouper) + jdc.joinLineandNext(ligneaCouper) + logging.info("Insertion de %s ligne %d", texteinfo,ligneaCouper) + + # Gestion du cas particulier du mot clef facteur vide + if facteur.childNodes == []: + jdc.joinLineandNext(facteur.lineno) + + ligneaCouper=ligneaCouper+1 + ancien=jdc.getLine(ligneaCouper) + if not plusieursFois and trouve : break + + +#----------------------------------- +def chercheDebut1Mot(jdc,command): +#----------------------------------- +# Retourne le numero de colonne si le 1er mot clef est +# sur la meme ligne que le mot clef facteur +# -1 sinon + assert (command.childNodes != []) + debut=-1 + node1=command.childNodes[0] + if hasattr(node1,"lineno"): + if node1.lineno == command.lineno : + debut=node1.colno + else: + debut=chercheDebutFacteur(jdc,command) + if debut == -1 and debug : print ("attention!!! pb pour trouver le debut dans ", command) + return debut + +#----------------------------------- +def chercheDebutFacteur(jdc,facteur): +#----------------------------------- + debut=-1 + ligne=jdc.getLines()[facteur.lineno] + debut=ligne.find("_F") + if debut > -1 : debut=debut + 3 + return debut + + +#----------------------------------- +def chercheAlignement(jdc,command): +#----------------------------------- +# Retourne le nb de blanc +# pour aligner sur le 1er mot clef fils + assert (command.childNodes != []) + node1=command.childNodes[0] + nbBlanc=node1.colno + return " "*nbBlanc + +#--------------------------------------------------------------------------------------------------------- +def chercheOperInsereFacteur(jdc,nomcommande,nouveau,ensemble=regles.SansRegle, estunFacteur=1, erreur=0): +#-------------------------------------------------------------------------------------------------------- +# Cherche l oper +# cree le texte +# appelle insereMotCle pour ajouter le texte +# + boolChange=0 + if estunFacteur : + texte=nouveau+"=_F()," + else : + texte=nouveau + if nomcommande not in jdcSet : return + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != nomcommande:continue + if ensemble.verif(c) == 0 : continue + if erreur : ecritErreur((nomcommande,nouveau),c.lineno) + boolChange=1 + insereMotCle(jdc,c,texte) + if boolChange : jdc.reset(jdc.getSource()) + +#---------------------------------------------------------------------------------------- +def chercheOperInsereFacteurSiRegle(jdc,nomcommande,nouveau,liste_regles, estunFacteur=1): +#---------------------------------------------------------------------------------------- +# Cherche l oper +# cree le texte +# appelle insereMotCle pour ajouter le texte +# + if nomcommande not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + chercheOperInsereFacteur(jdc,nomcommande,nouveau,mesRegles,estunFacteur) + +#---------------------------------------------------------------------------------------- +def chercheOperInsereMotCleSiRegle(jdc,nomcommande,nouveau,liste_regles, estunFacteur=0): +#---------------------------------------------------------------------------------------- + if nomcommande not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + chercheOperInsereFacteur(jdc,nomcommande,nouveau,mesRegles,estunFacteur) + + +#--------------------------------------------------------------------------------------------------------- +def chercheOperInsereFacteurSiRegleAvecAvertissement(jdc,nomcommande,nouveau,liste_regles, estunFacteur=1): +#--------------------------------------------------------------------------------------------------------- + if nomcommande not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + chercheOperInsereFacteur(jdc,nomcommande,nouveau,mesRegles,estunFacteur,erreur=1) + +#------------------------------------------------------------------------------------------------- +def ajouteMotClefDansFacteur(jdc,commande,fact,nouveau,ensemble=regles.SansRegle, estunFacteur=0): +#------------------------------------------------------------------------------------------------- +# Cherche la commande +# Cherche le MCF +# cree le texte +# appelle insereMotCle pour ajouter le texte +# + if commande not in jdcSet : return + if estunFacteur : + texte=nouveau+"=_F()," + else : + texte=nouveau + commands= jdc.root.childNodes[:] + commands.reverse() + boolChange=0 + for c in commands: + if c.name != commande : continue + for mcF in c.childNodes: + if mcF.name != fact : continue + if ensemble.verif(c) == 0 : continue + boolChange=1 + insereMotCleDansFacteur(jdc,mcF,texte) + if boolChange : jdc.reset(jdc.getSource()) + +#------------------------------------------------------------------------------------------- +def ajouteMotClefDansFacteurSiRegle(jdc,commande,fact,nouveau,liste_regles,estunFacteur=0): +#------------------------------------------------------------------------------------------- +# + if commande not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + ajouteMotClefDansFacteur(jdc,commande,fact,nouveau,mesRegles,estunFacteur) + +#------------------------------------------------------------------------------------------- +def ajouteMotClefDansFacteurCourantSiRegle(jdc,commande,fact,nouveau,liste_regles): +#------------------------------------------------------------------------------------------- +# + if commande not in jdcSet : return + ensemble=regles.ensembleRegles(liste_regles) + commands= jdc.root.childNodes[:] + commands.reverse() + boolChange=0 + for c in commands: + if c.name != commande : continue + for mcF in c.childNodes: + if mcF.name != fact : continue + l=mcF.childNodes[:] + l.reverse() + for ll in l: + if ensemble.verif(ll) == 0 : continue + boolChange=1 + n=ll.childNodes[0] + ligneaCouper=n.lineno-1 + numcol=n.colno + jdc.splitLine(ligneaCouper+1,numcol) + texte=nouveau+",\n" + jdc.addLine(texte,ligneaCouper+1) + logging.info("Insertion de %s dans %s : ligne %d", nouveau,c.name,ligneaCouper+1) + if numcol > 0 : + jdc.joinLineandNext(ligneaCouper+1) + if boolChange : jdc.reset(jdc.getSource()) diff --git a/Traducteur3/load.py b/Traducteur3/load.py new file mode 100644 index 00000000..f5aa5b52 --- /dev/null +++ b/Traducteur3/load.py @@ -0,0 +1,146 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import os +import re +from Traducteur import parseur +from Traducteur.mocles import parseKeywords + +jdcSet=set() + + +class JDCTrad: + """Cet objet conserve toutes les informations relatives a un fichier de commandes .comm""" + + def __init__(self,src,atraiter): + #---------------------------------------- + self.atraiter=atraiter + self.init(src,atraiter) + commands= self.root.childNodes[:] + commands.reverse() + for c in commands: + jdcSet.add(c.name) + + def init(self,src,atraiter): + #--------------------------- + # construction de self.lines + self.root=parseur.parser(src,atraiter) + self.lines=src.splitlines(1) + + def parseKeywords(self): + #----------------------- + # construction de fils (cf mocles.py) + parseKeywords(self.root) + + def reset(self,src): + #----------------------- + # reconstruction + self.init(src,self.atraiter) + self.parseKeywords() + + def getSource(self): + #----------------------- + # retourne la concatenation de + # toutes les lignes + return "".join(self.getLines()) + + def getLine(self,linenum): + #----------------------- + # retourne la linenumieme ligne + return self.getLines()[linenum-1] + + def getLines(self): + #---------------------------- + # retourne toutes les lignes + return self.lines + + def addLine(self,ligne,numero) : + #---------------------------- + # insere le texte contenu dans ligne + # dans la liste self.lines au rang numero + Ldebut=self.lines[0:numero] + Lmilieu=[ligne,] + Lfin=self.lines[numero:] + self.lines=Ldebut+Lmilieu+Lfin + + + def splitLine(self,numeroLigne,numeroColonne) : + #---------------------------------------------- + # coupe la ligne numeroLigne en 2 a numeroColonne + # ajoute des blancs en debut de 2nde Ligne pour + # aligner + numeroLigne = numeroLigne -1 + Ldebut=self.lines[0:numeroLigne] + if len(self.lines) > numeroLigne : + Lfin=self.lines[numeroLigne+1:] + else : + Lfin=[] + Lsplit=self.lines[numeroLigne] + LigneSplitDebut=Lsplit[0:numeroColonne]+"\n" + LigneSplitFin=" "*numeroColonne+Lsplit[numeroColonne:] + Lmilieu=[LigneSplitDebut,LigneSplitFin] + + self.lines=Ldebut+Lmilieu+Lfin + + def joinLineandNext(self,numeroLigne) : + #-------------------------------------- + # concatene les lignes numeroLigne et numeroLigne +1 + # enleve les blancs de debut de la ligne (numeroLigne +1) + Ldebut=self.lines[0:numeroLigne-1] + if len(self.lines) > numeroLigne : + Lfin=self.lines[numeroLigne+1:] + else : + Lfin=[] + + ligneMilieuDeb=self.lines[numeroLigne - 1 ] + ligneMilieuDeb=ligneMilieuDeb[0:-1] + ligneMilieuFin=self.lines[numeroLigne] + for i in range(len(ligneMilieuFin)): + if ligneMilieuFin[i] != " " : + ligneMilieuFin=ligneMilieuFin[i:] + break + Lmilieu=[ligneMilieuDeb+ligneMilieuFin,] + + self.lines=Ldebut+Lmilieu+Lfin + + def supLignes(self,debut,fin): + #------------------------ + Ldebut=self.lines[0:debut-1] + Lfin=self.lines[fin:] + self.lines=Ldebut+Lfin + + def remplaceLine(self,numeroLigne,nouveauTexte) : + #------------------------------------------------ + self.lines[numeroLigne]=nouveauTexte + +def getJDC(filename,atraiter): +#---------------------------- +# lit le JDC + f=open(filename) + src=f.read() + f.close() + jdc=JDCTrad(src,atraiter) + return jdc + +def getJDCFromTexte(texte,atraiter): +#----------------------------------- +# lit le JDC + jdc=JDCTrad(texte,atraiter) + return jdc diff --git a/Traducteur3/log.py b/Traducteur3/log.py new file mode 100644 index 00000000..21c4ab61 --- /dev/null +++ b/Traducteur3/log.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import logging +import os +logger=logging.getLogger() + +def initialise(flog=None): + if flog == None : + MonHome=os.environ['HOME'] + MaDir=MonHome+"/Eficas_install" + try : + os.mkdir(MaDir) + except : + pass + try : + os.listdir(MaDir) + flog=MaDir+"/convert.log" + except : + flog='/tmp/convert.log' + + hdlr=logging.FileHandler(flog,'w') + formatter = logging.Formatter('%(levelname)s: %(message)s') + hdlr.setFormatter(formatter) + logger.addHandler(hdlr) + logger.setLevel(logging.INFO) + return hdlr + + +def ferme (hdlr) : + logger.removeHandler(hdlr) diff --git a/Traducteur3/log.txt b/Traducteur3/log.txt new file mode 100644 index 00000000..85f57675 --- /dev/null +++ b/Traducteur3/log.txt @@ -0,0 +1 @@ +WARNING: ligne 159 : Message pour test de genereErreurpourCommande diff --git a/Traducteur3/mocles.py b/Traducteur3/mocles.py new file mode 100644 index 00000000..0c890f8b --- /dev/null +++ b/Traducteur3/mocles.py @@ -0,0 +1,168 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +#import compiler +import ast +import types +from Traducteur.parseur import Keyword, FactNode, lastParen, lastParen2,maskStringsAndComments +from Traducteur.visiteur import KeywordFinder, NodeVisitor +from Traducteur.utils import indexToCoordinates, lineToDict, dictToLine + +debug=0 + +#------------------------ +def parseFact(match,c,kw): +#------------------------ + submatch=match[2] + lastpar=match[0]+lastParen(c.src[match[0]:]) + #if type(submatch[0][0]) ==types.IntType: + if isinstance(submatch[0][0], int) : + #mot cle facteur isole + no=FactNode() + kw.addChild(no) + for ii in range(len(submatch)-1): + e=submatch[ii] + x,y=indexToCoordinates(c.src,e[0]) + lineno=y+c.lineno + colno=x + x,y=indexToCoordinates(c.src,submatch[ii+1][0]) + endline=y+c.lineno + endcol=x + no.addChild(Keyword(e[1],lineno,colno,endline,endcol)) + #last one + e=submatch[-1] + x,y=indexToCoordinates(c.src,e[0]) + lineno=y+c.lineno + colno=x + x,y=indexToCoordinates(c.src,lastpar-1) + endline=y+c.lineno + endcol=x + no.addChild(Keyword(e[1],lineno,colno,endline,endcol)) + else: + #mot cle facteur multiple + ii=0 + for l in submatch: + lastpar=l[0][0]+lastParen2(c.src[l[0][0]:]) + ii=ii+1 + no=FactNode() + kw.addChild(no) + for j in range(len(l)-1): + e=l[j] + x,y=indexToCoordinates(c.src,e[0]) + lineno=y+c.lineno + colno=x + x,y=indexToCoordinates(c.src,l[j+1][0]) + endline=y+c.lineno + endcol=x + no.addChild(Keyword(e[1],lineno,colno,endline,endcol)) + #last one + e=l[-1] + x,y=indexToCoordinates(c.src,e[0]) + lineno=y+c.lineno + colno=x + x,y=indexToCoordinates(c.src,lastpar-1) + endline=y+c.lineno + endcol=x + no.addChild(Keyword(e[1],lineno,colno,endline,endcol)) + + +#----------------------- +def parseKeywords(root): +#----------------------- + """A partir d'un arbre contenant des commandes, ajoute les noeuds + fils correspondant aux mocles de la commande + """ + debug=1 + #traceback.print_stack(limit=5) + + matchFinder=KeywordFinder() + + for c in root.childNodes: + if debug : print ('parse -------------- ', c.name) + maskedsrc=maskStringsAndComments(c.src) + #on supprime seulement les blancs du debut pour pouvoir compiler + #meme si la commande est sur plusieurs lignes seul le debut compte + #ast=compiler.parse(c.src.lstrip()) + #print ast + monAst=ast.parse(c.src.lstrip()) + if debug : print (ast.dump(monAst)) + #Ne pas supprimer les blancs du debut pour avoir les bons numeros de colonne + matchFinder.reset(maskedsrc) + matchFinder.visit(monAst) + if debug : print ("matchFinder.matches", matchFinder.matches) + if len(matchFinder.matches) > 1: + # plusieurs mocles trouves : + # un mocle commence au debut du keyword (matchFinder.matches[i][0]) + # et finit juste avant le keyword suivant + # (matchFinder.matches[i+1][0]]) + for i in range(len(matchFinder.matches)-1): + if debug:print ("texte:",c.src[matchFinder.matches[i][0]:matchFinder.matches[i+1][0]]) + x,y=indexToCoordinates(c.src,matchFinder.matches[i][0]) + lineno=y+c.lineno + colno=x + x,y=indexToCoordinates(c.src,matchFinder.matches[i+1][0]) + endline=y+c.lineno + endcol=x + if debug:print (matchFinder.matches[i][0],matchFinder.matches[i][1],lineno,colno,endline,endcol) + kw=Keyword(matchFinder.matches[i][1],lineno,colno,endline,endcol) + c.addChild(kw) + submatch= matchFinder.matches[i][2] + if submatch: + parseFact(matchFinder.matches[i],c,kw) + + # dernier mocle : + # il commence au debut du dernier keyword + # (matchFinder.matches[i+1][0]) et + # finit avant la parenthese fermante de la commande (c.lastParen) + + if debug:print ("texte:",c.src[matchFinder.matches[i+1][0]:c.lastParen]) + x,y=indexToCoordinates(c.src,matchFinder.matches[i+1][0]) + lineno=y+c.lineno + colno=x + x,y=indexToCoordinates(c.src,c.lastParen) + endline=y+c.lineno + endcol=x + if debug:print (matchFinder.matches[i+1][0],matchFinder.matches[i+1][1],lineno,colno,endline,endcol) + kw=Keyword(matchFinder.matches[i+1][1],lineno,colno,endline,endcol) + c.addChild(kw) + submatch= matchFinder.matches[i+1][2] + if submatch: + parseFact(matchFinder.matches[i+1],c,kw) + + elif len(matchFinder.matches) == 1: + #un seul mocle trouve : + # il commence au debut du keyword (matchFinder.matches[0][0]) et + # finit juste avant la parenthese fermante de la + # commande (c.lastParen) + if debug:print ("texte:",c.src[matchFinder.matches[0][0]:c.lastParen]) + x,y=indexToCoordinates(c.src,matchFinder.matches[0][0]) + lineno=y+c.lineno + colno=x + x,y=indexToCoordinates(c.src,c.lastParen) + endline=y+c.lineno + endcol=x + if debug:print ( matchFinder.matches[0][0],matchFinder.matches[0][1],lineno,colno,endline,endcol) + kw=Keyword(matchFinder.matches[0][1],lineno,colno,endline,endcol) + c.addChild(kw) + submatch= matchFinder.matches[0][2] + if submatch: + parseFact(matchFinder.matches[0],c,kw) + else: + pass diff --git a/Traducteur3/movemocle.py b/Traducteur3/movemocle.py new file mode 100644 index 00000000..4a43752f --- /dev/null +++ b/Traducteur3/movemocle.py @@ -0,0 +1,346 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import logging +from Traducteur import removemocle +from Traducteur import inseremocle +from Traducteur.parseur import lastParen +from Traducteur.load import jdcSet +debug=0 + +#----------------------------------------------------- +def moveMotCleFromFactToFather(jdc,command,fact,mocle): +#----------------------------------------------------- +# exemple type : IMPR_GENE + + if command not in jdcSet : return + boolChange=0 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != command:continue + boolchange_c=0 + for mc in c.childNodes: + if mc.name != fact:continue + l=mc.childNodes[:] + for ll in l: + for n in ll.childNodes: + if n.name != mocle:continue + # test boolchange_c :il faut le faire une seule fois par commande sinon duplication du mot clé + if boolchange_c != 0 :continue + if debug : print ("Changement de place :", n.name, n.lineno, n.colno) + MonTexte=n.getText(jdc); + boolChange=1 + boolchange_c=1 + inseremocle.insereMotCle(jdc,c,MonTexte) + logging.info("Changement de place %s ligne %s ",n.name, n.lineno) + + if boolChange : jdc.reset(jdc.getSource()) + removemocle.removeMotCleInFact(jdc,command,fact,mocle) + + +#---------------------------------------------------------------------------- +def moveMotCleFromFactToFactMulti(jdc,oper,factsource,mocle,liste_factcible): +#---------------------------------------------------------------------------- +# exemple type STAT_NON_LINE et RESI_INTER_RELA + for factcible in liste_factcible : + moveMotCleFromFactToFact(jdc,oper,factsource,mocle,factcible) + removemocle.removeMotCleInFact(jdc,oper,factsource,mocle) + + +#---------------------------------------------------------------------------- +def moveMotCleFromFactToFact(jdc,oper,factsource,mocle,factcible): +#---------------------------------------------------------------------------- + if oper not in jdcSet : return + if debug : print ("moveMotCleFromFactToFact pour " ,oper,factsource,mocle,factcible) + boolChange=0 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != oper : continue + cible=None + for mc in c.childNodes: + if mc.name != factcible : + continue + else : + cible=mc + break + if cible==None : + if debug : print ("Pas de changement pour ", oper, " ", factsource, " ",mocle, "cible non trouvée") + continue + + for mc in c.childNodes: + source=None + if mc.name != factsource: + continue + else : + source=mc + break + if source==None : + if debug : print ("Pas de changement pour ", oper, " ", factsource, " ",mocle, "source non trouvée") + continue + + if debug : print ("Changement pour ", oper, " ", factsource, " ",mocle, "cible et source trouvées") + l=source.childNodes[:] + for ll in l: + for n in ll.childNodes: + if n.name != mocle:continue + MonTexte=n.getText(jdc); + inseremocle.insereMotCleDansFacteur(jdc,cible,MonTexte) + boolChange=1 + logging.info("Changement de place %s ligne %s vers %s",n.name, n.lineno, cible.name) + if boolChange : jdc.reset(jdc.getSource()) + removemocle.removeMotCleInFact(jdc,oper,factsource,mocle) + + + + +#----------------------------------------------------------------------- +def moveMotClefInOperToFact(jdc,oper,mocle,factcible,plusieursFois=True): +#----------------------------------------------------------------------- +# Attention le cas type est THETA_OLD dans calc_G + + if oper not in jdcSet : return + if debug : print ( "movemocleinoper pour " ,oper,mocle,factcible) + boolChange=9 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != oper : continue + cible=None + for mc in c.childNodes: + if mc.name != factcible : + continue + else : + cible=mc + break + if cible==None : + if debug : print ("Pas de changement pour ", oper, " ", factcible, " ", "cible non trouvée") + continue + + source=None + for mc in c.childNodes: + if mc.name != mocle: + continue + else : + source=mc + break + if source==None : + if debug : print ("Pas de changement pour ", oper, " ", mocle, " source non trouvée") + continue + MonTexte=source.getText(jdc); + boolChange=1 + inseremocle.insereMotCleDansFacteur(jdc,cible,MonTexte,plusieursFois) + if boolChange : jdc.reset(jdc.getSource()) + removemocle.removeMotCle(jdc,oper,mocle) + +#------------------------------------------------------ +def copyMotClefInOperToFact(jdc,oper,mocle,factcible): +#------------------------------------------------------ + + if oper not in jdcSet : return + if debug : print ("movemocleinoper pour " ,oper,mocle,factcible) + boolChange=9 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != oper : continue + cible=None + for mc in c.childNodes: + if mc.name != factcible : + continue + else : + cible=mc + break + if cible==None : + if debug : print ("Pas de changement pour ", oper, " ", factcible, " ", "cible non trouvée") + continue + + source=None + for mc in c.childNodes: + if mc.name != mocle: + continue + else : + source=mc + break + if source==None : + if debug : print ("Pas de changement pour ", oper, " ", mocle, " source non trouvée") + continue + MonTexte=source.getText(jdc); + boolChange=1 + inseremocle.insereMotCleDansFacteur(jdc,cible,MonTexte) + if boolChange : jdc.reset(jdc.getSource()) + +#---------------------------------------------------------------------- +def moveMCFToCommand(jdc,command,factsource,commandcible,factcible): +#---------------------------------------------------------------------- +# exemple CONTACT en 10 +# CONTACT devient commande DEFI_CONTACT/ZONE +# + if command not in jdcSet : return + boolChange=0 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != command : continue + for mcF in c.childNodes: + if mcF.name != factsource : continue + l=mcF.getText(jdc) + texte=l.replace(factsource,factcible) + texte='xxxx='+commandcible+'('+texte+')\n' + jdc.splitLine(c.lineno,0) + jdc.addLine(texte,c.lineno) + logging.info("Deplacement de %s dans %s ligne %s",factsource,commandcible,c.lineno) + boolChange=1 + if boolChange : + jdc.reset(jdc.getSource()) + jdcSet.add(commandcible) + +#----------------------------------------------------- +def fusionMotCleToFact(jdc,command,listeMc,factcible,defaut=0): +#----------------------------------------------------- + if command not in jdcSet : return + boolChange=0 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != command : continue + list_val=[] + trouveUnMC=0 + for mc in c.childNodes: + if mc.name not in listeMc : continue + val=mc.getText(jdc).split("=")[1].split(",")[0] + list_val.append(val) + trouveUnMC=1 + if trouveUnMC : + TexteMC=factcible+"=(" + for val in list_val : TexteMC=TexteMC+val+"," + TexteMC=TexteMC[:-1]+")," + inseremocle.insereMotCle(jdc,c,TexteMC) + jdc.reset(jdc.getSource()) + boolChange=1 + if boolChange : + jdc.reset(jdc.getSource()) + for mc in listeMc : + removemocle.removeMotCle(jdc,command,mc) + jdc.reset(jdc.getSource()) + +#----------------------------------------------------- +def fusionMotCleInFact(jdc,command,fact,listeMc,new_name,defaut=0): +#----------------------------------------------------- + if command not in jdcSet : return + boolChange=0 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != command : continue + list_val=[] + trouveUnMC=0 + for mcF in c.childNodes: + if mcF.name != fact: continue + for ll in mcF.childNodes[:]: + for mc in ll.childNodes: + if mc.name not in listeMc : continue + val=mc.getText(jdc).split("=")[1].split(",")[0] + list_val.append(val) + trouveUnMC=1 + if trouveUnMC : + TexteMC=new_name+"=("+",".join(list_val)+")," + inseremocle.insereMotCleDansFacteur(jdc,mcF,TexteMC) + jdc.reset(jdc.getSource()) + boolChange=1 + if boolChange : + jdc.reset(jdc.getSource()) + for mc in listeMc : + removemocle.removeMotCleInFact(jdc,command,fact,mc) + jdc.reset(jdc.getSource()) + +#----------------------------------------------------- +def fusionMCFToMCF(jdc,command,listeMcF,factcible,defaut=0): +#----------------------------------------------------- + if command not in jdcSet : return + boolChange=0 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != command : continue + list_val=[] + trouveUnMC=0 + TexteMC=factcible+'=(' + esp1=' '*len(TexteMC) + pp=0 + for mcF in c.childNodes: + if mcF.name not in listeMcF : continue + trouveUnMC=1 + val=mcF.getText(jdc) + # esp=esp1+(inseremocle.chercheDebutFacteur(jdc,mcF)-len(mcF.name))*' ' + esp=esp1+inseremocle.chercheAlignement(jdc,c) + # print len(esp) + for ll in mcF.childNodes[:]: + # if(pp>0): TexteMC+=esp + TexteMC+='_F(' + for mc in ll.childNodes: + val=mc.getText(jdc) + TexteMC+=val+'\n '+esp + # if('#' in val.split('\n')[-1]): TexteMC+='\n'+esp+' ' + lastkey = ''.join(val.split('=')[-1].split(' ')) + if((len(lastkey.split('(')) - len(lastkey.split(')'))) >= 0): + TexteMC += '),\n'+esp + # TexteMC+='),' + TexteMC+='),' + # print TexteMC + if(trouveUnMC): + inseremocle.insereMotCle(jdc,c,TexteMC) + jdc.reset(jdc.getSource()) + boolChange=1 + if boolChange : + jdc.reset(jdc.getSource()) + for mcF in listeMcF : + removemocle.removeMotCle(jdc,command,mcF) + jdc.reset(jdc.getSource()) + + + +#-------------------------------------------------------------------- +def eclaMotCleToFact(jdc,command,motcle,mot1,mot2,defaut=0): +#-------------------------------------------------------------------------- +# exemple STA10 pesanteur devient MCF avec eclatement des valeurs dans les MC +# On suppose que le MC est sur une seule ligne + if command not in jdcSet : return + boolChange=0 + for c in jdc.root.childNodes: + if c.name != command : continue + trouveUnMC=0 + for mc in c.childNodes: + if mc.name != motcle : continue + trouveUnMC=1 + TexteMC=mc.getText(jdc) + indexLigneGlob=mc.lineno-1 + MaLigneGlob=jdc.getLines()[indexLigneGlob] + Ligne=TexteMC.split('(')[1].split(')')[0].split(',') + motcle1=mot1+"="+Ligne[0] + motcle2=mot2+"=("+Ligne[1]+','+Ligne[2]+','+Ligne[3]+')' + texte=motcle+'=_F('+motcle1+','+motcle2+')' + num=lastParen(TexteMC) + Nouveau=MaLigneGlob.replace(TexteMC[0:num],texte) + jdc.getLines()[indexLigneGlob]=Nouveau + logging.info("Transformation de %s dans %s ligne %s",motcle,command,c.lineno) + boolChange=1 + if boolChange : jdc.reset(jdc.getSource()) diff --git a/Traducteur3/parseur.py b/Traducteur3/parseur.py new file mode 100644 index 00000000..2635b9ab --- /dev/null +++ b/Traducteur3/parseur.py @@ -0,0 +1,280 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +import re,string + +debug=0 + +escapedQuotesRE = re.compile(r"(\\\\|\\\"|\\\')") +stringsAndCommentsRE = \ + re.compile("(\"\"\".*?\"\"\"|'''.*?'''|\"[^\"]*\"|\'[^\']*\'|#.*?\n)", re.DOTALL) + +import six +if six.PY2 : + allchars = string.maketrans(u"", "") + allcharsExceptNewline = allchars[: allchars.index('\n')]+allchars[allchars.index('\n')+1:] + allcharsExceptNewlineTranstable = string.maketrans(allcharsExceptNewline, '*'*len(allcharsExceptNewline)) +else : + allchars=bytes.maketrans(b"",b"") + allcharsExceptNewline = allchars[: allchars.index(b'\n')]+allchars[allchars.index(b'\n')+1:] + allcharsExceptNewlineTranstable = bytes.maketrans(allcharsExceptNewline, b'*'*len(allcharsExceptNewline)) + + +#------------------------------ +def maskStringsAndComments(src): +#------------------------------ + """Remplace tous les caracteres dans commentaires et strings par des * """ + + src = escapedQuotesRE.sub("**", src) + allstrings = stringsAndCommentsRE.split(src) + # every odd element is a string or comment + for i in range(1, len(allstrings), 2): + if allstrings[i].startswith("'''")or allstrings[i].startswith('"""'): + allstrings[i] = allstrings[i][:3]+ \ + allstrings[i][3:-3].translate(allcharsExceptNewlineTranstable)+ \ + allstrings[i][-3:] + else: + allstrings[i] = allstrings[i][0]+ \ + allstrings[i][1:-1].translate(allcharsExceptNewlineTranstable)+ \ + allstrings[i][-1] + + return "".join(allstrings) + +#un nombre queconque de blancs,un nom,des blancs +pattern_oper = re.compile(r"^\s*(.*?=\s*)?([a-zA-Z_]\w*)(\s*)(\()(.*)",re.DOTALL) +pattern_proc = re.compile(r"^\s*([a-zA-Z_]\w*)(\s*)(\()(.*)",re.DOTALL) + +implicitContinuationChars = (('(', ')'), ('[', ']'), ('{', '}')) +linecontinueRE = re.compile(r"\\\s*(#.*)?$") +emptyHangingBraces = [0,0,0,0,0] + +#-------------------------------------- +class UnbalancedBracesException: pass +#-------------------------------------- + +#----------- +class Node: +#----------- + def __init__(self): + self.childNodes=[] + + def addChild(self,node): + self.childNodes.append(node) + + +#------------------- +class FactNode(Node): +#------------------- + pass + + +#------------------- +class JDCNode(Node): +#------------------- + def __init__(self,src): + Node.__init__(self) + self.src=src + +#------------------- +class Command(Node): +#------------------- + def __init__(self,name,lineno,colno,firstparen): + Node.__init__(self) + self.name=name + self.lineno=lineno + self.colno=colno + self.firstparen=firstparen + +#------------------- +class Keyword(Node): +#------------------- + def __init__(self,name,lineno,colno,endline,endcol): + Node.__init__(self) + self.name=name + self.lineno=lineno + self.colno=colno + self.endline=endline + self.endcol=endcol + + def getText(self,jdc): + if self.endline > self.lineno: + debut=jdc.getLines()[self.lineno-1][self.colno:] + fin = jdc.getLines()[self.endline-1][:self.endcol] + texte=debut + lignecourante=self.lineno + while lignecourante < self.endline -1 : + texte = texte + jdc.getLines()[lignecourante] + lignecourante = lignecourante + 1 + if chaineBlanche(fin) == 0 : + texte=texte + fin + if texte[-1] == "\n" : + texte=texte[0:-1] + else: + texte = jdc.getLines()[self.lineno-1][self.colno:self.endcol] + return texte + +#------------------------- +def chaineBlanche(texte) : +#------------------------- +# retourne 1 si la chaine est composee de " " +# retourne 0 sinon + bool = 1 ; + for i in range(len(texte)) : + if texte[i] != " " : bool = 0 + return bool + +#------------------- +def printNode(node): +#------------------- + if hasattr(node,'name'): + print (node.name) + else: + print ("pas de nom pour:",node) + for c in node.childNodes: + printNode(c) + +#------------------------ +def parser(src,atraiter): +#------------------------ + """Parse le texte src et retourne un arbre syntaxique (root). + + Cet arbre syntaxique a comme noeuds (childNodes) les commandes a traiter (liste atraiter) + """ + lines=src.splitlines(1) + maskedSrc=maskStringsAndComments(src) + maskedLines=maskedSrc.splitlines(1) + + root=JDCNode(src) + + # (a) dans un premier temps on extrait les commandes et on les insere + # dans un arbre (root) les noeuds fils sont stockes dans + # root.childNodes (liste) + lineno=0 + for line in maskedLines: + lineno=lineno+1 + if debug:print ("line",lineno,":",line) + m=pattern_proc.match(line) + if m and (m.group(1) in atraiter): + if debug:print (m.start(3),m.end(3),m.start(4)) + root.addChild(Command(m.group(1),lineno,m.start(1),m.end(3))) + else: + m=pattern_oper.match(line) + if m and (m.group(2) in atraiter): + root.addChild(Command(m.group(2),lineno,m.start(2),m.end(4))) + + #(b) dans un deuxieme temps , on recupere le texte complet de la commande + # jusqu'a la derniere parenthese fermante + + # iterateur sur les lignes physiques masquees + iterlines=iter(maskedLines) + + linenum=0 + for c in root.childNodes: + lineno=c.lineno + colno=c.colno # debut de la commande + while linenum < lineno: + line=iterlines.__next__() + linenum=linenum+1 + if linenum != lineno: + if debug:print ("line %s:"%linenum, line) + tmp = [] + hangingBraces = list(emptyHangingBraces) + hangingComments = 0 + while 1: + # update hanging braces + for i in range(len(implicitContinuationChars)): + contchar = implicitContinuationChars[i] + numHanging = hangingBraces[i] + + hangingBraces[i] = numHanging+line.count(contchar[0]) - \ + line.count(contchar[1]) + + hangingComments ^= line.count('"""') % 2 + hangingComments ^= line.count("'''") % 2 + + if hangingBraces[0] < 0 or hangingBraces[1] < 0 or hangingBraces[2] < 0: + raise UnbalancedBracesException() + + if linecontinueRE.search(line): + tmp.append(lines[linenum-1]) + elif hangingBraces != emptyHangingBraces: + tmp.append(lines[linenum-1]) + elif hangingComments: + tmp.append(lines[linenum-1]) + else: + tmp.append(lines[linenum-1]) + src="".join(tmp) + c.src=src + c.endline=linenum + decal=len(line)-line.rindex(')') + c.lastParen=len(src)-decal + if debug:print ("logical line %s %s:" % (c.lineno,c.endline),src) + break + line=iterlines.__next__() + linenum=linenum+1 + + return root + + +#----------------- +def lastParen(src): +#----------------- + """Retourne la position de la derniere parenthese fermante dans src a partir du debut de la string + + La string doit contenir la premiere parenthese ouvrante + """ + + src=maskStringsAndComments(src) + level=0 + i,n=0,len(src) + while i < n: + ch=src[i] + i=i+1 + if ch in ('(','['): + level=level+1 + if ch in (')',']'): + if level == 0: + raise UnbalancedBracesException() + level=level-1 + if level == 0: + #derniere parenthese fermante + return i + +#------------------- +def lastParen2(src): +#------------------- + """Retourne la position de la derniere parenthese fermante dans src a partir du debut de la string + + La string ne contient pas la premiere parenthese ouvrante + """ + src=maskStringsAndComments(src) + level=1 + i,n=0,len(src) + while i < n: + ch=src[i] + i=i+1 + if ch in ('(','['): + level=level+1 + if ch in (')',']'): + if level == 0: + raise UnbalancedBracesException() + level=level-1 + if level == 0: + #derniere parenthese fermante + return i diff --git a/Traducteur3/regles.py b/Traducteur3/regles.py new file mode 100644 index 00000000..a8f78215 --- /dev/null +++ b/Traducteur3/regles.py @@ -0,0 +1,524 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" +Définition des règles +""" + +debug = 0 + +#-------------------- +class ensembleRegles : +#-------------------- + """ + Ensemble des règles + """ + def __init__(self, liste_regles): + self.liste = [] + for item in liste_regles : + args, clefRegle = item + r = regle(clefRegle, args) + self.liste.append(r) + + def verif(self, commande) : + """ + Vérification + """ + bool = 1 + for regle in self.liste : + result = regle.verif(commande) + bool = bool*result + return bool + +#-------------------------------- +class pasDeRegle(ensembleRegles): +#-------------------------------- + """ + Pas de règle + """ + def __init__(self) : + pass + + def verif (self, commande) : + """ + Vérification + """ + return 1 + + +#------------ +class regle : +#------------ + """ + Règle + """ + def __init__(self, clef_regle, args): + self.fonction = dictionnaire_regle[clef_regle] + self.list_args = args + self.bool = 0 + + def verif(self, commande): + """ + Vérification + """ + f = self.fonction(self.list_args) + return f.verif(commande) + +#--------------------- +class existeMCFParmi : +#--------------------- + """ + Existence du mot-clé facteur parmi la liste + """ + def __init__(self, list_arg): + self.listeMCF = list_arg + + def verif(self, commande) : + """ + Vérification + """ + bool = 0 + for c in commande.childNodes : + if c.name in self.listeMCF : + bool = 1 + break + return bool + +#--------------------- +class nexistepasMCFParmi(existeMCFParmi) : +#--------------------- + """ + Existence du mot-clé facteur parmi la liste + """ + def __init__(self, list_arg): + self.listeMCF = list_arg + + def verif(self, commande) : + """ + Vérification + """ + bool = existeMCFParmi.verif(self, commande) + if bool : return 0 + return 1 + +#---------------------- +class existeMCsousMCF : +#---------------------- + """ + Existence du mot-clé simple sous le mot-clé facteur + """ + def __init__(self, list_arg): + self.liste = list_arg + self.MCF = self.liste[0] + self.MC = self.liste[1] + + def verif(self, commande): + """ + Vérification + """ + bool = 0 + for mcf in commande.childNodes : + if mcf.name != self.MCF : continue + l = mcf.childNodes[:] + l.reverse() + for ll in l: + for mc in ll.childNodes: + if mc.name != self.MC : continue + bool = 1 + return bool + +#---------------------- +class existeMCsousMCFcourant : +#---------------------- + """ + Existence du mot-clé simple sous le mot-clé facteur courant + """ + def __init__(self, list_arg): + self.liste = list_arg + self.MC = self.liste[0] + + def verif(self, mcf): + """ + Vérification + """ + bool = 0 + l = mcf.childNodes[:] + l.reverse() + for mc in l: + if mc.name != self.MC : continue + bool = 1 + return bool + +#----------------------------------------- +class nexistepasMCsousMCF(existeMCsousMCF): +#----------------------------------------- + """ + Absence du mot-clé simple sous le mot-clé facteur + """ + def __init__(self, list_arg): + existeMCsousMCF.__init__(self, list_arg) + + + def verif(self, commande): + """ + Vérification + """ + bool = existeMCsousMCF.verif(self, commande) + if bool : return 0 + return 1 + +#----------------------------------------- +class nexistepasMCsousMCFcourant(existeMCsousMCFcourant): +#----------------------------------------- + """ + Absence du mot-clé simple sous le mot-clé facteur courant + """ + def __init__(self, list_arg): + existeMCsousMCFcourant.__init__(self, list_arg) + + + def verif(self, commande): + """ + Vérification + """ + bool = existeMCsousMCFcourant.verif(self, commande) + if bool : return 0 + return 1 + +#------------- +class existe : +#-------------- + """ + Existence du mot-clé simple + """ + def __init__(self, list_arg): + self.genea = list_arg + + def chercheMot(self, niveau, commande): + """ + Recherche du mot + """ + if commande == None : return 0 + if niveau == len(self.genea) : return 1 + texte = self.genea[niveau] + for c in commande.childNodes : + if c.name == texte : + niveau = niveau+1 + return self.chercheMot(niveau, c) + return None + + def verif(self, commande): + """ + Vérification + """ + bool = self.chercheMot(0, commande) + if bool == None : bool = 0 + return bool + +#------------- +class nexistepas : +#-------------- + """ + Absence du mot-clé simple + """ + def __init__(self, list_arg): + self.genea = list_arg + + def chercheMot(self, niveau, commande): + """ + Recherche du mot + """ + if commande == None : return 0 + if niveau == len(self.genea) : return 1 + texte = self.genea[niveau] + for c in commande.childNodes : + if c.name == texte : + niveau = niveau+1 + return self.chercheMot(niveau, c) + return None + + def verif(self, commande): + """ + Vérification + """ + bool = self.chercheMot(0, commande) + if bool : return 0 + return 1 + +#------------------------------- +class MCsousMCFaPourValeur : +#------------------------------ + """ + Égalité du mot-clé simple à une valeur sous le mot-clé facteur + """ + def __init__(self, list_arg): + assert (len(list_arg)==4) + self.genea = list_arg[0:-2] + self.MCF = list_arg[0] + self.MC = list_arg[1] + self.Val = list_arg[2] + self.Jdc = list_arg[3] + + def verif(self, commande): + """ + Vérification + """ + bool = 0 + for mcf in commande.childNodes : + if mcf.name != self.MCF : continue + l = mcf.childNodes[:] + l.reverse() + for ll in l: + for mc in ll.childNodes: + if mc.name != self.MC : continue + TexteMC = mc.getText(self.Jdc) + if (TexteMC.find(self.Val) < 0 ): continue + bool = 1 + return bool + +#------------------------------- +class MCsousMCFcourantaPourValeur : +#------------------------------ + """ + Égalité du mot-clé simple à une valeur sous le mot-clé facteur courant + """ + def __init__(self, list_arg): + assert (len(list_arg)==3) + self.genea = list_arg[0:-1] + self.MC = list_arg[0] + self.Val = list_arg[1] + self.Jdc = list_arg[2] + + def verif(self, mcf): + """ + Vérification + """ + bool = 0 + l = mcf.childNodes[:] + l.reverse() + for mc in l: + if mc.name != self.MC : continue + TexteMC = mc.getText(self.Jdc) + if (TexteMC.find(self.Val) < 0 ): continue + bool = 1 + return bool + + +#----------------------------- +class MCsousMCFaPourValeurDansListe : +#---------------------------- + """ + Égalité du mot-clé simple à une valeur dans une liste + sous le mot-clé facteur + """ + def __init__(self, list_arg): + assert (len(list_arg)==4) + self.genea = list_arg[0:-2] + self.MCF = list_arg[0] + self.MC = list_arg[1] + self.LVal = list_arg[2] + self.Jdc = list_arg[3] + + def verif(self, commande): + """ + Vérification + """ + bool = 0 + for mcf in commande.childNodes : + if mcf.name != self.MCF : continue + l = mcf.childNodes[:] + l.reverse() + for ll in l: + for mc in ll.childNodes: + if mc.name != self.MC : continue + TexteMC = mc.getText(self.Jdc) + for Val in self.LVal: + if (TexteMC.find(Val) < 0 ): continue + bool = 1 + return bool + +#----------------------------- +class MCsousMCFcourantaPourValeurDansListe : +#---------------------------- + """ + Égalité du mot-clé simple à une valeur dans une liste + sous le mot-clé facteur + """ + def __init__(self, list_arg): + assert (len(list_arg)==3) + self.genea = list_arg[0:-1] + self.MC = list_arg[0] + self.LVal = list_arg[1] + self.Jdc = list_arg[2] + + def verif(self, mcf): + """ + Vérification + """ + bool = 0 + l = mcf.childNodes[:] + l.reverse() + for mc in l: + if mc.name != self.MC : continue + TexteMC = mc.getText(self.Jdc) + for Val in self.LVal: + if (TexteMC.find(Val) < 0 ): continue + bool = 1 + return bool + +#----------------------------------------- +class MCsousMCFcourantnaPasPourValeurDansListe(MCsousMCFcourantaPourValeurDansListe) : +#----------------------------------------- + """ + Non égalité du mot-clé simple à une valeur dans une liste + sous le mot-clé facteur + """ + def __init__(self, list_arg): + MCsousMCFcourantaPourValeurDansListe.__init__(self, list_arg) + + + def verif(self, commande): + bool = MCsousMCFcourantaPourValeurDansListe.verif(self, commande) + if bool : return 0 + return 1 + +#----------------------------------------- +class MCsousMCFnaPasPourValeurDansListe(MCsousMCFaPourValeurDansListe) : +#----------------------------------------- + """ + Non égalité du mot-clé simple à une valeur dans une liste + sous le mot-clé facteur + """ + def __init__(self, list_arg): + MCsousMCFaPourValeurDansListe.__init__(self, list_arg) + + + def verif(self, commande): + bool = MCsousMCFaPourValeurDansListe.verif(self, commande) + if bool : return 0 + return 1 + +#------------------------------ +class MCaPourValeur : +#------------------------------ + """ + Égalité du mot-clé à une valeur + """ + def __init__(self, list_arg): + assert (len(list_arg)==3) + self.MC = list_arg[0] + self.Val = list_arg[1] + self.Jdc = list_arg[2] + + def verif(self, commande): + """ + Vérification + """ + bool = 0 + for mc in commande.childNodes : + if mc.name != self.MC : continue + TexteMC = mc.getText(self.Jdc) + if (TexteMC.find(self.Val) < 0 ): continue + bool = 1 + return bool + +#----------------------------------------- +class MCnaPasPourValeur(MCaPourValeur) : +#----------------------------------------- + """ + Non égalité du mot-clé à une valeur + """ + def __init__(self, list_arg): + MCaPourValeur.__init__(self, list_arg) + + def verif(self, commande): + """ + Vérification + """ + bool = MCaPourValeur.verif(self, commande) + if bool : return 0 + return 1 + +#------------------------------ +class MCaPourValeurDansListe : +#------------------------------ + """ + Égalité du mot-clé à une valeur dans une liste + """ + def __init__(self, list_arg): + assert (len(list_arg)==3) + self.MC = list_arg[0] + self.LVal = list_arg[1] + self.Jdc = list_arg[2] + + def verif(self, commande): + """ + Vérification + """ + bool = 0 + for mc in commande.childNodes : + if mc.name != self.MC : continue + TexteMC = mc.getText(self.Jdc) + #print "TexteMC=",type(TexteMC),TexteMC + #print "LVal=",type(self.LVal),self.LVal + for Val in self.LVal: + #print "Val=",type(Val),Val + #print "Find",TexteMC.find(Val) + if (TexteMC.find(Val) < 0 ): continue + bool = 1 + return bool + +#----------------------------------------- +class MCnaPasPourValeurDansListe(MCaPourValeurDansListe) : +#----------------------------------------- + """ + Non égalité du mot-clé à une valeur dans une liste + """ + def __init__(self, list_arg): + MCaPourValeurDansListe.__init__(self, list_arg) + + def verif(self, commande): + """ + Vérification + """ + bool = MCaPourValeurDansListe.verif(self, commande) + if bool : return 0 + return 1 + +dictionnaire_regle = {"existe":existe, + "nexistepas":nexistepas, + "existeMCFParmi":existeMCFParmi, + "nexistepasMCFParmi":nexistepasMCFParmi, + "existeMCsousMCF":existeMCsousMCF, + "nexistepasMCsousMCF":nexistepasMCsousMCF, + "MCsousMCFaPourValeur":MCsousMCFaPourValeur, + "MCsousMCFaPourValeurDansListe":MCsousMCFaPourValeurDansListe, + "MCaPourValeur":MCaPourValeur, + "MCnaPasPourValeur":MCnaPasPourValeur, + "existeMCsousMCFcourant":existeMCsousMCFcourant, + "nexistepasMCsousMCFcourant":nexistepasMCsousMCFcourant, + "MCsousMCFcourantaPourValeur":MCsousMCFcourantaPourValeur, + "MCsousMCFcourantaPourValeurDansListe":MCsousMCFcourantaPourValeurDansListe, + "MCsousMCFcourantnaPasPourValeurDansListe":MCsousMCFcourantnaPasPourValeurDansListe, + "MCsousMCFnaPasPourValeurDansListe":MCsousMCFnaPasPourValeurDansListe, + "MCaPourValeurDansListe":MCaPourValeurDansListe, + "MCnaPasPourValeurDansListe":MCnaPasPourValeurDansListe} + + +SansRegle = pasDeRegle() diff --git a/Traducteur3/removemocle.py b/Traducteur3/removemocle.py new file mode 100644 index 00000000..ee1eab7a --- /dev/null +++ b/Traducteur3/removemocle.py @@ -0,0 +1,215 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +import logging +from Traducteur import regles +from Traducteur.parseur import FactNode +from Traducteur.dictErreurs import ecritErreur +from Traducteur.load import jdcSet + +debug=0 +#debug=1 +#on n'a qu'un mocle par commande. On peut donc supprimer le mocle sans trop de precautions (a part iterer a l'envers sur les commandes) +#avant de supprimer un autre mocle, on remet a jour l'arbre syntaxique (lineno,colno,etc.) + + +#----------------------------------------------------------------------- +def removeMotCle(jdc,command,mocle,ensemble=regles.SansRegle,erreur = 0): +#----------------------------------------------------------------------- + #on itere sur les commandes a l'envers pour ne pas polluer les numeros de ligne avec les modifications + if command not in jdcSet : return + boolChange=0 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != mocle:continue + if ensemble.verif(c) == 0 : continue + if erreur : ecritErreur((command,mocle),c.lineno) + boolChange=1 + removeMC(jdc,c,mc) + + if boolChange : jdc.reset(jdc.getSource()) + +#------------------------------------------------------- +def removeMotCleSiRegle(jdc,command,mocle,liste_regles) : +#------------------------------------------------------- + if command not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + removeMotCle(jdc,command,mocle,mesRegles,erreur=0) + +#---------------------------------------------------------------- +def removeMotCleSiRegleAvecErreur(jdc,command,mocle,liste_regles) : +#-------------------------------------------------------------- + if command not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + removeMotCle(jdc,command,mocle,mesRegles,erreur=1) + +#---------------------------------------------------------------- +def removeMotCleAvecErreur(jdc,command,mocle) : +#-------------------------------------------------------------- + if command not in jdcSet : return + removeMotCle(jdc,command,mocle,erreur=1) + + +#-------------------------------------------------------------------- +def removeCommande(jdc,command,ensemble=regles.SansRegle,erreur=0): +#-------------------------------------------------------------------- + if command not in jdcSet : return + boolChange=0 + commands= jdc.root.childNodes[:] + commands.reverse() + for c in commands: + if c.name != command:continue + if ensemble.verif(c) == 0 : continue + boolChange=1 + if erreur : ecritErreur((command,),c.lineno) + jdc.supLignes(c.lineno,c.endline) + logging.warning("Suppression de %s ligne %s",c.name,c.lineno) + if boolChange : jdc.reset(jdc.getSource()) + +#------------------------------------------------------------- +def removeCommandeSiRegle(jdc,command,liste_regles): +#------------------------------------------------------------- + if command not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + removeCommande(jdc,command,mesRegles,0) + +#------------------------------------------------------------- +def removeCommandeSiRegleAvecErreur(jdc,command,liste_regles): +#------------------------------------------------------------- + if command not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + removeCommande(jdc,command,mesRegles,1) + +#--------------------------------- +def removeMC(jdc,c,mc): +#--------------------------------- + if debug : print ("Suppression de:",c.name,mc.name,mc.lineno,mc.colno,mc.endline,mc.endcol) + logging.info("Suppression de %s dans %s ligne %d",mc.name,c.name,mc.lineno) + + if mc.endline > mc.lineno: + if debug: print ("mocle sur plusieurs lignes--%s--" % jdc.getLines()[mc.lineno-1][mc.colno:]) + jdc.getLines()[mc.lineno-1]=jdc.getLines()[mc.lineno-1][:mc.colno] + jdc.getLines()[mc.endline-1]=jdc.getLines()[mc.endline-1][mc.endcol:] + + #attention : supprimer les lignes a la fin + jdc.getLines()[mc.lineno:mc.endline-1]=[] + else: + if debug: print( "mocle sur une ligne--%s--" % jdc.getLines()[mc.lineno-1][mc.colno:mc.endcol]) + s=jdc.getLines()[mc.lineno-1] + jdc.getLines()[mc.lineno-1]=s[:mc.colno]+s[mc.endcol:] + fusionne(jdc,mc.lineno-1) + +#--------------------------------------------------------------------------------- +def removeMotCleInFact(jdc,command,fact,mocle,ensemble=regles.SansRegle,erreur=0): +#---------------------------------------------------------------------------------- + # on itere sur les commandes a l'envers pour ne pas polluer + # les numeros de ligne avec les modifications + if command not in jdcSet : return + commands= jdc.root.childNodes[:] + commands.reverse() + boolChange=0 + for c in commands: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != fact:continue + l=mc.childNodes[:] + l.reverse() + for ll in l: + for n in ll.childNodes: + if n.name != mocle:continue + if ensemble.verif(c) == 0 : continue + if erreur : ecritErreur((command,fact,mocle),c.lineno) + boolChange=1 + removeMC(jdc,c,n) + + if boolChange : jdc.reset(jdc.getSource()) + +#------------------------------------------------------------------ +def removeMotCleInFactSiRegle(jdc,command,fact,mocle,liste_regles): +#------------------------------------------------------------------ + if command not in jdcSet : return + erreur=0 + mesRegles=regles.ensembleRegles(liste_regles) + removeMotCleInFact(jdc,command,fact,mocle,mesRegles,erreur) + +#---------------------------------------------------------------------- +def removeMotCleInFactSiRegleAvecErreur(jdc,command,fact,mocle,liste_regles): +#---------------------------------------------------------------------- + if command not in jdcSet : return + erreur=1 + mesRegles=regles.ensembleRegles(liste_regles) + removeMotCleInFact(jdc,command,fact,mocle,mesRegles,erreur) + + +#---------------------------------------------------------------------- +def removeMotCleInFactCourantSiRegle(jdc,command,fact,mocle,liste_regles,erreur=0): +#---------------------------------------------------------------------- + if command not in jdcSet : return + ensemble=regles.ensembleRegles(liste_regles) + commands= jdc.root.childNodes[:] + commands.reverse() + boolChange=0 + for c in commands: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != fact:continue + l=mc.childNodes[:] + l.reverse() + for ll in l: + if ensemble.verif(ll) == 0 : continue + for n in ll.childNodes: + if n.name != mocle:continue + if erreur : ecritErreur((command,fact,mocle),c.lineno) + boolChange=1 + removeMC(jdc,c,n) + + if boolChange : jdc.reset(jdc.getSource()) + +#------------------------------------------ +def fusionne(jdc,numLigne): +#------------------------------------------ +# fusionne la ligne numLigne et numLigne+1 +# si la ligne numLigne+1 ne contient que des parentheses +# fermantes +# et si la ligne numLigne ne contient pas par un "#" +# Attention a la difference de numerotation +# jdc.getLines()[numLigne] donne la ligne numLigne + 1 +# alors que joinLineandNext(numLigne) travaille sur le tableau + index=0 + texte=jdc.getLines()[numLigne] + fusion=1 + while (index < len(texte)) : + if texte[index] not in (" ",",",")",";","\n") : + fusion=0 + break + index=index+1 + + if fusion == 0 : return; + + texte=jdc.getLines()[numLigne -1] + if texte.find("#") < 0 : + fusion=1 + else : + fusion=0 + + if fusion : + jdc.joinLineandNext(numLigne) diff --git a/Traducteur3/renamemocle.py b/Traducteur3/renamemocle.py new file mode 100644 index 00000000..e246abf2 --- /dev/null +++ b/Traducteur3/renamemocle.py @@ -0,0 +1,188 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +import logging +import sys +from Traducteur.parseur import FactNode +from Traducteur.load import jdcSet +from Traducteur import regles +from Traducteur.dictErreurs import ecritErreur +#debug=1 +debug=0 + +#on n'a qu'un mocle par commande. +#en fin de traitement, on remet a jour l'arbre syntaxique (lineno,colno,etc.) + +#-------------------------------------------------------------------------------- +def renameMotCle(jdc,command,mocle,new_name, erreur=0,ensemble=regles.SansRegle): +#-------------------------------------------------------------------------------- + if command not in jdcSet : return + boolChange=0 + for c in jdc.root.childNodes: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != mocle:continue + if ensemble.verif(c) == 0 : continue + boolChange=1 + if debug: print ("Renommage de:",c.name,mc.name,mc.lineno,mc.colno) + if erreur : + ecritErreur((command,mocle),c.lineno) + else : + logging.info("Renommage de: %s %s ligne %d en %s",c.name,mc.name,mc.lineno,new_name) + s=jdc.getLines()[mc.lineno-1] + jdc.getLines()[mc.lineno-1]=s[:mc.colno]+new_name+s[mc.colno+len(mocle):] + diff=len(new_name) - len(mocle) + decaleLignesdeNBlancs(jdc,mc.lineno,mc.endline-1,diff) + + if boolChange : jdc.reset(jdc.getSource()) + +#------------------------------------------------------ +def renameMotCleAvecErreur(jdc,command,mocle,new_name): +#------------------------------------------------------ + if command not in jdcSet : return + renameMotCle(jdc,command,mocle,new_name,1,regles.SansRegle) + +#-------------------------------------------------------------------------- +def renameMotCleSiRegle(jdc,command,mocle,new_name,liste_regles, erreur=0): +#-------------------------------------------------------------------------- + if command not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + renameMotCle(jdc,command,mocle,new_name, erreur,mesRegles) + +#------------------------------------------- +def renameOper(jdc,command,new_name): +#------------------------------------------- + if command not in jdcSet : return + jdcSet.add(new_name) + boolChange=0 + for c in jdc.root.childNodes: + if c.name != command:continue + if debug: print ("Renommage de:",c.name,c.lineno,c.colno) + logging.info("Renommage de: %s ligne %d en %s",c.name,c.lineno,new_name) + boolChange=1 + s=jdc.getLines()[c.lineno-1] + jdc.getLines()[c.lineno-1]=s[:c.colno]+new_name+s[c.colno+len(command):] + diff=len(new_name) - len(command) + decaleLignesdeNBlancs(jdc,c.lineno,c.endline,diff) + if boolChange : jdc.reset(jdc.getSource()) + +#---------------------------------------------------------- +def decaleLignesdeNBlancs(jdc,premiere,derniere,nbBlanc): +#---------------------------------------------------------- + ligne = premiere + 1 + while ligne < derniere : + s=jdc.getLines()[ligne] + if nbBlanc > 0 : + jdc.getLines()[ligne] = nbBlanc*" " + s + else : + toutblancs=-1*nbBlanc*" " + if jdc.getLines()[ligne][0:-1*nbBlanc] == toutblancs: + jdc.getLines()[ligne] = s[-1*nbBlanc:] + ligne=ligne+1 + +#--------------------------------------------------------------------------------------------- +def renameMotCleInFact(jdc,command,fact,mocle,new_name, ensemble=regles.SansRegle, erreur=0): +#--------------------------------------------------------------------------------------------- + if command not in jdcSet : return + boolChange=0 + for c in jdc.root.childNodes: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != fact:continue + l=mc.childNodes[:] + #on itere a l'envers + l.reverse() + for ll in l: + for n in ll.childNodes: + if n.name != mocle:continue + if ensemble.verif(c) == 0 : continue + s=jdc.getLines()[n.lineno-1] + jdc.getLines()[n.lineno-1]=s[:n.colno]+new_name+s[n.colno+len(mocle):] + boolChange=1 + if erreur : + ecritErreur((command,fact,mocle),c.lineno) + else : + logging.info("Renommage de: %s, ligne %s, en %s",n.name,n.lineno,new_name) + + if boolChange : jdc.reset(jdc.getSource()) + +#-------------------------------------------------------------------------- +def renameMotCleInFactSiRegle(jdc,command,fact,mocle,new_name,liste_regles): +#-------------------------------------------------------------------------- + if command not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + renameMotCleInFact(jdc,command,fact,mocle,new_name,mesRegles) + +def renameMotCleInFactCourantSiRegle(jdc,command,fact,mocle,new_name,liste_regles,erreur=0): +#-------------------------------------------------------------------------- + if command not in jdcSet : return + ensemble=regles.ensembleRegles(liste_regles) + boolChange=0 + for c in jdc.root.childNodes: + if c.name != command:continue + for mc in c.childNodes: + if mc.name != fact:continue + l=mc.childNodes[:] + #on itere a l'envers + l.reverse() + for ll in l: + if ensemble.verif(ll) == 0 : continue + for n in ll.childNodes: + if n.name != mocle:continue + s=jdc.getLines()[n.lineno-1] + jdc.getLines()[n.lineno-1]=s[:n.colno]+new_name+s[n.colno+len(mocle):] + boolChange=1 + if erreur : + ecritErreur((command,fact,mocle),c.lineno) + else : + logging.info("Renommage de: %s, ligne %s, en %s",n.name,n.lineno,new_name) + + if boolChange : jdc.reset(jdc.getSource()) + + +#----------------------------------------------------------------- +def renameCommande(jdc,command,new_name,ensemble=regles.SansRegle): +#----------------------------------------------------------------- +# nom de la commande "ancien format" , nom de la commande " nouveau format " + if command not in jdcSet : return + jdcSet.add(new_name) + boolChange=0 + if debug : + if ensemble != regles.SansRegle : + logging.info("traitement de %s renomme en %s sous conditions", command, new_name) + else : + logging.info("traitement de %s renomme en %s ", command, new_name) + for c in jdc.root.childNodes: + if c.name != command:continue + if ensemble.verif(c) == 0 : continue + boolChange=1 + if debug: print ("Renommage de:",c.name,new_name ,c.lineno,c.colno) + logging.info("Renommage de: %s ligne %d en %s",c.name,c.lineno,new_name) + s=jdc.getLines()[c.lineno-1] + jdc.getLines()[c.lineno-1]=s[:c.colno]+new_name+s[c.colno+len(command):] + + if boolChange : jdc.reset(jdc.getSource()) + +#----------------------------------------------------------- +def renameCommandeSiRegle(jdc,command,new_name,liste_regles): +#----------------------------------------------------------- + + if command not in jdcSet : return + mesRegles=regles.ensembleRegles(liste_regles) + renameCommande(jdc,command,new_name,mesRegles) diff --git a/Traducteur3/toto.comm b/Traducteur3/toto.comm new file mode 100755 index 00000000..0701e84e --- /dev/null +++ b/Traducteur3/toto.comm @@ -0,0 +1,161 @@ +# + +REF=Assembly(assembly_type='REF',); + + +U1=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,4.2412,), + size=0.033,),),); + +UGD=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,), + size=0.033,),),); + +RB=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N1=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N2=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4226, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +G1=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +G2=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +techno_data=Techno_data(assembly_list=(REF,U1,UGD,), + rodbank_list=(RB,G1,G2,N1,N2,), + radial_description=_F(nb_assembly=15, + xaxis=('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',), + yaxis= + ('RS','15','14','13','12','11', + '10','09','08','07','06','05','04','03','02','01','RN',), + assembly_map=((REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,),(REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,),(REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF,REF,REF,),(REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD,REF,REF,),(REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF,REF,),(REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,),(REF,U1,UGD,U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,),(REF,U1,U1,UGD,UGD,UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,),(REF,U1,U1,U1,U1,U1,U1,UGD,UGD,UGD,U1,U1,U1,U1,U1,U1,REF,),(REF,U1,U1,UGD,UGD,UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,),(REF,U1,UGD,U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,),(REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,),(REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF,REF,),(REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD,REF,REF,),(REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF,REF,REF,),(REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,),(REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,),), + rod_map= + (['#','#','#','#','#','#','#', + '#','#','#','#','#','#','#','#','#','#'],['#','#','#','#','#','.', + '.','.','.','.','.','.','#','#','#','#','#'],['#','#','#','.','.', + '.','.','.','RB','.','.','.','.','.','#','#','#'],['#','#','.','.', + '.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'],['#','#', + '.','.','N1','.','.','.','G1','.','.','.','N1','.','.','#','#'], + ['#','.','.','G2','.','RB','.','.','.','.','.','RB','.','G2','.', + '.','#'],['#','.','.','.','.','.','.','.','N1','.','.','.','.','.', + '.','.','#'],['#','.','.','N2','.','.','.','.','.','.','.','.','.', + 'N2','.','.','#'],['#','.','RB','.','G1','.','N1','.','RB','.','N1', + '.','G1','.','RB','.','#'],['#','.','.','N2','.','.','.','.','.', + '.','.','.','.','N2','.','.','#'],['#','.','.','.','.','.','.','.', + 'N1','.','.','.','.','.','.','.','#'],['#','.','.','G2','.','RB', + '.','.','.','.','.','RB','.','G2','.','.','#'],['#','#','.','.', + 'N1','.','.','.','G1','.','.','.','N1','.','.','#','#'],['#','#', + '.','.','.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'], + ['#','#','#','.','.','.','.','.','RB','.','.','.','.','.','#','#', + '#'],['#','#','#','#','#','.','.','.','.','.','.','.','#','#','#', + '#','#'],['#','#','#','#','#','#','#','#','#','#','#','#','#','#', + '#','#','#'],), + BU_map= + ([0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,0.0,0.0, + 40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0, + 40.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0, + 0.0,40.0,20.0,20.0,20.0,40.0,20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0, + 0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0, + 20.0,0.0,0.0,0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0, + 20.0,40.0,20.0,40.0,40.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,20.0,40.0, + 20.0,40.0,20.0,20.0,60.0,20.0,20.0,40.0,20.0,40.0,20.0,0.0,0.0],[0.0, + 0.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0, + 0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0, + 40.0,40.0,0.0,0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,20.0,20.0,20.0,40.0, + 20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0, + 20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,0.0, + 40.0,0.0,0.0,40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],),), + axial_description=_F(lower_refl_size=0.21, + upper_refl_size=0.21,), + nominal_power=4000000000.0, + Fuel_power_fraction=0.974, + by_pass=0.07, + core_volumic_flowrate=90940.0,); + +neutro_model=Model_data(physics='Neutronics', + scale='component', + code='APOLLO3', + radial_meshing=_F(flux_solver='subdivision', + flux_subdivision=2, + feedback_solver='subdivision', + feedback_subdivision=1,), + axial_meshing=_F(lower_refl=2, + fuel=42, + upper_refl=2,),); + +thermo_model=Model_data(physics='Thermalhydraulics', + scale='component', + code='FLICA4', + radial_meshing=_F(fluid='subdivision', + fluid_subdivision=1, + pellet=8, + clad=2,), + axial_meshing=_F(lower_refl=1, + fuel=40, + upper_refl=1,),); + +scenario_data=Scenario_data(initial_power=0.1, + initial_power_unit='% Nominal power', + initial_core_inlet_temperature=290.0, + initial_boron_concentration=1300.0, + initial_inlet_pressure=160.2, + initial_outlet_pressure=157.2, + initial_rod_positions=(('Rodbank@RB',201),('Rodbank@N1',96),('Rodbank@N2',260),('Rodbank@G1',260),('Rodbank@G2',260),('Rodcluster@H08',260)), + scenario_type='RIA', + ejected_rod='H02', + rod_position_program=((0.0,0),(0.1,260)), + SCRAM='YES', + SCRAM_power=1130.0, + complete_SCRAM_time=1.0, + post_processing=(('Fuel temperature@Thermalhydraulics','MAX'),('Neutronic power@Neutronics','SUM'),('Fuel temperature@Thermalhydraulics','MED'),('Neutronic power@Neutronics','MED')),); + +Genere_Une_Erreur_Traduction(essai='3',); +#VERSION_CATALOGUE:V_0:FIN VERSION_CATALOGUE +#CHECKSUM:f62a6f71fcde9f983479fc749f7e334c -:FIN CHECKSUM diff --git a/Traducteur3/tutu.comm b/Traducteur3/tutu.comm new file mode 100644 index 00000000..0701e84e --- /dev/null +++ b/Traducteur3/tutu.comm @@ -0,0 +1,161 @@ +# + +REF=Assembly(assembly_type='REF',); + + +U1=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,4.2412,), + size=0.033,),),); + +UGD=Assembly(assembly_type='UOX', + assembly_width=0.21504, + fuel_density=0.95, + radial_description=_F(clad_outer_radius=0.00475, + guide_tube_outer_radius=0.006025, + fuel_rod_pitch=0.0126, + nfuel_rods=264,), + axial_description=_F(active_length_start=0.21, + active_length_end=4.4772,), + grids=_F(mixing=_F(positions=(0.69216,1.19766,1.70316,2.20866,2.71416,3.20416,3.69416,4.18416,), + size=0.033,), + non_mixing=_F(positions=(0.026,), + size=0.033,),),); + +RB=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N1=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4224, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +N2=RodBank(rod_type='heterogeneous', + bottom_composition='AIC', + splitting_heigh=1.4226, + upper_composition='B4C', + step_height=0.016, + nsteps=260,); + +G1=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +G2=RodBank(rod_type='homogeneous', + rod_composition='Grey', + step_height=0.016, + nsteps=260,); + +techno_data=Techno_data(assembly_list=(REF,U1,UGD,), + rodbank_list=(RB,G1,G2,N1,N2,), + radial_description=_F(nb_assembly=15, + xaxis=('RW','S','R','P','N','L','K','J','H','G','F','E','D','C','B','A','RE',), + yaxis= + ('RS','15','14','13','12','11', + '10','09','08','07','06','05','04','03','02','01','RN',), + assembly_map=((REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,),(REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,),(REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF,REF,REF,),(REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD,REF,REF,),(REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF,REF,),(REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,),(REF,U1,UGD,U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,),(REF,U1,U1,UGD,UGD,UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,),(REF,U1,U1,U1,U1,U1,U1,UGD,UGD,UGD,U1,U1,U1,U1,U1,U1,REF,),(REF,U1,U1,UGD,UGD,UGD,UGD,U1,UGD,U1,UGD,UGD,UGD,UGD,U1,U1,REF,),(REF,U1,UGD,U1,U1,U1,UGD,UGD,U1,UGD,UGD,U1,U1,U1,UGD,U1,REF,),(REF,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,U1,UGD,U1,UGD,U1,REF,),(REF,REF,U1,U1,U1,UGD,U1,UGD,U1,UGD,U1,UGD,U1,U1,U1,REF,REF,),(REF,REF,UGD,U1,U1,U1,U1,UGD,U1,UGD,U1,U1,U1,U1,UGD,REF,REF,),(REF,REF,REF,UGD,U1,UGD,UGD,U1,U1,U1,UGD,UGD,U1,UGD,REF,REF,REF,),(REF,REF,REF,REF,REF,U1,U1,U1,U1,U1,U1,U1,REF,REF,REF,REF,REF,),(REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,REF,),), + rod_map= + (['#','#','#','#','#','#','#', + '#','#','#','#','#','#','#','#','#','#'],['#','#','#','#','#','.', + '.','.','.','.','.','.','#','#','#','#','#'],['#','#','#','.','.', + '.','.','.','RB','.','.','.','.','.','#','#','#'],['#','#','.','.', + '.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'],['#','#', + '.','.','N1','.','.','.','G1','.','.','.','N1','.','.','#','#'], + ['#','.','.','G2','.','RB','.','.','.','.','.','RB','.','G2','.', + '.','#'],['#','.','.','.','.','.','.','.','N1','.','.','.','.','.', + '.','.','#'],['#','.','.','N2','.','.','.','.','.','.','.','.','.', + 'N2','.','.','#'],['#','.','RB','.','G1','.','N1','.','RB','.','N1', + '.','G1','.','RB','.','#'],['#','.','.','N2','.','.','.','.','.', + '.','.','.','.','N2','.','.','#'],['#','.','.','.','.','.','.','.', + 'N1','.','.','.','.','.','.','.','#'],['#','.','.','G2','.','RB', + '.','.','.','.','.','RB','.','G2','.','.','#'],['#','#','.','.', + 'N1','.','.','.','G1','.','.','.','N1','.','.','#','#'],['#','#', + '.','.','.','G2','.','N2','.','N2','.','G2','.','.','.','#','#'], + ['#','#','#','.','.','.','.','.','RB','.','.','.','.','.','#','#', + '#'],['#','#','#','#','#','.','.','.','.','.','.','.','#','#','#', + '#','#'],['#','#','#','#','#','#','#','#','#','#','#','#','#','#', + '#','#','#'],), + BU_map= + ([0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,0.0,0.0, + 40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0, + 40.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0, + 0.0,40.0,20.0,20.0,20.0,40.0,20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0, + 0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0, + 20.0,0.0,0.0,0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0, + 20.0,40.0,20.0,40.0,40.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,20.0,40.0, + 20.0,40.0,20.0,20.0,60.0,20.0,20.0,40.0,20.0,40.0,20.0,0.0,0.0],[0.0, + 0.0,40.0,0.0,40.0,0.0,40.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0,0.0, + 0.0],[0.0,0.0,40.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0,40.0,20.0, + 40.0,40.0,0.0,0.0],[0.0,0.0,0.0,20.0,20.0,20.0,40.0,0.0,40.0,0.0,40.0, + 20.0,20.0,20.0,0.0,0.0,0.0],[0.0,0.0,0.0,40.0,20.0,20.0,20.0,40.0, + 20.0,40.0,20.0,20.0,20.0,40.0,0.0,0.0,0.0],[0.0,0.0,40.0,0.0,40.0, + 20.0,40.0,0.0,40.0,0.0,40.0,20.0,40.0,0.0,40.0,0.0,0.0],[0.0,0.0,0.0, + 40.0,0.0,0.0,40.0,40.0,20.0,40.0,40.0,0.0,0.0,40.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],[0.0, + 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0],),), + axial_description=_F(lower_refl_size=0.21, + upper_refl_size=0.21,), + nominal_power=4000000000.0, + Fuel_power_fraction=0.974, + by_pass=0.07, + core_volumic_flowrate=90940.0,); + +neutro_model=Model_data(physics='Neutronics', + scale='component', + code='APOLLO3', + radial_meshing=_F(flux_solver='subdivision', + flux_subdivision=2, + feedback_solver='subdivision', + feedback_subdivision=1,), + axial_meshing=_F(lower_refl=2, + fuel=42, + upper_refl=2,),); + +thermo_model=Model_data(physics='Thermalhydraulics', + scale='component', + code='FLICA4', + radial_meshing=_F(fluid='subdivision', + fluid_subdivision=1, + pellet=8, + clad=2,), + axial_meshing=_F(lower_refl=1, + fuel=40, + upper_refl=1,),); + +scenario_data=Scenario_data(initial_power=0.1, + initial_power_unit='% Nominal power', + initial_core_inlet_temperature=290.0, + initial_boron_concentration=1300.0, + initial_inlet_pressure=160.2, + initial_outlet_pressure=157.2, + initial_rod_positions=(('Rodbank@RB',201),('Rodbank@N1',96),('Rodbank@N2',260),('Rodbank@G1',260),('Rodbank@G2',260),('Rodcluster@H08',260)), + scenario_type='RIA', + ejected_rod='H02', + rod_position_program=((0.0,0),(0.1,260)), + SCRAM='YES', + SCRAM_power=1130.0, + complete_SCRAM_time=1.0, + post_processing=(('Fuel temperature@Thermalhydraulics','MAX'),('Neutronic power@Neutronics','SUM'),('Fuel temperature@Thermalhydraulics','MED'),('Neutronic power@Neutronics','MED')),); + +Genere_Une_Erreur_Traduction(essai='3',); +#VERSION_CATALOGUE:V_0:FIN VERSION_CATALOGUE +#CHECKSUM:f62a6f71fcde9f983479fc749f7e334c -:FIN CHECKSUM diff --git a/Traducteur3/utils.py b/Traducteur3/utils.py new file mode 100644 index 00000000..31ab5e87 --- /dev/null +++ b/Traducteur3/utils.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import re + +def indexToCoordinates(src, index): + """return le numero de la colonne (x) et le numero de la ligne (y) dans src""" + y = src[: index].count("\n") + startOfLineIdx = src.rfind("\n", 0, index)+1 + x = index-startOfLineIdx + return x, y + +def lineToDict(line): + """Transforme une ligne (string) en un dictionnaire de mots + reperes par le numero de la colonne""" + + words = re.split("(\w+)", line) + h = {};i = 0 + for word in words: + h[i] = word + i+=len(word) + return h + +def dictToLine(d): + """Transformation inverse: a partir d'un dictionnaire retourne une ligne""" + cols = d + cols.sort() + return "".join([d[colno]for colno in cols]) diff --git a/Traducteur3/visiteur.py b/Traducteur3/visiteur.py new file mode 100644 index 00000000..d3584b16 --- /dev/null +++ b/Traducteur3/visiteur.py @@ -0,0 +1,98 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2017 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import re +from ast import NodeVisitor +debug=1 + +class MatchFinder (NodeVisitor): + """Visiteur de base : gestion des matches """ + def reset(self,line): + self.matches=[] + self._matches = [] + self.words = re.split("(\w+)", line) # every other one is a non word + self.positions = [] + i = 0 + for word in self.words: + self.positions.append(i) + i+=len(word) + self.index = 0 + if debug : print ('fin reset', self.words) + + def popWordsUpTo(self, word): + if word == "*": + return # won't be able to find this + posInWords = self.words.index(word) + idx = self.positions[posInWords] + self.words = self.words[posInWords+1:] + self.positions = self.positions[posInWords+1:] + + def appendMatch(self,name): + idx = self.getNextIndexOfWord(name) + self._matches.append((idx, name)) + + def getNextIndexOfWord(self,name): + return self.positions[self.words.index(name)] + + +class KeywordFinder(MatchFinder): + """Visiteur pour les keywords d'une commande """ + + def visit_keyword(self,node): + if debug : print (' visit_keyword', node.arg) + idx = self.getNextIndexOfWord(node.arg) + self.popWordsUpTo(node.arg) + prevmatches=self._matches + self._matches = [] + #for child in node.getChildNodes(): + # self.visit(child) + self.generic_visit(node) + prevmatches.append((idx, node.arg,self._matches)) + self._matches=prevmatches + #on ne garde que les matches du niveau Keyword le plus haut + self.matches=self._matches + + def visit_Tuple(self,node): + matchlist=[] + # Pour eviter les tuples et listes ordinaires, + if not hasattr(node,'getChildNodes') : return + print ('*********************************************************************') + print ("_____________ visit_Tuple", node) + for child in node.getChildNodes(): + self._matches = [] + self.visit(child) + if self._matches: + # Pour eviter les tuples et listes ordinaires, + # on ne garde que les visites fructueuses + matchlist.append(self._matches) + self._matches=matchlist + #self.generic_visit(node) + + visit_List=visit_Tuple + + def visit_Name(self,node): + if debug : print ('visit_Name', node.id) + self.popWordsUpTo(node.id) + self.generic_visit(node) + + def visit_AssName(self,node): + if debug : print ('visit_AssName', node.id) + self.popWordsUpTo(node.id) + self.generic_visit(node) diff --git a/UiQT5/Tuple10.ui b/UiQT5/Tuple10.ui index 102166a1..c8149784 100644 --- a/UiQT5/Tuple10.ui +++ b/UiQT5/Tuple10.ui @@ -28,7 +28,7 @@ - + 0 @@ -66,7 +66,7 @@ border:0px; - + 0 @@ -102,7 +102,7 @@ border:0px; - + 0 @@ -138,7 +138,7 @@ border:0px; - + 0 @@ -174,7 +174,7 @@ border:0px; - + 0 @@ -210,7 +210,7 @@ border:0px; - + 0 @@ -246,7 +246,7 @@ border:0px; - + 0 @@ -282,7 +282,7 @@ border:0px; - + 0 @@ -318,7 +318,7 @@ border:0px; - + 0 @@ -347,7 +347,7 @@ border:0px; - + 0 diff --git a/UiQT5/Tuple2.ui b/UiQT5/Tuple2.ui index fb7c2ab6..9a17ce5f 100644 --- a/UiQT5/Tuple2.ui +++ b/UiQT5/Tuple2.ui @@ -43,7 +43,7 @@ - + 0 @@ -84,7 +84,7 @@ border:0px; - + 0 diff --git a/UiQT5/Tuple3.ui b/UiQT5/Tuple3.ui index 9d777483..de3d4528 100644 --- a/UiQT5/Tuple3.ui +++ b/UiQT5/Tuple3.ui @@ -43,7 +43,7 @@ - + 0 @@ -81,7 +81,7 @@ border:0px; - + 0 @@ -117,7 +117,7 @@ border:0px; - + 0 diff --git a/UiQT5/Tuple4.ui b/UiQT5/Tuple4.ui index d551c2b8..e2db8728 100644 --- a/UiQT5/Tuple4.ui +++ b/UiQT5/Tuple4.ui @@ -28,7 +28,7 @@ - + 0 @@ -66,7 +66,7 @@ border:0px; - + 0 @@ -102,7 +102,7 @@ border:0px; - + 0 @@ -138,7 +138,7 @@ border:0px; - + 0 diff --git a/UiQT5/Tuple5.ui b/UiQT5/Tuple5.ui index b3013390..e8b64bfd 100644 --- a/UiQT5/Tuple5.ui +++ b/UiQT5/Tuple5.ui @@ -28,7 +28,7 @@ - + 0 @@ -66,7 +66,7 @@ border:0px; - + 0 @@ -102,7 +102,7 @@ border:0px; - + 0 @@ -138,7 +138,7 @@ border:0px; - + 0 @@ -174,7 +174,7 @@ border:0px; - + 0 diff --git a/UiQT5/Tuple6.ui b/UiQT5/Tuple6.ui index 192bf670..c870ea9a 100644 --- a/UiQT5/Tuple6.ui +++ b/UiQT5/Tuple6.ui @@ -28,7 +28,7 @@ - + 0 @@ -66,7 +66,7 @@ border:0px; - + 0 @@ -102,7 +102,7 @@ border:0px; - + 0 @@ -138,7 +138,7 @@ border:0px; - + 0 @@ -174,7 +174,7 @@ border:0px; - + 0 @@ -210,7 +210,7 @@ border:0px; - + 0 diff --git a/UiQT5/Tuple7.ui b/UiQT5/Tuple7.ui index 242b5b17..47df62d6 100644 --- a/UiQT5/Tuple7.ui +++ b/UiQT5/Tuple7.ui @@ -28,7 +28,7 @@ - + 0 @@ -66,7 +66,7 @@ border:0px; - + 0 @@ -102,7 +102,7 @@ border:0px; - + 0 @@ -138,7 +138,7 @@ border:0px; - + 0 @@ -174,7 +174,7 @@ border:0px; - + 0 @@ -210,7 +210,7 @@ border:0px; - + 0 @@ -246,7 +246,7 @@ border:0px; - + 0 diff --git a/UiQT5/Tuple8.ui b/UiQT5/Tuple8.ui index 169b2608..b3d0f63a 100644 --- a/UiQT5/Tuple8.ui +++ b/UiQT5/Tuple8.ui @@ -28,7 +28,7 @@ - + 0 @@ -66,7 +66,7 @@ border:0px; - + 0 @@ -102,7 +102,7 @@ border:0px; - + 0 @@ -138,7 +138,7 @@ border:0px; - + 0 @@ -174,7 +174,7 @@ border:0px; - + 0 @@ -210,7 +210,7 @@ border:0px; - + 0 @@ -246,7 +246,7 @@ border:0px; - + 0 @@ -282,7 +282,7 @@ border:0px; - + 0 diff --git a/UiQT5/Tuple9.ui b/UiQT5/Tuple9.ui index 6a7f25a1..7f8e3f03 100644 --- a/UiQT5/Tuple9.ui +++ b/UiQT5/Tuple9.ui @@ -40,7 +40,7 @@ - + 0 @@ -78,7 +78,7 @@ border:0px; - + 0 @@ -114,7 +114,7 @@ border:0px; - + 0 @@ -150,7 +150,7 @@ border:0px; - + 0 @@ -186,7 +186,7 @@ border:0px; - + 0 @@ -222,7 +222,7 @@ border:0px; - + 0 @@ -258,7 +258,7 @@ border:0px; - + 0 @@ -294,7 +294,7 @@ border:0px; - + 0 @@ -330,7 +330,7 @@ border:0px; - + 0 diff --git a/UiQT5/desWidgetFact.ui b/UiQT5/desWidgetFact.ui index c50a7421..d57b619e 100644 --- a/UiQT5/desWidgetFact.ui +++ b/UiQT5/desWidgetFact.ui @@ -47,7 +47,7 @@ 0 - 0 + 2 @@ -484,7 +484,7 @@ 0 - 1 + 2 diff --git a/UiQT5/desWidgetFactHorizon.ui b/UiQT5/desWidgetFactHorizon.ui new file mode 100644 index 00000000..0ccdf54f --- /dev/null +++ b/UiQT5/desWidgetFactHorizon.ui @@ -0,0 +1,428 @@ + + + WidgetFactHorizon + + + + 0 + 0 + 949 + 53 + + + + Qt::StrongFocus + + + Form + + + QGroupBox { + border: 1px solid gray; + border-radius: 5px; + margin-top: 1ex; /* leave space at the top for the title */ + } + + QGroupBox::title { + padding: 0 3px; + } + + + + 0 + + + 0 + + + 2 + + + 0 + + + 0 + + + + + 0 + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 5 + + + + + + + + + 21 + 15 + + + + + 21 + 21 + + + + border : 0px + + + ... + + + + ../Editeur/icons/minusnode.png../Editeur/icons/minusnode.png + + + + 21 + 21 + + + + + + + + + + Qt::Vertical + + + + + + + + + + + 0 + + + + + + 17 + 25 + + + + + 21 + 25 + + + + border : 0px + + + ... + + + + ../Editeur/icons/ast-green-ball.png../Editeur/icons/ast-green-ball.png + + + + 21 + 25 + + + + + + + + 0 + + + + + + 0 + 0 + + + + + 0 + 25 + + + + + 12121213 + 25 + + + + <html><head/><body><p><span style=" font-style:italic;">TextLabel</span></p></body></html> + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + 1500 + 16 + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + 0 + + + QLayout::SetFixedSize + + + + + + 21 + 31 + + + + + 21 + 31 + + + + Qt::ClickFocus + + + Lance un script associé à la commande + + + border : 0px + + + ... + + + + ../Editeur/icons/roue.png../Editeur/icons/roue.png + + + + 21 + 31 + + + + + + + + + 21 + 25 + + + + + 21 + 25 + + + + border : 0px + + + ... + + + + ../Editeur/icons/point-interrogation30.png../Editeur/icons/point-interrogation30.png + + + + 21 + 25 + + + + + + + + + 21 + 25 + + + + + 21 + 25 + + + + border : 0px + + + ... + + + + ../Editeur/icons/lettreRblanc30.png../Editeur/icons/lettreRblanc30.png + + + + 21 + 25 + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 13 + 20 + + + + + + + + + 21 + 25 + + + + + 21 + 25 + + + + border : 0px + + + ... + + + + ../Editeur/icons/deleteRond.png../Editeur/icons/deleteRond.png + + + + 21 + 25 + + + + + + + + + + 0 + + + 2 + + + + + + + + + + + + MonBoutonValide + QToolButton +
monBoutonValide.h
+
+ + MonLabelClic + QLabel +
monLabelClic.h
+
+
+ + +
diff --git a/UiQT5/desWidgetMatrice.ui b/UiQT5/desWidgetMatrice.ui index 378b9d7f..192f5e46 100644 --- a/UiQT5/desWidgetMatrice.ui +++ b/UiQT5/desWidgetMatrice.ui @@ -6,8 +6,8 @@ 0 0 - 399 - 226 + 624 + 490 @@ -25,7 +25,7 @@ Dialog - + @@ -124,8 +124,7 @@ - - + ..
@@ -144,79 +143,134 @@ - - - - - 0 - 0 - - - - - 100 - 25 - - - - - 100 - 16777215 - - - - QFrame::NoFrame - - - <html><head/><body><p>aaa</p><p>dqsklmdqm</p></body></html> - - - false - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - - - Qt::Horizontal - - - QSizePolicy::MinimumExpanding - - - - 2 - 2 - - - - - - - - 200 - 200 - - - - QFrame::Box - - - QFrame::Raised - - - QAbstractScrollArea::AdjustToContents - - - true + + + + + + 0 + 0 + + + + + 100 + 25 + + + + + 100 + 16777215 + + + + QFrame::NoFrame + + + <html><head/><body><p>aaa</p><p>dqsklmdqm</p></body></html> + + + false + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 13 + 13 + + + + + + + + + + 0 - + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 13 + 13 + + + + + + + + + 0 + 0 + + + + + 40 + 40 + + + + + 40 + 2500 + + + + QFrame::Box + + + QFrame::Raised + + + QAbstractScrollArea::AdjustToContents + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 13 + 13 + + + + + @@ -224,18 +278,40 @@ Qt::Vertical - QSizePolicy::Ignored + QSizePolicy::Expanding 20 - 2 + 68 + + + + + 200 + 200 + + + + QFrame::Box + + + QFrame::Raised + + + QAbstractScrollArea::AdjustToContents + + + true + + + @@ -255,7 +331,9 @@ label horizontalSpacer_2 - TBMatrice + lesCouleurs + horizontalSpacer_4 + horizontalSpacer_5 diff --git a/UiQT5/desWidgetPlusieursBase.ui b/UiQT5/desWidgetPlusieursBase.ui index b4d801dc..660efa2a 100644 --- a/UiQT5/desWidgetPlusieursBase.ui +++ b/UiQT5/desWidgetPlusieursBase.ui @@ -769,6 +769,13 @@ + + + + TextLabel + + + diff --git a/UiQT5/desWidgetPlusieursTuple.ui b/UiQT5/desWidgetPlusieursTuple.ui index a47fb9e9..c2aefeab 100644 --- a/UiQT5/desWidgetPlusieursTuple.ui +++ b/UiQT5/desWidgetPlusieursTuple.ui @@ -612,9 +612,9 @@ - + - Valide + TextLabel @@ -631,6 +631,13 @@ + + + + Valide + + + diff --git a/UiQT5/desWidgetSimpBase.ui b/UiQT5/desWidgetSimpBase.ui index 60c7dce5..1169925d 100644 --- a/UiQT5/desWidgetSimpBase.ui +++ b/UiQT5/desWidgetSimpBase.ui @@ -6,8 +6,8 @@ 0 0 - 743 - 60 + 613 + 56 @@ -175,7 +175,7 @@ - + 0 0 @@ -199,7 +199,7 @@ border:0px; - + Qt::Horizontal @@ -208,23 +208,68 @@ border:0px; - 3 + 5 20 + + + + + 0 + 0 + + + + TextLabel + + + Qt::Horizontal - QSizePolicy::Expanding + QSizePolicy::Minimum - 58 + 5 + 20 + + + + + + + + + 0 + 0 + + + + Active le parametre comme variable UQ + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 3 20 diff --git a/UiQT5/desWidgetSimpComplexe.ui b/UiQT5/desWidgetSimpComplexe.ui index 4e9db7e6..5d21e156 100644 --- a/UiQT5/desWidgetSimpComplexe.ui +++ b/UiQT5/desWidgetSimpComplexe.ui @@ -6,8 +6,8 @@ 0 0 - 1242 - 87 + 940 + 97 @@ -45,13 +45,13 @@ border:0px; 0 - 1 + 0 0 - 1 + 0 @@ -178,74 +178,6 @@ border:0px; - - - - - - 0 - 0 - - - - - 0 - 29 - - - - - 16777215 - 29 - - - - Complexe : a+bj - - - - - - - Qt::Horizontal - - - - 19 - 20 - - - - - - - - - - false - - - - - - - - 0 - 0 - - - - - 50 - 24 - - - - <html><head/><body><p align="center">OU </p></body></html> - - - - 4 @@ -269,7 +201,7 @@ border:0px; - + @@ -300,22 +232,59 @@ border:0px; - - - - Qt::Vertical - - - - 17 - 20 - - - - + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + + 0 + 0 + + + + + 25 + 25 + + + + + 178 + 16777215 + + + + QFrame::NoFrame + + + <html><head/><body><p>aaa</p></body></html> + + + false + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + @@ -380,8 +349,6 @@ border:0px; - LEComp - RBRI RBMP RBPoubelle diff --git a/UiQT5/desWidgetTuple10.ui b/UiQT5/desWidgetTuple10.ui index e3c04710..ef748cf4 100644 --- a/UiQT5/desWidgetTuple10.ui +++ b/UiQT5/desWidgetTuple10.ui @@ -161,6 +161,12 @@ + + 2 + + + 2 + @@ -276,7 +282,7 @@ border:0px; - + 0 @@ -312,7 +318,7 @@ border:0px; - + 0 @@ -348,7 +354,7 @@ border:0px; - + 0 @@ -384,7 +390,7 @@ border:0px; - + 0 @@ -420,7 +426,7 @@ border:0px; - + 0 @@ -456,7 +462,7 @@ border:0px; - + 0 @@ -498,6 +504,45 @@ border:0px; + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + TextLabel + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + @@ -579,11 +624,6 @@ border:0px; QLabel
monLabelClic.h
- - LECustomTuple - QLineEdit -
gereListe.h
-
diff --git a/UiQT5/desWidgetTuple2.ui b/UiQT5/desWidgetTuple2.ui index 9c45154b..d540c457 100644 --- a/UiQT5/desWidgetTuple2.ui +++ b/UiQT5/desWidgetTuple2.ui @@ -36,13 +36,13 @@ 0
- 1 + 2 0 - 1 + 2 @@ -261,7 +261,27 @@ border:0px; - 58 + 5 + 20 + + +
+
+ + + + TextLabel + + + + + + + Qt::Horizontal + + + + 80 20 @@ -315,7 +335,7 @@ border:0px; 20 - 5 + 13 diff --git a/UiQT5/desWidgetTuple3.ui b/UiQT5/desWidgetTuple3.ui index a31e9b55..3e0fc3c2 100644 --- a/UiQT5/desWidgetTuple3.ui +++ b/UiQT5/desWidgetTuple3.ui @@ -33,13 +33,13 @@ 1 - 0 + 2 0 - 1 + 2 @@ -275,6 +275,29 @@ border:0px; + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + TextLabel + + + diff --git a/UiQT5/desWidgetTuple4.ui b/UiQT5/desWidgetTuple4.ui index c939a9fb..ef4d83cc 100644 --- a/UiQT5/desWidgetTuple4.ui +++ b/UiQT5/desWidgetTuple4.ui @@ -33,13 +33,13 @@ 1 - 0 + 2 0 - 1 + 2 @@ -276,7 +276,7 @@ border:0px; - + 0 @@ -311,6 +311,29 @@ border:0px; + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + TextLabel + + + @@ -392,11 +415,6 @@ border:0px; QLabel
monLabelClic.h
- - LECustomTuple - QLineEdit -
gereListe.h
-
diff --git a/UiQT5/desWidgetTuple5.ui b/UiQT5/desWidgetTuple5.ui index c592ac6d..b687f748 100644 --- a/UiQT5/desWidgetTuple5.ui +++ b/UiQT5/desWidgetTuple5.ui @@ -33,13 +33,13 @@ 1
- 0 + 2 0 - 1 + 2 @@ -276,7 +276,7 @@ border:0px; - + 0 @@ -312,7 +312,7 @@ border:0px; - + 0 @@ -347,6 +347,29 @@ border:0px; + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + TextLabel + + + @@ -428,11 +451,6 @@ border:0px; QLabel
monLabelClic.h
- - LECustomTuple - QLineEdit -
gereListe.h
-
diff --git a/UiQT5/desWidgetTuple6.ui b/UiQT5/desWidgetTuple6.ui index 92aac0af..b90b6fb1 100644 --- a/UiQT5/desWidgetTuple6.ui +++ b/UiQT5/desWidgetTuple6.ui @@ -33,13 +33,13 @@ 1
- 0 + 2 0 - 1 + 2 @@ -276,7 +276,7 @@ border:0px; - + 0 @@ -312,7 +312,7 @@ border:0px; - + 0 @@ -348,7 +348,7 @@ border:0px; - + 0 @@ -383,6 +383,29 @@ border:0px; + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + TextLabel + + + @@ -464,11 +487,6 @@ border:0px; QLabel
monLabelClic.h
- - LECustomTuple - QLineEdit -
gereListe.h
-
diff --git a/UiQT5/desWidgetTuple7.ui b/UiQT5/desWidgetTuple7.ui index 43b719de..cb871f51 100644 --- a/UiQT5/desWidgetTuple7.ui +++ b/UiQT5/desWidgetTuple7.ui @@ -33,13 +33,13 @@ 1
- 0 + 2 0 - 1 + 2 @@ -276,7 +276,7 @@ border:0px; - + 0 @@ -312,7 +312,7 @@ border:0px; - + 0 @@ -348,7 +348,7 @@ border:0px; - + 0 @@ -384,7 +384,7 @@ border:0px; - + 0 @@ -432,6 +432,42 @@ border:0px;
+ + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + TextLabel + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -500,11 +536,6 @@ border:0px; QLabel
monLabelClic.h
- - LECustomTuple - QLineEdit -
gereListe.h
-
diff --git a/UiQT5/desWidgetTuple8.ui b/UiQT5/desWidgetTuple8.ui index 6cbb52dd..a7c44b12 100644 --- a/UiQT5/desWidgetTuple8.ui +++ b/UiQT5/desWidgetTuple8.ui @@ -33,13 +33,13 @@ 1
- 0 + 2 0 - 1 + 2 @@ -276,7 +276,7 @@ border:0px;
- + 0 @@ -312,7 +312,7 @@ border:0px; - + 0 @@ -348,7 +348,7 @@ border:0px; - + 0 @@ -384,7 +384,7 @@ border:0px; - + 0 @@ -420,7 +420,7 @@ border:0px; - + 0 @@ -455,6 +455,22 @@ border:0px; + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + @@ -468,6 +484,29 @@ border:0px; + + + + TextLabel + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + @@ -536,11 +575,6 @@ border:0px; QLabel
monLabelClic.h
- - LECustomTuple - QLineEdit -
gereListe.h
-
diff --git a/UiQT5/desWidgetTuple9.ui b/UiQT5/desWidgetTuple9.ui index 7dde5439..87644824 100644 --- a/UiQT5/desWidgetTuple9.ui +++ b/UiQT5/desWidgetTuple9.ui @@ -30,16 +30,16 @@ 0
- 1 + 0 - 0 + 2 0 - 1 + 2 @@ -276,7 +276,7 @@ border:0px;
- + 0 @@ -312,7 +312,7 @@ border:0px; - + 0 @@ -348,7 +348,7 @@ border:0px; - + 0 @@ -384,7 +384,7 @@ border:0px; - + 0 @@ -420,7 +420,7 @@ border:0px; - + 0 @@ -456,7 +456,7 @@ border:0px; - + 0 @@ -491,6 +491,45 @@ border:0px; + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + + + + + TextLabel + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 10 + 20 + + + + @@ -572,11 +611,6 @@ border:0px; QLabel
monLabelClic.h
- - LECustomTuple - QLineEdit -
gereListe.h
-
diff --git a/UiQT5/eficas_en.qm b/UiQT5/eficas_en.qm new file mode 100644 index 0000000000000000000000000000000000000000..a081280e13cc257ac99c9ca61059ffc8a46750f8 GIT binary patch literal 81252 zcmeIb37A|()i++V&-85B6G8}`$udbuW|9yPLI@-?69{BuW)dJEp=YKiY3S)5x~H?? zf`TXtA};tUprD8tH+=Esuecx*LBtI~P+Sm2{1jOf1aSes->=TSb+_tSAn@{ko(~?V z>F#^0PMtb+_Byrlt9{e%dHR|we>iK#x6b~=H-EiGsi|L8s_frN{rG%oAN;AbkAG3A z@|jBAd%Lthe@NOV|4XTgXO+67S*fZ`N?rE}r4BnrseM;Vdvk-dU*3%N45b>ruGCU| z_t`f~`~4wle|VX+Kkk>t zr2WsQbX!t}d0_mKiuX%f{WED}m@mJtOH120S=x!KrJeK}X{X*T?ezbacE%mjHdQLs z^)aP-7b<+I+7nO`i>%ou*3f#++|ETb19dlsf8hRsP_6 zmHOTb(tdx7v_GtN+LW|E`kS=BenQ%ZKP&BTej)Ae&yeNc*2z zx-BWWOWKMfrLF#ww6QK}>t;&ZuwL46*GN0*R%xeRFYWZpq@D3mX%G3as#yOwRWkDv zs^T-i`P=$b#jUphuN|uD(r+kr{j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QDC7_Qb&d?>MagIP4C6g>4W+BQ8yB7sOy^k|pLx PBMkkIUxF1VEh+iG{mI#b literal 0 HcmV?d00001 diff --git a/UiQT5/eficas_fr.qm b/UiQT5/eficas_fr.qm new file mode 100644 index 0000000000000000000000000000000000000000..9dad8dffceb9623e88f8b96d9cd0caf25574c6fa GIT binary patch literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iIEWihQJ9+ literal 0 HcmV?d00001 diff --git a/UiQT5/myMain.ui.pn b/UiQT5/myMain.ui.pn new file mode 100644 index 00000000..9661a101 --- /dev/null +++ b/UiQT5/myMain.ui.pn @@ -0,0 +1,497 @@ + + + Eficas + + + + 0 + 0 + 1676 + 811 + + + + + 0 + 0 + + + + MainWindow + + + /* QMenuBar { + background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0 rgb(226,255,253), stop:1 rgb(191,237,255)); + }*/ + +QMenuBar { + background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0 rgb(164,165,178), stop:1 rgb(55,66,126)); + } + QMenuBar::item { + spacing: 3px; /* spacing between menu bar items */ + color: white; + padding: 1px 4px; + background: transparent; + border-radius: 4px; + } + + QMenuBar::item:selected { /* when selected using mouse or keyboard */ + background: #a8a8a8; + } + + QMenuBar::item:pressed { + background: #888888; + } + + + + + + + + + + + + + QComboBox{combobox-popup:0;} + + + + + 0 + 0 + 129 + 120 + + + + + + + + 0 + 60 + + + + + 16777215 + 60 + + + + /*background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0 rgb(218,229,248), stop:1 rgb(9,86,109));*/ +/*background-color:rgb(208,225,238)*/ + + + QFrame::NoFrame + + + QFrame::Raised + + + 2 + + + + + + + background-color:rgb(224,223,222) + + + QTabWidget::North + + + 0 + + + true + + + + Tab 1 + + + + + + + + + + + 0 + 0 + 1676 + 21 + + + + + &Fichier + + + + + + + + + + + + + + + + &Edition + + + + + + + + + + + + + &JeuDeDonnées + + + + + + + + + + + + + + + &Aide + + + + + + + + + + + + + + toolBar + + + + 36 + 36 + + + + TopToolBarArea + + + false + + + + + + + + + + + + + + + toolBar_2 + + + TopToolBarArea + + + false + + + + + + ../../../.designer/backup../../../.designer/backup + + + &Nouveau + + + Ctrl+N + + + + + Nouvel Include + + + Shift+I + + + + + &bad + + + + + + ../../../.designer/backup../../../.designer/backup + + + &Ouvrir + + + Ctrl+O + + + + + + ../../../.designer/backup../../../.designer/backup + + + Enregistrer + + + Ctrl+S + + + + + Parametres Eficas + + + + + + ../../../.designer/backup../../../.designer/backup + + + Enregistrer sous + + + Ctrl+Shift+S + + + + + Fermer + + + Ctrl+W + + + + + Fermer tout + + + + + + ../../../.designer/backup../../../.designer/backup + + + Couper + + + Ctrl+X + + + Qt::ApplicationShortcut + + + + + + ../../../.designer/backup../../../.designer/backup + + + Copier + + + Ctrl+C + + + Qt::ApplicationShortcut + + + + + + ../../../.designer/backup../../../.designer/backup + + + Coller + + + Ctrl+V + + + Qt::ApplicationShortcut + + + + + Quitter + + + Ctrl+Q + + + + + Rapport de Validation + + + Shift+V + + + false + + + + + Fichier Source + + + + + Fichier Résultat + + + + + + ../../../.designer/backup../../../.designer/backup + + + Lecteur documentation + + + + + Eficas + + + + + Version + + + + + + ../../../.designer/backup../../../.designer/backup + + + Supprimer + + + + + Chercher Mot-Clef + + + Rechercher dans le catalogue + + + Shift+F + + + Qt::ApplicationShortcut + + + + + + ../../../.designer/backup../../../.designer/backup + + + Rechercher + + + Rechercher dans l'arbre d'etude + + + Ctrl+F + + + Qt::ApplicationShortcut + + + + + Replier/Deplier + + + Shift+D + + + + + Commentaire + + + Shift+C + + + + + + ../../../.designer/Editeur/icons/parametres.png../../../.designer/Editeur/icons/parametres.png + + + Paramètres + + + Gestion des paramètres + + + Shift+P + + + + + Parametre Eficas + + + + + Régles du JdC + + + + + Cacher l'Arbre + + + + + Afficher l'Arbre + + + + + + diff --git a/Vimmp/cata_CSAndCPS_v16.py b/Vimmp/cata_CSAndCPS_v16.py index 1fb59bc1..e6cc46db 100644 --- a/Vimmp/cata_CSAndCPS_v16.py +++ b/Vimmp/cata_CSAndCPS_v16.py @@ -1,3 +1,4 @@ + from Accas import * VERSION_CATALOGUE='VimmpV16' @@ -63,7 +64,7 @@ dictCodeModeleNumerique = { 'STAR_CCM+' : ('FV', 'Particles',), 'Code Nill' : ('Spectral method', ), } -# Le Code Nill est ajouté en dur au Solver +# Le Code Nill est ajoute en dur au Solver dictCodeFormat = { 'Code_Saturne' : ('Med', 'cgns', 'msh', 'des', 'unv', ), @@ -195,8 +196,7 @@ def prepareBlocAmbiantMediaField(condition, nomDuFact, nomDelaContante) : dicoDesBlocs = {} dicoDuFact = {} dicoDuFact[nomDelaContante] = SIMP(typ='TXM', statut='o', defaut = nomDelaContante, homo='constant') - monFact = FACT ( statut ='o', - **dicoDuFact, + monFact = FACT ( statut='o', **dicoDuFact, SteadyState = SIMP(typ=bool, statut ='o', defaut = True,), blocSteadyState = BLOC(condition = 'SteadyState == True', FieldOrigin = SIMP(statut='o', into =['File', 'Value','Interaction'], typ ='TXM',), diff --git a/Vimmp/cata_CSAndCPS_v16.xsd b/Vimmp/cata_CSAndCPS_v16.xsd new file mode 100644 index 00000000..1bf9423d --- /dev/null +++ b/Vimmp/cata_CSAndCPS_v16.xsd @@ -0,0 +1,4058 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Nanotube length [m] + + + + + + + + + radius length [m] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {'T_SubgridScaleModel': {'_SubgridScaleModel_blocOnePoint_blocOneSpatial_TurbulenceForFlowDynamics_blocFlowNatureTurbulent_blocFluideMacro_PhysicalDescription_Component': 'T_SubgridScaleModel', '_SubgridScaleModel_blocFDF_blocOneSpatial_TurbulenceForFlowDynamics_blocFlowNatureTurbulent_blocFluideMacro_PhysicalDescription_Component': 'T_SubgridScaleModel', '_SubgridScaleModel_blocOnePoint_blocOneSpatial_ScalarsTurbulenceModelling_blocAsTFFD_blocFlowNatureTurbulentForScalars_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_SubgridScaleModel_3', '_SubgridScaleModel_blocFDF_blocOneSpatial_ScalarsTurbulenceModelling_blocAsTFFD_blocFlowNatureTurbulentForScalars_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_SubgridScaleModel_3', '_SubgridScaleModel_blocOnePoint_blocOneSpatial_ScalarFluxModel_blocScalarFluidTurbulentAndNonComplexe_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_SubgridScaleModel_6', '_SubgridScaleModel_blocFDF_blocOneSpatial_ScalarFluxModel_blocScalarFluidTurbulentAndNonComplexe_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_SubgridScaleModel_6'}, 'T_ChoiceOfDescription': {'_ChoiceOfDescription_blocOneSpatial_TurbulenceForFlowDynamics_blocFlowNatureTurbulent_blocFluideMacro_PhysicalDescription_Component': 'T_ChoiceOfDescription', '_ChoiceOfDescription_blocOnePointPdf_TurbulenceForFlowDynamics_blocFlowNatureTurbulent_blocFluideMacro_PhysicalDescription_Component': 'T_ChoiceOfDescription', '_ChoiceOfDescription_blocOneSpatial_ScalarsTurbulenceModelling_blocAsTFFD_blocFlowNatureTurbulentForScalars_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_ChoiceOfDescription_2', '_ChoiceOfDescription_blocOnePointPdf_ScalarsTurbulenceModelling_blocAsTFFD_blocFlowNatureTurbulentForScalars_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_ChoiceOfDescription_2', '_ChoiceOfDescription_blocOneSpatial_ScalarFluxModel_blocScalarFluidTurbulentAndNonComplexe_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_ChoiceOfDescription_4', '_ChoiceOfDescription_blocOnePointPdf_ScalarFluxModel_blocScalarFluidTurbulentAndNonComplexe_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_ChoiceOfDescription_4', '_ChoiceOfDescription_blocOneSpatial_blocTurbulent_NatureOfFluidForce_DefineForceOnParticle_blocHydro_blocMomentum_MomentumExchange_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_ChoiceOfDescription_6', '_ChoiceOfDescription_blocOnePointPdf_blocTurbulent_NatureOfFluidForce_DefineForceOnParticle_blocHydro_blocMomentum_MomentumExchange_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_ChoiceOfDescription_6'}, 'T_Density': {'_Density_blocDensityValue_DensityInitialisation_blocFluideMacro_PhysicalDescription_Component': 'T_Density', '_Density_Weight_Properties_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_Density_1'}, 'T_RANSModel': {'_RANSModel_blocOnePoint_TurbulenceForFlowDynamics_blocFlowNatureTurbulent_blocFluideMacro_PhysicalDescription_Component': 'T_RANSModel', '_RANSModel_blocOnePoint_ScalarsTurbulenceModelling_blocAsTFFD_blocFlowNatureTurbulentForScalars_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_RANSModel_1', '_RANSModel_blocOnePoint_ScalarFluxModel_blocScalarFluidTurbulentAndNonComplexe_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_RANSModel_1', '_RANSModel_blocOnePoint_blocTurbulent_NatureOfFluidForce_DefineForceOnParticle_blocHydro_blocMomentum_MomentumExchange_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_RANSModel'}, 'T_InteractionName': {'_InteractionName_blocInteractionPressure_blocSteadyState_PressureDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedPressure_PressureDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedDiameter_ParticleDiameter_StateVector_blocCPS_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedPosition_ParticlePosition_StateVector_blocCPS_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Origin_blocNoSimulatedPosition_ParticlePosition_StateVector_blocCPS_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedVelocity_VelocityDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedKDefinition_KDefinition_blocTurbulenceTWMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedEpsilonDefinition_EpsilonDefinition_blocTurbulenceTWMChoice2_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedOmegaDefinition_OmegaDefinition_blocTurbulenceTWMChoice3_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedRijDefinition_RijDefinition_blocTurbulenceRSMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedMass_ParticleMass_StateVector_blocCPS_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocSimulatedVelocity_ParticleVelocity_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Initialisation_blocHydrodynamicVelocity_FluidVelocitySeenByParticles_blocHydrodynamic_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocByInteraction_Origin_blocNotSimulatedVelocity_ParticleVelocity_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocInteractionVelocity_blocSteady_VelocityDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocKInteraction_blocSteady_KDefinition_blocTurbulenceTWMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocEpsilonInteraction_blocSteady_EpsilonDefinition_blocTurbulenceTWMChoice2_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocOmegaInteraction_blocSteady_OmegaDefinition_blocTurbulenceTWMChoice3_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocRijInteraction_blocSteady_RijDefinition_blocTurbulenceRSMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocInteractionInit_Initialisation_blocSimulatedScalar_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocInteractionScalar_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocInteraction_blocSteadyState_DefineElectricForce_blocElectric_blocMomentum_MomentumExchange_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_blocInteraction_blocSteadyState_DefineMagneticForce_blocMagnetic_blocMomentum_MomentumExchange_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_InteractionName', '_InteractionName_Interaction_Interactions': 'T_InteractionName_10'}, 'T_Initialisation': {'_Initialisation_blocSimulatedPressure_PressureDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Initialisation', '_Initialisation_blocSimulatedVelocity_VelocityDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Initialisation', '_Initialisation_blocSimulatedKDefinition_KDefinition_blocTurbulenceTWMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Initialisation', '_Initialisation_blocSimulatedEpsilonDefinition_EpsilonDefinition_blocTurbulenceTWMChoice2_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Initialisation', '_Initialisation_blocSimulatedOmegaDefinition_OmegaDefinition_blocTurbulenceTWMChoice3_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Initialisation', '_Initialisation_blocSimulatedRijDefinition_RijDefinition_blocTurbulenceRSMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Initialisation', '_Initialisation_blocSimulatedScalar_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_Initialisation_6', '_Initialisation_blocSimulatedDiameter_ParticleDiameter_StateVector_blocCPS_PhysicalDescription_Component': 'T_Initialisation_7', '_Initialisation_blocSimulatedMass_ParticleMass_StateVector_blocCPS_PhysicalDescription_Component': 'T_Initialisation_7', '_Initialisation_blocSimulatedVelocity_ParticleVelocity_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_Initialisation_7', '_Initialisation_blocHydrodynamicVelocity_FluidVelocitySeenByParticles_blocHydrodynamic_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_Initialisation_7', '_Initialisation_blocSimulatedPosition_ParticlePosition_StateVector_blocCPS_PhysicalDescription_Component': 'T_Initialisation_9'}, 'T_InitialisationType': {'_InitialisationType_Initialisation_blocSimulatedPressure_PressureDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InitialisationType', '_InitialisationType_Initialisation_blocSimulatedVelocity_VelocityDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InitialisationType', '_InitialisationType_Initialisation_blocSimulatedKDefinition_KDefinition_blocTurbulenceTWMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InitialisationType', '_InitialisationType_Initialisation_blocSimulatedEpsilonDefinition_EpsilonDefinition_blocTurbulenceTWMChoice2_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InitialisationType', '_InitialisationType_Initialisation_blocSimulatedOmegaDefinition_OmegaDefinition_blocTurbulenceTWMChoice3_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InitialisationType', '_InitialisationType_Initialisation_blocSimulatedRijDefinition_RijDefinition_blocTurbulenceRSMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_InitialisationType', '_InitialisationType_DefineGravityForce_blocGravite_blocMomentum_MomentumExchange_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_InitialisationType_1', '_InitialisationType_BlocInitialisationLangevin_blocTMD_blocTurbulent_NatureOfFluidForce_DefineForceOnParticle_blocHydro_blocMomentum_MomentumExchange_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_InitialisationType_2', '_InitialisationType_Initialisation_blocSimulatedDiameter_ParticleDiameter_StateVector_blocCPS_PhysicalDescription_Component': 'T_InitialisationType_3', '_InitialisationType_Initialisation_blocSimulatedMass_ParticleMass_StateVector_blocCPS_PhysicalDescription_Component': 'T_InitialisationType_3', '_InitialisationType_Initialisation_blocSimulatedVelocity_ParticleVelocity_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_InitialisationType_3', '_InitialisationType_Initialisation_blocHydrodynamicVelocity_FluidVelocitySeenByParticles_blocHydrodynamic_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_InitialisationType_3', '_InitialisationType_Initialisation_blocSimulatedPosition_ParticlePosition_StateVector_blocCPS_PhysicalDescription_Component': 'T_InitialisationType_3'}, 'T_FileFormat': {'_FileFormat_blocByFile_Initialisation_blocSimulatedPressure_PressureDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocSimulatedDiameter_ParticleDiameter_StateVector_blocCPS_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocSimulatedPosition_ParticlePosition_StateVector_blocCPS_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocSimulatedVelocity_VelocityDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocSimulatedKDefinition_KDefinition_blocTurbulenceTWMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocSimulatedEpsilonDefinition_EpsilonDefinition_blocTurbulenceTWMChoice2_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocSimulatedOmegaDefinition_OmegaDefinition_blocTurbulenceTWMChoice3_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocSimulatedRijDefinition_RijDefinition_blocTurbulenceRSMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocSimulatedMass_ParticleMass_StateVector_blocCPS_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocSimulatedVelocity_ParticleVelocity_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Initialisation_blocHydrodynamicVelocity_FluidVelocitySeenByParticles_blocHydrodynamic_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_BlocInitialisationLangevin_blocTMD_blocTurbulent_NatureOfFluidForce_DefineForceOnParticle_blocHydro_blocMomentum_MomentumExchange_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_FileFormat_1', '_FileFormat_blocByFile_Origin_blocNoSimulatedPosition_ParticlePosition_StateVector_blocCPS_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_blocByFile_Origin_blocNotSimulatedVelocity_ParticleVelocity_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_FileFormat', '_FileFormat_monBlocFormat_FileTransfer_IOAspects_Interactions': 'T_FileFormat'}, 'T_OriginOfSourceTerm': {'_OriginOfSourceTerm_blocSourceTerm_blocSimulatedPressure_PressureDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_OriginOfSourceTerm', '_OriginOfSourceTerm_blocSourceTerm_blocSimulatedVelocity_VelocityDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_OriginOfSourceTerm', '_OriginOfSourceTerm_blocSourceTerm_blocSimulatedKDefinition_KDefinition_blocTurbulenceTWMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_OriginOfSourceTerm', '_OriginOfSourceTerm_blocSourceTerm_blocSimulatedEpsilonDefinition_EpsilonDefinition_blocTurbulenceTWMChoice2_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_OriginOfSourceTerm', '_OriginOfSourceTerm_blocSourceTerm_blocSimulatedOmegaDefinition_OmegaDefinition_blocTurbulenceTWMChoice3_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_OriginOfSourceTerm', '_OriginOfSourceTerm_blocSourceTerm_blocSimulatedRijDefinition_RijDefinition_blocTurbulenceRSMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_OriginOfSourceTerm', '_OriginOfSourceTerm_blocSourceTerm_TemperatureScalar_blocThermalEffectsOn_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_OriginOfSourceTerm', '_OriginOfSourceTerm_blocSourceTerm_blocSimulatedScalar_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_OriginOfSourceTerm', '_OriginOfSourceTerm_blocSourceTerm_Initialisation_blocSimulatedDiameter_ParticleDiameter_StateVector_blocCPS_PhysicalDescription_Component': 'T_OriginOfSourceTerm_1', '_OriginOfSourceTerm_blocSourceTerm_Initialisation_blocSimulatedMass_ParticleMass_StateVector_blocCPS_PhysicalDescription_Component': 'T_OriginOfSourceTerm_1', '_OriginOfSourceTerm_blocSourceTerm_Initialisation_blocSimulatedVelocity_ParticleVelocity_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_OriginOfSourceTerm_1', '_OriginOfSourceTerm_blocSourceTerm_Initialisation_blocHydrodynamicVelocity_FluidVelocitySeenByParticles_blocHydrodynamic_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_OriginOfSourceTerm_1'}, 'T_TakenFrom': {'_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_blocSimulatedPressure_PressureDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_TakenFrom', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_blocSimulatedVelocity_VelocityDefinition_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_TakenFrom', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_blocSimulatedKDefinition_KDefinition_blocTurbulenceTWMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_TakenFrom', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_blocSimulatedEpsilonDefinition_EpsilonDefinition_blocTurbulenceTWMChoice2_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_TakenFrom', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_blocSimulatedOmegaDefinition_OmegaDefinition_blocTurbulenceTWMChoice3_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_TakenFrom', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_blocSimulatedRijDefinition_RijDefinition_blocTurbulenceRSMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_TakenFrom', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_TemperatureScalar_blocThermalEffectsOn_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_TakenFrom', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_blocSimulatedScalar_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_TakenFrom', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_Initialisation_blocSimulatedDiameter_ParticleDiameter_StateVector_blocCPS_PhysicalDescription_Component': 'T_TakenFrom_1', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_Initialisation_blocSimulatedMass_ParticleMass_StateVector_blocCPS_PhysicalDescription_Component': 'T_TakenFrom_1', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_Initialisation_blocSimulatedVelocity_ParticleVelocity_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_TakenFrom_1', '_TakenFrom_blocOriginOfSourceTermOtherScalar_blocSourceTerm_Initialisation_blocHydrodynamicVelocity_FluidVelocitySeenByParticles_blocHydrodynamic_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_TakenFrom_1'}, 'T_Name': {'_Name_KDefinition_blocTurbulenceTWMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Name', '_Name_EpsilonDefinition_blocTurbulenceTWMChoice2_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Name_1', '_Name_OmegaDefinition_blocTurbulenceTWMChoice3_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Name_2', '_Name_RijDefinition_blocTurbulenceRSMChoice1_BFlowNatureTurbulent_DynamicalVariables_blocFluideMacro_PhysicalDescription_Component': 'T_Name_3', '_Name_TemperatureScalar_blocThermalEffectsOn_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_Name_4', '_Name_Scalar_blocwithScalars_Scalars_blocScalarFluidTurbulentOrLaminar_blocFluideMacro_PhysicalDescription_Component': 'T_Name_5'}, 'T_Shape': {'_Shape_blocMolecule_Particles_blocCPS_PhysicalDescription_Component': 'T_Shape', '_Shape_SystemGeometry_SpatialAspects': 'T_Shape_1'}, 'T_BondedParticles': {'_BondedParticles_blocDissipative_Particles_blocCPS_PhysicalDescription_Component': 'T_BondedParticles', '_BondedParticles_b_SolidAggregateBonded_Properties_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_BondedParticles_1', '_BondedParticles_BondedInteractions_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_BondedParticles', '_BondedParticles_BondedInteractions_bDiscretized_TypeOfWall_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_BondedParticles_3'}, 'T_FractalDimension': {'_FractalDimension_Morphology_b_SolidAggregate_blocTypeDPSolid_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_FractalDimension', '_FractalDimension_Morphological_b_SolidAggregate_Properties_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_FractalDimension_1'}, 'T_EquivalentSize': {'_EquivalentSize_Morphology_b_SolidAggregate_blocTypeDPSolid_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_EquivalentSize', '_EquivalentSize_Morphological_b_SolidAggregate_Properties_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_EquivalentSize_1'}, 'T_Porosity': {'_Porosity_Morphology_b_SolidAggregate_blocTypeDPSolid_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_Porosity', '_Porosity_Morphological_b_SolidAggregate_Properties_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_Porosity_1'}, 'T_Mass': {'_Mass_Weight_Properties_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_Mass', '_Mass_ParticleMass_StateVector_blocCPS_PhysicalDescription_Component': 'T_Mass_1'}, 'T_ListOfBondedParticles': {'_ListOfBondedParticles_BondedParticles_b_SolidAggregateBonded_Properties_blocDiscrete_Particles_blocCPS_PhysicalDescription_Component': 'T_ListOfBondedParticles', '_ListOfBondedParticles_FENEParameters_blocFENE_bBondStretching_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_ListOfBondedParticles_1', '_ListOfBondedParticles_BondHarmonicParameters_blocharmonic_bBondStretching_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_ListOfBondedParticles_2', '_ListOfBondedParticles_FENEParameters_blocFENE_bBondStretching_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_bDiscretized_TypeOfWall_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_ListOfBondedParticles_3', '_ListOfBondedParticles_BondHarmonicParameters_blocharmonic_bBondStretching_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_bDiscretized_TypeOfWall_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_ListOfBondedParticles_4'}, 'T_Direction': {'_Direction_blocInitValue_DefineGravityForce_blocGravite_blocMomentum_MomentumExchange_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_Direction', '_Direction_blocPeriodique_BoundaryCondition_BoundaryConditions_Component': 'T_Direction_1'}, 'T_LevelOfDescription': {'_LevelOfDescription_bAmbientInducedProcessesType_blocAmbientInducedProcesses_AmbientInducedProcesses_AmbiantMediaInteraction_blocCPS_PhysicalDescription_Component': 'T_LevelOfDescription', '_LevelOfDescription_bwithContact_ContactPhenomena_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_LevelOfDescription_1', '_LevelOfDescription_TypeOfWall_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_LevelOfDescription_2', '_LevelOfDescription_bwithContact_ContactPhenomena_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_LevelOfDescription_1', '_LevelOfDescription_blocWall_BoundaryCondition_BoundaryConditions_Component': 'T_LevelOfDescription_4'}, 'T_BondedInteractions': {'_BondedInteractions_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_BondedInteractions', '_BondedInteractions_bDiscretized_TypeOfWall_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_BondedInteractions_1'}, 'T_BondedInteraction': {'_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_BondedInteraction', '_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_bDiscretized_TypeOfWall_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_BondedInteraction_1'}, 'T_FENEParameters': {'_FENEParameters_blocFENE_bBondStretching_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_FENEParameters', '_FENEParameters_blocFENE_bBondStretching_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_bDiscretized_TypeOfWall_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_FENEParameters_1'}, 'T_BondHarmonicParameters': {'_BondHarmonicParameters_blocharmonic_bBondStretching_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_BondHarmonicParameters', '_BondHarmonicParameters_blocharmonic_bBondStretching_BondedInteraction_blocNoTopologyFile_blocBonded_BondedInteractions_bDiscretized_TypeOfWall_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_BondHarmonicParameters_1'}, 'T_ActionsAtDistance': {'_ActionsAtDistance_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_ActionsAtDistance', '_ActionsAtDistance_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_ActionsAtDistance_1'}, 'T_ContactPhenomena': {'_ContactPhenomena_ParticleParticleInteraction_blocCPS_PhysicalDescription_Component': 'T_ContactPhenomena', '_ContactPhenomena_bwithParticleWallInteraction_ParticleWallInteraction_blocCPS_PhysicalDescription_Component': 'T_ContactPhenomena_1'}, 'T_ParticleVelocity': {'_ParticleVelocity_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_ParticleVelocity', '_ParticleVelocity_blocNoBrownianDynamics_blocInlet2_BoundaryCondition_BoundaryConditions_Component': 'T_ParticleVelocity_1'}, 'T_FluidVelocitySeenByParticles': {'_FluidVelocitySeenByParticles_blocHydrodynamic_blocNoBrownianDynamics_StateVector_blocCPS_PhysicalDescription_Component': 'T_FluidVelocitySeenByParticles', '_FluidVelocitySeenByParticles_blocHydrodynamic_blocNoBrownianDynamics_blocInlet2_BoundaryCondition_BoundaryConditions_Component': 'T_FluidVelocitySeenByParticles_1'}, 'T_TransferId': {'_TransferId_FileTransfer_IOAspects_Interactions': 'T_TransferId', '_TransferId_MemoryTransfer_IOAspects_Interactions': 'T_TransferId_1', '_TransferId_CorbaTransfer_IOAspects_Interactions': 'T_TransferId_2'}} + + + + + \ No newline at end of file diff --git a/Vimmp/generateXSD.py b/Vimmp/generateXSD.py new file mode 100755 index 00000000..3f8ad835 --- /dev/null +++ b/Vimmp/generateXSD.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2013 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + cree le .xsd associe au .py + generateXSD.py -c leCatalogueAVECSONNOMCOMPLET POUR TROUVER LE DRIVER + 23 avril +""" +# Modules Python +# Modules Eficas +import sys +import os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +from InterfaceQT4 import eficas_go +eficas_go.genereXSD(code='NonConnu') -- 2.39.2