From: Pascale Noyret Date: Mon, 5 Jul 2010 09:22:59 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V2_0~35 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b57e9d5548123dabcfb2e96c96631bed314b6f1c;p=modules%2Feficas.git *** empty log message *** --- diff --git a/MAP/CMakeLists.txt b/MAP/CMakeLists.txt new file mode 100644 index 00000000..e7e4546f --- /dev/null +++ b/MAP/CMakeLists.txt @@ -0,0 +1,46 @@ +# -*- 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. +# +# +# ====================================================================== + +#configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/prefs_OPENTURNS_WRAPPER.py.in +# ${CMAKE_CURRENT_SOURCE_DIR}/prefs_OPENTURNS_WRAPPER.py +# @ONLY ) + +install ( FILES qtEficas_map.py + prefs.py + style.py + prefs_MAP.py + configuration_MAP.py + catalogues_MAP.ini + s_poly_st_1_V1.py + s_poly_st_1_V1_clefs_docu + s_scc_st_2_V1.py + DESTINATION ${CMAKE_INSTALL_PREFIX}/MAP + ) +install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Doc + ${CMAKE_CURRENT_SOURCE_DIR}/Templates + DESTINATION ${CMAKE_INSTALL_PREFIX}/MAP + ) + + + +### Local Variables: +### mode: cmake +### End: diff --git a/MAP/Doc/MAP_2010_MOD1_20100531.pdf b/MAP/Doc/MAP_2010_MOD1_20100531.pdf new file mode 100755 index 00000000..f216b22b Binary files /dev/null and b/MAP/Doc/MAP_2010_MOD1_20100531.pdf differ diff --git a/MAP/catalogues_MAP.ini b/MAP/catalogues_MAP.ini new file mode 100644 index 00000000..0f4ff81a --- /dev/null +++ b/MAP/catalogues_MAP.ini @@ -0,0 +1,11 @@ +# Choix des catalogues +import os +#rep_cata=os.path.dirname(os.path.abspath(__file__)) +rep_cata=os.getcwd() + +catalogues = ( +# (ssCode,version,catalogue,formatIn) + ('MAP','s_poly_st_1_V1',os.path.join(rep_cata,'s_poly_st_1_V1.py'),'s_poly_st_1'), + ('MAP','s_scc_st_2_V1',os.path.join(rep_cata,'s_scc_st_2_V1.py'),'s_scc_st_2'), +) + diff --git a/MAP/configuration_MAP.py b/MAP/configuration_MAP.py new file mode 100644 index 00000000..cad59a9d --- /dev/null +++ b/MAP/configuration_MAP.py @@ -0,0 +1,179 @@ +# -*- 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 pour charger les paramètres de configuration d'EFICAS +""" +# Modules Python +import os, sys, string, types, re +import traceback +from PyQt4.QtGui import * +from utils import read_file + +# Modules Eficas +from Editeur import utils + +class CONFIG: + + #----------------------------------- + def __init__(self,appli,repIni): + #----------------------------------- + + # Classe de base permettant de lire, afficher + # et sauvegarder les fichiers utilisateurs + # On a deux directories : la directory generale (Repertoire d instal + Nom du code + # Par exemple : ~/Install_Eficas/EficasV1_14/Openturns_Wrapper + # et la directorie de l utilisateur + # HOME/.Eficas_Openturns + # Le fichier prefs.py va etre lu dans la directory generale puis surcharge eventuellement + # par celui de l utilisateur + # le fichier de catalogue va etre lu dans la directory de l utilisateur s il exite + # dans le fichier general sinon + self.appli = appli + self.code = appli.code + self.salome = appli.salome + self.repIni = repIni + self.REPINI = repIni + self.INSTALLDIR =os.path.dirname(__file__) + + if self.appli: + self.parent=appli.top + self.appli.mode_nouv_commande='initial' + else: self.parent=None + + + # Valeurs par defaut + self.rep_user = os.path.join(os.environ['HOME'],'.Eficas_MAP') + if not os.path.isdir(self.rep_user) : os.mkdir(self.rep_user) + self.initialdir = self.rep_user + self.path_doc = self.rep_user + self.savedir = self.rep_user + self.exec_acrobat = self.rep_user + + self.labels_user=('exec_acrobat', 'catalogues','savedir','path_doc','map_path','PATH_PYGMEE','PATH_BENHUR','PATH_ASTER','PATH_MODULE','PATH_STUDY','NAME_SCHEME') + self.labels_eficas=("map_path","rep_user","INSTALLDIR","path_doc","exec_acrobat","rep_cata","initialdir","savedir","catalogues",'PATH_PYGMEE','PATH_BENHUR','PATH_ASTER','PATH_MODULE','PATH_STUDY','NAME_SCHEME') + + #Lecture des fichiers utilisateurs + self.lecture_fichier_ini_standard() + self.lecture_fichier_ini_utilisateur() + self.lecture_catalogues() + + #-------------------------------------- + def lecture_fichier_ini_standard(self): + #-------------------------------------- + # Verifie l'existence du fichier "standard" + # appelle la lecture de ce fichier + import prefs + name='prefs_'+prefs.code + prefsCode=__import__(name) + self.prefsUser=name+".py" + for k in self.labels_eficas : + try : + valeur=getattr(prefsCode,k) + setattr(self,k,valeur) + except : + pass + if hasattr(self,'map_path') : + oldPath=self.map_path + + + #-------------------------------------- + def lecture_fichier_ini_utilisateur(self): + #-------------------------------------- + # Surcharge les paramètres standards par les paramètres utilisateur s'ils existent + self.fic_ini_utilisateur = os.path.join(self.rep_user,self.prefsUser) + if not os.path.isfile(self.fic_ini_utilisateur): return + + txt = utils.read_file(self.fic_ini_utilisateur) + from styles import style + d=locals() + try: + exec txt in d + except : + l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) + QMessageBox.critical( None, "Import du fichier de Configuration", + "Erreur à la lecture du fichier de configuration " + self.fic_ini_utilisateur ) + sys.exit(0) + for k in self.labels_user : + try : + setattr(self,k,d[k]) + except : + pass + + if hasattr(self,'map_path') : + if hasattr(self,'oldPath'): + if self.map_path != self.oldPath: + sys.path.remove(self.oldPath) + sys.path[:0]=[self.map_path] + else : + sys.path[:0]=[self.map_path] + + + #-------------------------------------- + def lecture_catalogues(self): + #-------------------------------------- + rep_mat=" " # Compatibilite Aster + if hasattr(self,"catalogues") : + return + + fic_ini = os.path.join(self.repIni,"catalogues_MAP.ini") + if not os.path.isfile(fic_ini) : + QMessageBox.critical( None, "Erreur a l'import du fichier des Catalogues", + "Le fichier de configuration des catalogues "+fic_ini+" n a pas été trouvé" ) + sys.exit(0) + + txt = utils.read_file(fic_ini) + d=locals() + try: + exec txt in d + self.catalogues=d["catalogues"] + except : + l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) + QMessageBox.critical( None, "Import du fichier de Configuration", + "Erreur à la lecture du fichier de configuration " + fic_ini ) + sys.exit(0) + + + + #-------------------------------------- + def save_params(self): + #-------------------------------------- + # sauvegarde + # les nouveaux paramètres dans le fichier de configuration utilisateur + # + texte="" + for clef in self.labels_user : + if hasattr(self,clef): + valeur=getattr(self,clef) + texte= texte + clef+" = " + repr(valeur) +"\n" + f=open(self.fic_ini_utilisateur,'w+') + print self.fic_ini_utilisateur + f.write(texte) + f.close() +# + + +def make_config(appli,rep): + return CONFIG(appli,rep) + +def make_config_style(appli,rep): + return None + + diff --git a/MAP/prefs.py b/MAP/prefs.py new file mode 100644 index 00000000..2fc2a6b2 --- /dev/null +++ b/MAP/prefs.py @@ -0,0 +1 @@ +code='MAP' diff --git a/MAP/prefs_MAP.py b/MAP/prefs_MAP.py new file mode 100644 index 00000000..f1e5eaec --- /dev/null +++ b/MAP/prefs_MAP.py @@ -0,0 +1,53 @@ +# -*- 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. +# +# +# ====================================================================== + +import os, sys +# Les variables pouvant positionnees sont : +print "import des prefs de MAP" + +# REPINI sert à localiser le fichier +# initialdir sert comme directory initial des QFileDialog +# positionnee a repin au debut mise a jour dans configuration +REPINI=os.path.dirname(os.path.abspath(__file__)) +initialdir=REPINI + +# INSTALLDIR sert à localiser l'installation d'Eficas +INSTALLDIR=os.path.join(REPINI,'..') +PATH_PYGMEE="/local/noyret/MAP/components/pygmee_v1" +PATH_BENHUR="/local/noyret/MAP/components/benhur" +PATH_ASTER="/local/noyret/bin/Aster10/bin" +PATH_MODULE="/local/noyret/MAP/modules/polymers" +PATH_STUDY="/local/noyret/MAP/studies/demonstrateur_poly_st1" + + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +# lang indique la langue utilisée pour les chaines d'aide : fr ou ang +lang='fr' +encoding='iso-8859-1' + +# Acces a la documentation +rep_cata = INSTALLDIR +path_doc = os.path.join(REPINI,'Doc') +exec_acrobat = "/usr/bin/xpdf" +savedir = os.environ['HOME'] + + +sys.path[:0]=[INSTALLDIR] diff --git a/MAP/properties.py b/MAP/properties.py new file mode 100644 index 00000000..ce5f1a2e --- /dev/null +++ b/MAP/properties.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# CONFIGURATION MANAGEMENT OF EDF VERSION +# RESPONSABLE D6BHHHH J-P.LEFEBVRE +# ====================================================================== +# COPYRIGHT (C) 1991 - 2001 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. +# ====================================================================== +# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR +# DE LA VERSION DU CODE_ASTER ASSOCIE +#---------------------------------------------------------------------- +version = "7.1.0" +date = "23/04/2003" diff --git a/MAP/qtEficas_map.py b/MAP/qtEficas_map.py new file mode 100755 index 00000000..f835ec33 --- /dev/null +++ b/MAP/qtEficas_map.py @@ -0,0 +1,69 @@ +#!/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 Perfect +""" +# Modules Python + +# Modules Eficas +import prefs +name='prefs_'+prefs.code +__import__(name) + +import sys +from PyQt4.QtGui import * + +from Editeur import import_code +from Editeur import session +from qtEficas import Appli + +from InterfaceQT4 import eficas_go +from InterfaceQT4 import monChoixMap + +class ChoixCata: + def __init__(self): + self.schema="" + self.module="" + self.nom="" + +options=session.parse(sys.argv) +cata=options.cata +MonChoixCata=ChoixCata() +if cata == None : + app = QApplication(sys.argv) + ChoixMap = monChoixMap.MonChoixMap(MonChoixCata) + ChoixMap.show() + res=app.exec_() +else : + import re + p=re.compile('_V\d+') + if p.search(cata) == None : + print "Ce Catalogue ne convient pas" + exit(1) + MonChoixCata.nom=cata[0: p.search(cata).start()] + #MonChoixCata.nom=cata + +#permet de choisir le module +print MonChoixCata.nom +eficas_go.lance_eficas(code=prefs.code,ssCode=MonChoixCata.nom) +#eficas_go.lance_eficas(code=prefs.code,choix="non") diff --git a/MAP/s_poly_st_1_V1.py b/MAP/s_poly_st_1_V1.py new file mode 100644 index 00000000..43c5c3c2 --- /dev/null +++ b/MAP/s_poly_st_1_V1.py @@ -0,0 +1,89 @@ +## -*- coding: utf-8 -*- +# +## -------------------------------------------------- +## debut entete +## -------------------------------------------------- +# +from Accas import * +from prefs_MAP import PATH_MODULE +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + +# +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'MAP', + execmodul = None, + regles=(AU_MOINS_UN('PYGMEE',),AU_MOINS_UN('BENHUR',), AVANT ('PYGMEE' , 'BENHUR'),), + )# Fin JDC_CATA +# + +PYGMEE= PROC(nom="PYGMEE",op=None, + fr='definition de la morphologie', + +# NBPHASES=SIMP(statut='o',typ='I',defaut=1,into=(1,2)), + FUSEAU1=FACT(fr="entree de lecfus", statut='o', + FORME=SIMP(statut = "o", typ='TXM', defaut="fichier", into=("manuel","fichier")), + + b_forme=BLOC( condition = "FORME == 'fichier'", + FORMAT = SIMP(statut = "o", typ='TXM', defaut="croissant", into=("croissant","decroissant")), + FICHIER = SIMP ( statut = "o", typ = "Fichier", defaut=PATH_MODULE+"/s_poly_st_1/inclusion_size_distribution.txt"), + ), + + b_manuel=BLOC( condition = "FORME == 'manuel'", + LFUSEAU = SIMP ( statut = "o", typ=Tuple(2),validators=VerifTypeTuple(('R','R')), max="**",) ,),), +# LFUSEAU = SIMP ( statut = "o", typ=Tuple(2), max="**",) ,),), + + + TAILLE=SIMP(statut = "o",fr="taille du VER", typ='R', defaut=50.), + DISTANCE=SIMP(statut = "o",fr="distance de replusions", typ='R', defaut=0.1), + LANCEMENT=SIMP(statut = "o",fr="lancement de PYGMEE", typ='TXM', defaut="oui", into=("oui","non")), +) + +BENHUR= PROC(nom="BENHUR",op=None, + fr='definition du maillage', + + FINESSE=SIMP(statut = "o",fr="nombre d\'elements par cote", typ='I', into=(10,12), defaut=10), + LANCEMENT=SIMP(statut = "o",fr="lancement de BENHUR", typ='TXM', defaut="oui", into=("oui","non")), +) + +FDVGRID = PROC(nom="FDVGRID", op=None, + fr='solver', + DIMENSION=SIMP(statut = "o",fr="dimension",typ='TXM', defaut="3D", into=("3D","2D")), + DIFFUSION=FACT(fr="flux de diffusion", statut='o', + COMPOX=SIMP(statut="o",fr="composante en X",typ='R',defaut=1.0), + COMPOY=SIMP(statut="o",fr="composante en Y",typ='R',defaut=0.0), + COMPOZ=SIMP(statut="o",fr="composante en Z",typ='R',defaut=0.0),), + FORMULATION=SIMP(statut = "o",fr="formulation",typ='TXM',defaut="v", into=("v","d"),), + CL=SIMP(statut = "o",fr="conditions aux limites",typ='TXM',defaut="t",into=("t","f")), + DISCRET=SIMP(statut = "o",fr="discretisation",typ='I', defaut=100, val_max=256), + SOLVER=SIMP(statut = "o",fr="dimension",typ='TXM', defaut="cross",into=("cross","pcg diag","pcg qi"),), + RESIDU=SIMP(statut = "o",fr="dimension",typ='R',defaut=1.e-4,), +); +#/./fdvgrid + parametres dans l ordre +ASTER= PROC(nom="ASTER",op=None, + fr='definition du calcul', + + CONDUCTIVITE_M=SIMP(statut = "o",fr="conductivite de la matrice", typ='R', defaut=1.0 , val_min =0.), + CONDUCTIVITE_I=SIMP(statut = "o",fr="conductivite des inclusions", typ='R', defaut=1.0, val_min =0.), + LANCEMENT=SIMP(statut = "o",fr="lancement de Code_Aster", typ='TXM', defaut="oui", into=("oui","non")), +) + +GMSH= PROC(nom="GMSH",op=None, + fr='post-traitement', + + LANCEMENT=SIMP(statut = "o",fr="lancement de GMSH", typ='TXM', defaut="oui", into=("oui","non")), +) diff --git a/MAP/s_poly_st_1_V1_clefs_docu b/MAP/s_poly_st_1_V1_clefs_docu new file mode 100644 index 00000000..32e41fba --- /dev/null +++ b/MAP/s_poly_st_1_V1_clefs_docu @@ -0,0 +1 @@ +BENHUR:MAP_2010_MOD1_20100531.pdf diff --git a/MAP/s_poly_st_1_V2.py b/MAP/s_poly_st_1_V2.py new file mode 100644 index 00000000..1d6070a8 --- /dev/null +++ b/MAP/s_poly_st_1_V2.py @@ -0,0 +1,74 @@ +## -*- coding: utf-8 -*- +# +## -------------------------------------------------- +## debut entete +## -------------------------------------------------- +# +from Accas import * +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + +# +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'MAP', + execmodul = None, + regles=(AU_MOINS_UN('PYGMEE',),AU_MOINS_UN('BENHUR',), AVANT ('PYGMEE' , 'BENHUR'),), + )# Fin JDC_CATA +# + +PYGMEE= PROC(nom="PYGMEE",op=None, + fr='definition de la morphologie', + +# NBPHASES=SIMP(statut='o',typ='I',defaut=1,into=(1,2)), + FUSEAU1=FACT(fr="entree de lecfus", statut='o', + FORME=SIMP(statut = "o", typ='TXM', defaut="fichier", into=("manuel","fichier")), + + b_forme=BLOC( condition = "FORME == 'fichier'", + FORMAT = SIMP(statut = "o", typ='TXM', defaut="croissant", into=("croissant","decroissant")), + FICHIER = SIMP ( statut = "o", typ = "Fichier", defaut="/local/noyret/MAP/modules/polymers/s_poly_st_1/inclusion_size_distribution.txt"), + ), + + b_manuel=BLOC( condition = "FORME == 'manuel'", + LFUSEAU = SIMP ( statut = "o", typ=Tuple(2),validators=VerifTypeTuple(('R','R')), max="**",) ,),), +# LFUSEAU = SIMP ( statut = "o", typ=Tuple(2), max="**",) ,),), + + + TAILLE=SIMP(statut = "o",fr="taille du VER", typ='R', defaut=50.), + DISTANCE=SIMP(statut = "o",fr="distance de replusions", typ='R', defaut=0.1), + LANCEMENT=SIMP(statut = "o",fr="lancement de PYGMEE", typ='TXM', defaut="oui", into=("oui","non")), +) + +BENHUR= PROC(nom="BENHUR",op=None, + fr='definition du maillage', + + FINESSE=SIMP(statut = "o",fr="nombre d\'elements par cote", typ='I', into=(10,12), defaut=10), + LANCEMENT=SIMP(statut = "o",fr="lancement de BENHUR", typ='TXM', defaut="oui", into=("oui","non")), +) + +ASTER= PROC(nom="ASTER",op=None, + fr='definition du calcul', + + CONDUCTIVITE_M=SIMP(statut = "o",fr="conductivite de la matrice", typ='R', defaut=1.0 , val_min =0.), + CONDUCTIVITE_I=SIMP(statut = "o",fr="conductivite des inclusions", typ='R', defaut=1.0, val_min =0.), + LANCEMENT=SIMP(statut = "o",fr="lancement de Code_Aster", typ='TXM', defaut="oui", into=("oui","non")), +) + +GMSH= PROC(nom="GMSH",op=None, + fr='post-traitement', + + LANCEMENT=SIMP(statut = "o",fr="lancement de GMSH", typ='TXM', defaut="oui", into=("oui","non")), +) diff --git a/MAP/s_scc_st_2_V1.py b/MAP/s_scc_st_2_V1.py new file mode 100644 index 00000000..91db53b7 --- /dev/null +++ b/MAP/s_scc_st_2_V1.py @@ -0,0 +1,31 @@ +## -*- coding: utf-8 -*- +# +## -------------------------------------------------- +## debut entete +## -------------------------------------------------- +# +from Accas import * +from prefs_Map import PATH_MODULE + +# +#CONTEXT.debug = 1 +JdC = JDC_CATA ( code = 'MAP', + execmodul = None, + #regles=(AU_MOINS_UN('TABLEAU',),AU_MOINS_UN('BENHUR',), AVANT ('PYGMEE' , 'BENHUR'),), + regles=(AU_MOINS_UN('TABLEAU',),), + )# Fin JDC_CATA +# + +TABLEAU= PROC(nom="TABLEAU",op=None, + fr='lecture des proprietes a traiter ', + FICHIER=SIMP(statut = "o", typ='Fichier',), +) + +TRAITEMENT= PROC(nom="TRAITEMENT",op=None, + fr='analyse statistique classique d une des variables du tableau ', + TYPE =SIMP(statut='o',typ='TXM',defaut="analyse statistique classique", + into=( "analyse statistique classique", "analyse statistique de la qualite","analyse de la dispersion suivant la distance au joint", "analyse de la dispersion suivant la distance a la pointe de fissure","visualisation dans le triangle standard"),), + VARIABLE =SIMP(statut='o',typ='TXM',defaut="stress_eq", + into=( "stress_eq", "EPS_EQ",),) +) + diff --git a/MAP/style.py b/MAP/style.py new file mode 100644 index 00000000..7da9d534 --- /dev/null +++ b/MAP/style.py @@ -0,0 +1 @@ +# Necessaire pour compatibilite avec Aster diff --git a/Map/CMakeLists.txt b/Map/CMakeLists.txt deleted file mode 100644 index 20b67191..00000000 --- a/Map/CMakeLists.txt +++ /dev/null @@ -1,42 +0,0 @@ -# -*- 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. -# -# -# ====================================================================== - -#configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/prefs_OPENTURNS_WRAPPER.py.in -# ${CMAKE_CURRENT_SOURCE_DIR}/prefs_OPENTURNS_WRAPPER.py -# @ONLY ) - -install ( FILES qtEficas_map.py - prefs.py - prefs_Map.py - configuration_Map.py - style.py - catalogues_Map.ini - Map1_Cata_V1.py - benhur_pygmee.txt - test_module.bhr - DESTINATION ${CMAKE_INSTALL_PREFIX}/Map - ) - - - -### Local Variables: -### mode: cmake -### End: diff --git a/Map/catalogues_Map.ini b/Map/catalogues_Map.ini deleted file mode 100644 index 2db9a444..00000000 --- a/Map/catalogues_Map.ini +++ /dev/null @@ -1,11 +0,0 @@ -# Choix des catalogues -import os -#rep_cata=os.path.dirname(os.path.abspath(__file__)) -rep_cata=os.getcwd() - -catalogues = ( -# (ssCode,version,catalogue,formatIn) - ('Map','s_poly_st_1_V1',os.path.join(rep_cata,'s_poly_st_1_V1.py'),'s_poly_st_1'), - ('Map','s_scc_st_2_V1',os.path.join(rep_cata,'s_scc_st_2_V1.py'),'s_scc_st_2'), -) - diff --git a/Map/configuration_Map.py b/Map/configuration_Map.py deleted file mode 100644 index 7c918342..00000000 --- a/Map/configuration_Map.py +++ /dev/null @@ -1,179 +0,0 @@ -# -*- 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 pour charger les paramètres de configuration d'EFICAS -""" -# Modules Python -import os, sys, string, types, re -import traceback -from PyQt4.QtGui import * -from utils import read_file - -# Modules Eficas -from Editeur import utils - -class CONFIG: - - #----------------------------------- - def __init__(self,appli,repIni): - #----------------------------------- - - # Classe de base permettant de lire, afficher - # et sauvegarder les fichiers utilisateurs - # On a deux directories : la directory generale (Repertoire d instal + Nom du code - # Par exemple : ~/Install_Eficas/EficasV1_14/Openturns_Wrapper - # et la directorie de l utilisateur - # HOME/.Eficas_Openturns - # Le fichier prefs.py va etre lu dans la directory generale puis surcharge eventuellement - # par celui de l utilisateur - # le fichier de catalogue va etre lu dans la directory de l utilisateur s il exite - # dans le fichier general sinon - self.appli = appli - self.code = appli.code - self.salome = appli.salome - self.repIni = repIni - self.REPINI = repIni - self.INSTALLDIR =os.path.dirname(__file__) - - if self.appli: - self.parent=appli.top - self.appli.mode_nouv_commande='initial' - else: self.parent=None - - - # Valeurs par defaut - self.rep_user = os.path.join(os.environ['HOME'],'.Eficas_Map') - if not os.path.isdir(self.rep_user) : os.mkdir(self.rep_user) - self.initialdir = self.rep_user - self.path_doc = self.rep_user - self.savedir = self.rep_user - self.exec_acrobat = self.rep_user - - self.labels_user=('exec_acrobat', 'catalogues','savedir','path_doc','map_path','PATH_PYGMEE','PATH_BENHUR','PATH_ASTER','PATH_MODULE','PATH_STUDY','NAME_SCHEME') - self.labels_eficas=("map_path","rep_user","INSTALLDIR","path_doc","exec_acrobat","rep_cata","initialdir","savedir","catalogues",'PATH_PYGMEE','PATH_BENHUR','PATH_ASTER','PATH_MODULE','PATH_STUDY','NAME_SCHEME') - - #Lecture des fichiers utilisateurs - self.lecture_fichier_ini_standard() - self.lecture_fichier_ini_utilisateur() - self.lecture_catalogues() - - #-------------------------------------- - def lecture_fichier_ini_standard(self): - #-------------------------------------- - # Verifie l'existence du fichier "standard" - # appelle la lecture de ce fichier - import prefs - name='prefs_'+prefs.code - prefsCode=__import__(name) - self.prefsUser=name+".py" - for k in self.labels_eficas : - try : - valeur=getattr(prefsCode,k) - setattr(self,k,valeur) - except : - pass - if hasattr(self,'map_path') : - oldPath=self.map_path - - - #-------------------------------------- - def lecture_fichier_ini_utilisateur(self): - #-------------------------------------- - # Surcharge les paramètres standards par les paramètres utilisateur s'ils existent - self.fic_ini_utilisateur = os.path.join(self.rep_user,self.prefsUser) - if not os.path.isfile(self.fic_ini_utilisateur): return - - txt = utils.read_file(self.fic_ini_utilisateur) - from styles import style - d=locals() - try: - exec txt in d - except : - l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) - QMessageBox.critical( None, "Import du fichier de Configuration", - "Erreur à la lecture du fichier de configuration " + self.fic_ini_utilisateur ) - sys.exit(0) - for k in self.labels_user : - try : - setattr(self,k,d[k]) - except : - pass - - if hasattr(self,'map_path') : - if hasattr(self,'oldPath'): - if self.map_path != self.oldPath: - sys.path.remove(self.oldPath) - sys.path[:0]=[self.map_path] - else : - sys.path[:0]=[self.map_path] - - - #-------------------------------------- - def lecture_catalogues(self): - #-------------------------------------- - rep_mat=" " # Compatibilite Aster - if hasattr(self,"catalogues") : - return - - fic_ini = os.path.join(self.repIni,"catalogues_Map.ini") - if not os.path.isfile(fic_ini) : - QMessageBox.critical( None, "Erreur a l'import du fichier des Catalogues", - "Le fichier de configuration des catalogues "+fic_ini+" n a pas été trouvé" ) - sys.exit(0) - - txt = utils.read_file(fic_ini) - d=locals() - try: - exec txt in d - self.catalogues=d["catalogues"] - except : - l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) - QMessageBox.critical( None, "Import du fichier de Configuration", - "Erreur à la lecture du fichier de configuration " + fic_ini ) - sys.exit(0) - - - - #-------------------------------------- - def save_params(self): - #-------------------------------------- - # sauvegarde - # les nouveaux paramètres dans le fichier de configuration utilisateur - # - texte="" - for clef in self.labels_user : - if hasattr(self,clef): - valeur=getattr(self,clef) - texte= texte + clef+" = " + repr(valeur) +"\n" - f=open(self.fic_ini_utilisateur,'w+') - print self.fic_ini_utilisateur - f.write(texte) - f.close() -# - - -def make_config(appli,rep): - return CONFIG(appli,rep) - -def make_config_style(appli,rep): - return None - - diff --git a/Map/prefs.py b/Map/prefs.py deleted file mode 100644 index d8335882..00000000 --- a/Map/prefs.py +++ /dev/null @@ -1 +0,0 @@ -code='Map' diff --git a/Map/prefs_Map.py b/Map/prefs_Map.py deleted file mode 100644 index f1e5eaec..00000000 --- a/Map/prefs_Map.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- 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. -# -# -# ====================================================================== - -import os, sys -# Les variables pouvant positionnees sont : -print "import des prefs de MAP" - -# REPINI sert à localiser le fichier -# initialdir sert comme directory initial des QFileDialog -# positionnee a repin au debut mise a jour dans configuration -REPINI=os.path.dirname(os.path.abspath(__file__)) -initialdir=REPINI - -# INSTALLDIR sert à localiser l'installation d'Eficas -INSTALLDIR=os.path.join(REPINI,'..') -PATH_PYGMEE="/local/noyret/MAP/components/pygmee_v1" -PATH_BENHUR="/local/noyret/MAP/components/benhur" -PATH_ASTER="/local/noyret/bin/Aster10/bin" -PATH_MODULE="/local/noyret/MAP/modules/polymers" -PATH_STUDY="/local/noyret/MAP/studies/demonstrateur_poly_st1" - - -# Codage des strings qui accepte les accents (en remplacement de 'ascii') -# lang indique la langue utilisée pour les chaines d'aide : fr ou ang -lang='fr' -encoding='iso-8859-1' - -# Acces a la documentation -rep_cata = INSTALLDIR -path_doc = os.path.join(REPINI,'Doc') -exec_acrobat = "/usr/bin/xpdf" -savedir = os.environ['HOME'] - - -sys.path[:0]=[INSTALLDIR] diff --git a/Map/properties.py b/Map/properties.py deleted file mode 100644 index ce5f1a2e..00000000 --- a/Map/properties.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# RESPONSABLE D6BHHHH J-P.LEFEBVRE -# ====================================================================== -# COPYRIGHT (C) 1991 - 2001 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. -# ====================================================================== -# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR -# DE LA VERSION DU CODE_ASTER ASSOCIE -#---------------------------------------------------------------------- -version = "7.1.0" -date = "23/04/2003" diff --git a/Map/qtEficas_map.py b/Map/qtEficas_map.py deleted file mode 100755 index f835ec33..00000000 --- a/Map/qtEficas_map.py +++ /dev/null @@ -1,69 +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 Perfect -""" -# Modules Python - -# Modules Eficas -import prefs -name='prefs_'+prefs.code -__import__(name) - -import sys -from PyQt4.QtGui import * - -from Editeur import import_code -from Editeur import session -from qtEficas import Appli - -from InterfaceQT4 import eficas_go -from InterfaceQT4 import monChoixMap - -class ChoixCata: - def __init__(self): - self.schema="" - self.module="" - self.nom="" - -options=session.parse(sys.argv) -cata=options.cata -MonChoixCata=ChoixCata() -if cata == None : - app = QApplication(sys.argv) - ChoixMap = monChoixMap.MonChoixMap(MonChoixCata) - ChoixMap.show() - res=app.exec_() -else : - import re - p=re.compile('_V\d+') - if p.search(cata) == None : - print "Ce Catalogue ne convient pas" - exit(1) - MonChoixCata.nom=cata[0: p.search(cata).start()] - #MonChoixCata.nom=cata - -#permet de choisir le module -print MonChoixCata.nom -eficas_go.lance_eficas(code=prefs.code,ssCode=MonChoixCata.nom) -#eficas_go.lance_eficas(code=prefs.code,choix="non") diff --git a/Map/schema-openturns-template.xml b/Map/schema-openturns-template.xml deleted file mode 100644 index aea4d999..00000000 --- a/Map/schema-openturns-template.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - %_CODE_NOMCODE% - - InitWithVarList - - - - - - - OpenTurnsLoop.InitNode - ExecWithVarList - - - - - - OpenTurnsLoop.InitNode - Finalize - - - - - - - - - - - OPENTURNS - - WrapperParser - - - - - - - - - - - - OpenTurnsLoop SaveResultsToFile - WrapperParser OpenTurnsLoop - InitDeterministicVars OpenTurnsLoop - - OpenTurnsLoop algoResults - SaveResultsToFile algoResults - - - OpenTurnsLoop evalSamples - OpenTurnsLoop.ExecNode inPoint - - - WrapperParser initOptLoop - OpenTurnsLoop algoInit - - - WrapperParser inputVarList - OpenTurnsLoop.InitNode inputVarList - - - WrapperParser outputVarList - OpenTurnsLoop.InitNode outputVarList - - - InitDeterministicVars detVars - OpenTurnsLoop.InitNode deterministicVars - - - OpenTurnsLoop.ExecNode outPoint - OpenTurnsLoop evalResults - - - OpenTurnsLoopnbBranches - 4 - - - SaveResultsToFilefileName - /tmp/savedResults.txt - - - WrapperParserwrapperFilePath - /local00/renaud/salome/test-OT-YACS/wrap.xml - - - WrapperParserstudyFilePath - /local00/renaud/salome/test-OT-YACS/openturns_study.py - - - - - - - - - - diff --git a/Map/style.py b/Map/style.py deleted file mode 100644 index 7da9d534..00000000 --- a/Map/style.py +++ /dev/null @@ -1 +0,0 @@ -# Necessaire pour compatibilite avec Aster