From: Pascale Noyret Date: Wed, 19 Nov 2008 08:34:18 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V0_a1_SEPQT4~67 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=72073cd1320ca49c9db18f43d8e7ff12e64c63f1;p=tools%2Feficas.git *** empty log message *** --- diff --git a/Openturns_Study/OpenTURNS_Cata_Study_V1.py b/Openturns_Study/OpenTURNS_Cata_Study_V1.py new file mode 100644 index 00000000..7bad7c17 --- /dev/null +++ b/Openturns_Study/OpenTURNS_Cata_Study_V1.py @@ -0,0 +1,216 @@ +# -*- coding: utf-8 -*- + +# -------------------------------------------------- +# debut entete +# -------------------------------------------------- + +import Accas +from Accas import * + + +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'OPENTURNS_WRAPPER', + execmodul = None, + regles = ( AU_MOINS_UN ( 'WRAPPER' ), ), + ) # Fin JDC_CATA + +# -------------------------------------------------- +# fin entete +# -------------------------------------------------- + + +#================================ +# 2. Definition des variables +#================================ + +VARIABLEPOOL = PROC ( nom = "VARIABLEPOOL", + op = None, + docu = "", + fr = "L'ensemble des variables probabilistes", + ang = "The pool of probabilistic variables", + + + Variables = FACT ( statut = "o", + min = 1, + max = "**", + + + + Name = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Nom de la variable, identique au nom dans le solver.", + ang = "Name of the variable, identical to the name in solver." + ), + + Type = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "in", "out", ), + defaut = "in", + fr = "variable d'entree ou de sortie du solver", + ang = "Input or Output variable", + ), + + Unit = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Unite", + ang = "Unit", + ), + + Comment = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Commentaire", + ang = "Comment", + ), + + Regexp = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Expression reguliere", + ang = "Regular expression", + ), + + Format = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Format d'ecriture", + ang = "Format", + ), + + + ), # Fin FACT Variables + +) # Fin PROC VARIABLEPOOL + + +#================================ +# Definition des parametres du wrapper +#================================ + +# Nota : les variables de type PROC doivent etre en majuscules ! +WRAPPER = PROC ( nom = "WRAPPER", + op = None, + docu = "", + fr = "Mise en donnee pour le fichier de configuration de OPENTURNS.", + ang = "Writes the configuration file for OPENTURNS.", + + + WrapperPath = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Chemin d acces au wrapper", + ang = "Wrapper library path", + ), + + FunctionName = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Nom de la fonction dans le wrapper", + ang = "Function's name in wrapper", + ), + + GradientName = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Nom du gradient dans le wrapper", + ang = "Gradient's name in wrapper", + ), + + HessianName = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Nom du hessian dans le wrapper", + ang = "Hessian's name in wrapper", + ), + + WrapCouplingMode = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "static-link", "dynamic-link", "fork", ), + fr = "Mode de couplage du solver", + ang = "Solver coupling mode", + ), + + Fork = BLOC ( condition = " WrapCouplingMode in ( 'fork', ) ", + + Command = SIMP ( statut = "o", + max = 1, + typ = "TXM", + fr = "Chemin du solver", + ang = "solver path", + ), + ), # Fin BLOC Fork + + State = SIMP ( statut = "f", + typ = "TXM", + max = 1, + into = ( "shared", "specific" ), + fr = "Partage de l'etat interne entre les fonctions", + ang = "Internal state sharing", + ), + + InDataTransfer = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "files", "arguments", ), + fr = "Mode de transfert des donnees d'entree", + ang = "Input transfering mode", + ), + + OutDataTransfer = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "files", "arguments", ), + fr = "Mode de transfert des donnees de sortie", + ang = "Output transfering mode", + ), + + + + + Files = FACT ( statut = "f", + min = 1, + max = "**", + + Id = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Identificateur du fichier", + ang = "File id", + ), + + Type = SIMP ( statut = "o", + typ = "TXM", + max = 1, + into = ( "in", "out", ), + fr = "Fichier d entree ou de sortie du solveur ?", + ang = "Input or Output file ?", + ), + + Name = SIMP ( statut = "f", + typ = "TXM", + max = 1, + fr = "Nom du fichier", + ang = "File name", + ), + + Path = SIMP ( statut = "o", + typ = "TXM", + max = 1, + fr = "Chemin du fichier", + ang = "Path file ", + ), + + Subst = SIMP ( statut = "f", + typ = "TXM", + max = "**", + fr = "Liste de variables", + ang = "List", + ), + + ), # Fin FACT Files + +) # Fin PROC WRAPPER diff --git a/Openturns_Study/OpenTURNS_Cata_Wrapper_V1.py b/Openturns_Study/OpenTURNS_Cata_Wrapper_V1.py deleted file mode 100644 index 7bad7c17..00000000 --- a/Openturns_Study/OpenTURNS_Cata_Wrapper_V1.py +++ /dev/null @@ -1,216 +0,0 @@ -# -*- coding: utf-8 -*- - -# -------------------------------------------------- -# debut entete -# -------------------------------------------------- - -import Accas -from Accas import * - - -#CONTEXT.debug = 1 -JdC = JDC_CATA ( code = 'OPENTURNS_WRAPPER', - execmodul = None, - regles = ( AU_MOINS_UN ( 'WRAPPER' ), ), - ) # Fin JDC_CATA - -# -------------------------------------------------- -# fin entete -# -------------------------------------------------- - - -#================================ -# 2. Definition des variables -#================================ - -VARIABLEPOOL = PROC ( nom = "VARIABLEPOOL", - op = None, - docu = "", - fr = "L'ensemble des variables probabilistes", - ang = "The pool of probabilistic variables", - - - Variables = FACT ( statut = "o", - min = 1, - max = "**", - - - - Name = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Nom de la variable, identique au nom dans le solver.", - ang = "Name of the variable, identical to the name in solver." - ), - - Type = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "in", "out", ), - defaut = "in", - fr = "variable d'entree ou de sortie du solver", - ang = "Input or Output variable", - ), - - Unit = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Unite", - ang = "Unit", - ), - - Comment = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Commentaire", - ang = "Comment", - ), - - Regexp = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Expression reguliere", - ang = "Regular expression", - ), - - Format = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Format d'ecriture", - ang = "Format", - ), - - - ), # Fin FACT Variables - -) # Fin PROC VARIABLEPOOL - - -#================================ -# Definition des parametres du wrapper -#================================ - -# Nota : les variables de type PROC doivent etre en majuscules ! -WRAPPER = PROC ( nom = "WRAPPER", - op = None, - docu = "", - fr = "Mise en donnee pour le fichier de configuration de OPENTURNS.", - ang = "Writes the configuration file for OPENTURNS.", - - - WrapperPath = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Chemin d acces au wrapper", - ang = "Wrapper library path", - ), - - FunctionName = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Nom de la fonction dans le wrapper", - ang = "Function's name in wrapper", - ), - - GradientName = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Nom du gradient dans le wrapper", - ang = "Gradient's name in wrapper", - ), - - HessianName = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Nom du hessian dans le wrapper", - ang = "Hessian's name in wrapper", - ), - - WrapCouplingMode = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "static-link", "dynamic-link", "fork", ), - fr = "Mode de couplage du solver", - ang = "Solver coupling mode", - ), - - Fork = BLOC ( condition = " WrapCouplingMode in ( 'fork', ) ", - - Command = SIMP ( statut = "o", - max = 1, - typ = "TXM", - fr = "Chemin du solver", - ang = "solver path", - ), - ), # Fin BLOC Fork - - State = SIMP ( statut = "f", - typ = "TXM", - max = 1, - into = ( "shared", "specific" ), - fr = "Partage de l'etat interne entre les fonctions", - ang = "Internal state sharing", - ), - - InDataTransfer = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "files", "arguments", ), - fr = "Mode de transfert des donnees d'entree", - ang = "Input transfering mode", - ), - - OutDataTransfer = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "files", "arguments", ), - fr = "Mode de transfert des donnees de sortie", - ang = "Output transfering mode", - ), - - - - - Files = FACT ( statut = "f", - min = 1, - max = "**", - - Id = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Identificateur du fichier", - ang = "File id", - ), - - Type = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "in", "out", ), - fr = "Fichier d entree ou de sortie du solveur ?", - ang = "Input or Output file ?", - ), - - Name = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Nom du fichier", - ang = "File name", - ), - - Path = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Chemin du fichier", - ang = "Path file ", - ), - - Subst = SIMP ( statut = "f", - typ = "TXM", - max = "**", - fr = "Liste de variables", - ang = "List", - ), - - ), # Fin FACT Files - -) # Fin PROC WRAPPER diff --git a/Openturns_Study/OpenTURNS_Cata_Wrapper_V2.py b/Openturns_Study/OpenTURNS_Cata_Wrapper_V2.py deleted file mode 100644 index 69bff829..00000000 --- a/Openturns_Study/OpenTURNS_Cata_Wrapper_V2.py +++ /dev/null @@ -1,217 +0,0 @@ -# -*- coding: utf-8 -*- - -# -------------------------------------------------- -# debut entete -# -------------------------------------------------- - -import Accas -from Accas import * - - -#CONTEXT.debug = 1 -JdC = JDC_CATA ( code = 'OPENTURNS_WRAPPER', - execmodul = None, - regles = ( AU_MOINS_UN ( 'WRAPPER' ), ), - ) # Fin JDC_CATA - -# -------------------------------------------------- -# fin entete -# -------------------------------------------------- - - -#================================ -# 2. Definition des variables -#================================ - -VARIABLEPOOL = PROC ( nom = "VARIABLEPOOL", - op = None, - docu = "", - fr = "L'ensemble des variables probabilistes", - ang = "The pool of probabilistic variables", - - - Variables = FACT ( statut = "o", - min = 1, - max = "**", - - - - Name = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Nom de la variable, identique au nom dans le solver.", - ang = "Name of the variable, identical to the name in solver." - ), - - Type = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "in", "out", ), - defaut = "in", - fr = "variable d'entree ou de sortie du solver", - ang = "Input or Output variable", - ), - - Unit = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Unite", - ang = "Unit", - ), - - Comment = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Commentaire", - ang = "Comment", - ), - - Regexp = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Expression reguliere", - ang = "Regular expression", - ), - - Format = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Format d'ecriture", - ang = "Format", - ), - - - ), # Fin FACT Variables - -) # Fin PROC VARIABLEPOOL - - -#================================ -# Definition des parametres du wrapper -#================================ - -# Nota : les variables de type PROC doivent etre en majuscules ! -WRAPPER = PROC ( nom = "WRAPPER", - op = None, - docu = "", - fr = "Mise en donnee pour le fichier de configuration de OPENTURNS.", - ang = "Writes the configuration file for OPENTURNS.", - - - WrapperPath = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Chemin d acces au wrapper", - ang = "Wrapper library path", - ), - - FunctionName = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Nom de la fonction dans le wrapper", - ang = "Function's name in wrapper", - ), - - GradientName = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Nom du gradient dans le wrapper", - ang = "Gradient's name in wrapper", - ), - - HessianName = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Nom du hessian dans le wrapper", - ang = "Hessian's name in wrapper", - ), - - WrapCouplingMode = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "static-link", "dynamic-link", "fork", ), - defaut = "fork", - fr = "Mode de couplage du solver", - ang = "Solver coupling mode", - ), - - Fork = BLOC ( condition = " WrapCouplingMode in ( 'fork', ) ", - - Command = SIMP ( statut = "o", - max = 1, - typ = "TXM", - fr = "Chemin du solver", - ang = "solver path", - ), - ), # Fin BLOC Fork - - State = SIMP ( statut = "f", - typ = "TXM", - max = 1, - into = ( "shared", "specific" ), - fr = "Partage de l'etat interne entre les fonctions", - ang = "Internal state sharing", - ), - - InDataTransfer = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "files", "arguments", ), - fr = "Mode de transfert des donnees d'entree", - ang = "Input transfering mode", - ), - - OutDataTransfer = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "files", "arguments", ), - fr = "Mode de transfert des donnees de sortie", - ang = "Output transfering mode", - ), - - - - - Files = FACT ( statut = "f", - min = 1, - max = "**", - - Id = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Identificateur du fichier", - ang = "File id", - ), - - Type = SIMP ( statut = "o", - typ = "TXM", - max = 1, - into = ( "in", "out", ), - fr = "Fichier d entree ou de sortie du solveur ?", - ang = "Input or Output file ?", - ), - - Name = SIMP ( statut = "f", - typ = "TXM", - max = 1, - fr = "Nom du fichier", - ang = "File name", - ), - - Path = SIMP ( statut = "o", - typ = "TXM", - max = 1, - fr = "Chemin du fichier", - ang = "Path file ", - ), - - Subst = SIMP ( statut = "f", - typ = "TXM", - max = "**", - fr = "Liste de variables", - ang = "List", - ), - - ), # Fin FACT Files - -) # Fin PROC WRAPPER diff --git a/Openturns_Study/catalogues_openturns.ini b/Openturns_Study/catalogues_openturns.ini index 86f2de10..8a16ff62 100644 --- a/Openturns_Study/catalogues_openturns.ini +++ b/Openturns_Study/catalogues_openturns.ini @@ -6,7 +6,7 @@ rep_cata=os.getcwd() catalogues = ( # (code,version,catalogue,formatIn,formatOut) #('OPENTURNS_WRAPPER','V1',os.path.join(rep_cata,'OpenTURNS_Cata_Wrapper_V1.py'),'openturns_wrapper','wrapper'), - ('OPENTURNS_WRAPPER','V2',os.path.join(rep_cata,'OpenTURNS_Cata_Wrapper_V2.py'),'openturns','wrapper'), + ('OPENTURNS_STUDY','V1',os.path.join(rep_cata,'OpenTURNS_Cata_Study.py'),'openturns_study','wrapper'), #('OPENTURNS','Wrapper',os.path.join(rep_cata,'OpenTURNS_Cata_Wrapper_V1.py'),'openturns'), ) diff --git a/Openturns_Study/configuration.py b/Openturns_Study/configuration.py index 4333f42a..8eed5f04 100644 --- a/Openturns_Study/configuration.py +++ b/Openturns_Study/configuration.py @@ -52,16 +52,19 @@ class CONFIG: self.repIni = repIni self.fic_prefs ="prefs.py" - if self.appli: self.parent=appli.top + if self.appli: + self.parent=appli.top + self.appli.format_fichier="openturns_wrapper" else: self.parent=None - self.labels=("DTDDirectory","rep_user","INSTALLDIR","path_doc","exec_acrobat","rep_cata","initialdir") + self.labels=("OpenTURNS_path","rep_user","INSTALLDIR","path_doc","exec_acrobat","rep_cata","initialdir","savedir") # Valeurs par defaut self.rep_user = os.path.join(os.environ['HOME'],'.Eficas_Openturns') self.initialdir = self.rep_user self.path_doc = self.rep_user + self.savedir = self.rep_user self.exec_acrobat = self.rep_user #Lecture des fichiers utilisateurs diff --git a/Openturns_Study/prefs.py b/Openturns_Study/prefs.py index 06ec83b8..5fff47f6 100644 --- a/Openturns_Study/prefs.py +++ b/Openturns_Study/prefs.py @@ -22,9 +22,9 @@ import os, sys # Les variables pouvant positionnees sont : # "CODE_PATH_SURCHARGE","DTDDirectory","rep_user","INSTALLDIR","path_doc","exec_acrobat","rep_cata" -print "import des prefs de OPENTURNS_WRAPPER" +print "import des prefs de OPENTURNS_STUDY" -code = "OPENTURNS_WRAPPER" +code = "OPENTURNS_STUDY" # REPINI sert à localiser le fichier # initialdir sert comme directory initial des QFileDialog diff --git a/Openturns_Study/qtEficas_openturns_study.py b/Openturns_Study/qtEficas_openturns_study.py new file mode 100755 index 00000000..76e0ad8a --- /dev/null +++ b/Openturns_Study/qtEficas_openturns_study.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- 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. +# +# +# ====================================================================== + +""" + Ce module sert à lancer EFICAS configuré pour Openturns +""" +# Modules Python + +# Modules Eficas +import prefs +prefs.code="OPENTURNS_STUDY" +from InterfaceQT4 import eficas_go + +eficas_go.lance_eficas(code=prefs.code) diff --git a/Openturns_Study/qtEficas_openturns_wrapper.py b/Openturns_Study/qtEficas_openturns_wrapper.py deleted file mode 100755 index 8da18067..00000000 --- a/Openturns_Study/qtEficas_openturns_wrapper.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -# -*- 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. -# -# -# ====================================================================== - -""" - Ce module sert à lancer EFICAS configuré pour Openturns -""" -# Modules Python - -# Modules Eficas -import prefs -prefs.code="OPENTURNS_WRAPPER" -from InterfaceQT4 import eficas_go - -eficas_go.lance_eficas(code=prefs.code)