From e579ab6b0ab13c801659c23fa77b2aa7d16738da Mon Sep 17 00:00:00 2001 From: Eric Fayolle Date: Wed, 22 Jun 2022 17:01:20 +0200 Subject: [PATCH] Corrections diverses --- ReacteurNumerique/cata_UQ.py | 1 - generator/generator_UQ.py | 15 ++++++--------- generator/textePersalys.py | 2 -- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ReacteurNumerique/cata_UQ.py b/ReacteurNumerique/cata_UQ.py index 613b8c93..ffcec4e3 100644 --- a/ReacteurNumerique/cata_UQ.py +++ b/ReacteurNumerique/cata_UQ.py @@ -1742,7 +1742,6 @@ def creeOperExpressionIncertitude(monDicoVarDeter, monDicoVarSortie): ), # fin Propagation Output=monOutput, Execution = FACT (max=1, statut ='o', - UncertaintyTool = SIMP ( statut = "o", typ = "TXM", into = ['Uranie', 'OpenTurns'], defaut='OpenTurns'), bloc_OT = BLOC (condition = 'UncertaintyTool == "OpenTurns"', ExecutionMode = SIMP ( statut = "o", typ = "TXM", into = ['desktop', 'cluster']), NbOfProcs = SIMP ( statut = 'o', typ ="I" , defaut = 1, val_min = 1), diff --git a/generator/generator_UQ.py b/generator/generator_UQ.py index 7764079e..5e1f7476 100644 --- a/generator/generator_UQ.py +++ b/generator/generator_UQ.py @@ -87,7 +87,7 @@ class UQGenerator(PythonGenerator): def creeNomsFichiers(self,fichier): if fichier.endswith('.comm'): - self.fichierSansSuffixe=fichier[:-5] + self.fichierSansSuffixe=os.path.basename(fichier[:-5]) if self.fichierSansSuffixe.endswith('_UQ'): self.fichierSansSuffixe = self.fichierSansSuffixe[:-3] self.fichierUQComm = self.fichierSansSuffixe+'_UQ.comm' @@ -242,15 +242,12 @@ class UQGenerator(PythonGenerator): def getStrSelfVar(l): return getStrVarList( map(lambda x:'self.{}'.format(x),l), ',' ) - wrapperDir = os.path.abspath(os.path.dirname(__file__)) - wrapperName = "eficas_wrapper" + generatorDir = os.path.abspath(os.path.dirname(__file__)) nomEtude = "monEtude" - if debug : print ('nomEtude : ', nomEtude, 'wrapperDir :', wrapperDir, 'wrapperName : ', wrapperName) + if debug : print ('nomEtude : ', nomEtude, 'generatorDir :', generatorDir) + + self.txtScriptPersalys += headerScriptPersalys - self.txtScriptPersalys += headerScriptPersalys.format ( - wrapperDir=wrapperDir, - wrapperName=wrapperName - ) print('self.nomsDesVariablesInput :',self.nomsDesVariablesInput) self.txtScriptPersalys += etudeScript.format( chaineDesVariablesInput = self.chaineDesVariablesInput, @@ -328,7 +325,7 @@ class UQGenerator(PythonGenerator): wckey = 'P11N0:SALOME' inFiles =[] - inFiles.append(os.path.join(wrapperDir,'incertainty_tools.py')) + inFiles.append(os.path.join(generatorDir,'incertainty_tools.py')) pyFile = self.fichierUQExe inFiles.append(os.path.join(os.getcwd(),pyFile)) pyFile = self.fichierUQBalise diff --git a/generator/textePersalys.py b/generator/textePersalys.py index fe7f7c21..9e835fd8 100644 --- a/generator/textePersalys.py +++ b/generator/textePersalys.py @@ -20,8 +20,6 @@ import os import openturns as ot import persalys -# from {wrapperDir} import {wrapperName} - """ # def run_case(self): -- 2.39.2