--- /dev/null
+#@ MODIF __init__ SD DATE 12/05/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from Accas import ASSD
+
+# pour utilisation du catalogue hors aster
+try:
+ import aster
+except:
+ pass
+
+from Noyau.asnom import SDNom
+from Noyau.ascheckers import Parmi
+from Noyau.asojb import AsBase, AsVK8, AsVK16, AsVK24, AsVK32, AsVK80, \
+ AsVI, AsVS, AsVL, AsVR, AsVC, \
+ AsColl, AsObject, Facultatif, OJBVect, AsPn, AsVect
+
--- /dev/null
+#@ MODIF co_base_modale SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_base_modale import sd_base_modale
+
+from co_resultat_dyn import resultat_dyn
+
+# -----------------------------------------------------------------------------
+class base_modale(resultat_dyn, sd_base_modale):
+ pass
--- /dev/null
+#@ MODIF co_cabl_precont SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_cabl_precont import sd_cabl_precont
+
+# -----------------------------------------------------------------------------
+class cabl_precont(ASSD, sd_cabl_precont):
+ pass
--- /dev/null
+#@ MODIF co_cara_elem SD DATE 20/07/2009 AUTEUR FLEJOU J-L.FLEJOU
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_cara_elem import sd_cara_elem
+
+# -----------------------------------------------------------------------------
+class cara_elem(ASSD, sd_cara_elem):
+ def toEPX(self):
+ # s'il y a un problème sur la structure de données ==> <F>
+ try:
+ EPXnoeud = self.CARRIGXN.get()
+ EPXval = self.CARRIGXV.get()
+ lenEPXval = len(EPXval)
+ lenEPXnoeud = len(EPXnoeud)*6
+ except:
+ from Utilitai.Utmess import UTMESS
+ UTMESS('F','MODELISA9_98')
+ # Vérification de la déclaration qui est faite dans 'acearp'
+ if ( lenEPXval != lenEPXnoeud ):
+ from Utilitai.Utmess import UTMESS
+ UTMESS('F','MODELISA9_97')
+ # Tout est OK
+ ressorts = {}
+ i=0
+ for no in EPXnoeud :
+ ressorts[no] = EPXval[i:i+6]
+ i+=6
+ return ressorts
+
+
--- /dev/null
+#@ MODIF co_carte SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_carte import sd_carte
+from co_champ import cham_gd_sdaster
+
+# -----------------------------------------------------------------------------
+class carte_sdaster(cham_gd_sdaster, sd_carte):
+ pass
+
--- /dev/null
+#@ MODIF co_cham_elem SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_cham_elem import sd_cham_elem
+from co_champ import cham_gd_sdaster
+
+import Numeric
+
+# -----------------------------------------------------------------------------
+# post-traitement :
+class post_comp_cham_el :
+ def __init__(self,valeurs,maille=None,point=None,sous_point=None) :
+ self.valeurs=valeurs
+ self.maille=maille
+ self.point=point
+ self.sous_point=sous_point
+
+# -----------------------------------------------------------------------------
+class cham_elem(cham_gd_sdaster, sd_cham_elem):
+ def EXTR_COMP(self,comp,lgma,topo=0) :
+ """ retourne les valeurs de la composante comp du champ sur la liste
+ de groupes de mailles lgma avec eventuellement l'info de la
+ topologie si topo>0. Si lgma est une liste vide, c'est equivalent
+ a un TOUT='OUI' dans les commandes aster
+ Attributs retourne
+ - self.valeurs : Numeric.array contenant les valeurs
+ Si on a demande la topo :
+ - self.maille : numero de mailles
+ - self.point : numero du point dans la maille
+ - self.sous_point : numero du sous point dans la maille """
+ if not self.accessible() :
+ raise Accas.AsException("Erreur dans cham_elem.EXTR_COMP en PAR_LOT='OUI'")
+
+ ncham=self.get_name()
+ ncham=ncham+(8-len(ncham))*' '
+ nchams=ncham[0:7]+'S'
+ ncmp=comp+(8-len(comp))*' '
+
+ aster.prepcompcham(ncham,nchams,ncmp,"EL ",topo,lgma)
+
+ valeurs=Numeric.array(aster.getvectjev(nchams+(19-len(ncham))*' '+'.V'))
+
+ if (topo>0) :
+ maille=(aster.getvectjev(nchams+(19-len(ncham))*' '+'.M'))
+ point=(aster.getvectjev(nchams+(19-len(ncham))*' '+'.P'))
+ sous_point=(aster.getvectjev(nchams+(19-len(ncham))*' '+'.SP'))
+ else :
+ maille=None
+ point=None
+ sous_point=None
+
+ aster.prepcompcham("__DETR__",nchams,ncmp,"EL ",topo,lgma)
+
+ return post_comp_cham_el(valeurs,maille,point,sous_point)
+
--- /dev/null
+#@ MODIF co_cham_mater SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_cham_mater import sd_cham_mater
+
+# -----------------------------------------------------------------------------
+class cham_mater(ASSD, sd_cham_mater):
+ pass
--- /dev/null
+#@ MODIF co_cham_no SD DATE 16/11/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_cham_no import sd_cham_no
+from co_champ import cham_gd_sdaster
+
+import Numeric
+
+# -----------------------------------------------------------------------------
+# post-traitement :
+class post_comp_cham_no :
+ def __init__(self,valeurs,noeud=None) :
+ self.valeurs=valeurs
+ self.noeud=noeud
+
+# -----------------------------------------------------------------------------
+class cham_no_sdaster(cham_gd_sdaster, sd_cham_no):
+ def EXTR_COMP(self,comp,lgno,topo=0) :
+ """ retourne les valeurs de la composante comp du champ sur la liste
+ de groupes de noeuds lgno avec eventuellement l'info de la
+ topologie si topo>0. Si lgno est une liste vide, c'est equivalent
+ a un TOUT='OUI' dans les commandes aster
+ Attributs retourne
+ - self.valeurs : Numeric.array contenant les valeurs
+ Si on a demande la topo (i.e. self.topo = 1) :
+ - self.noeud : numero de noeud """
+ if not self.accessible() :
+ raise Accas.AsException("Erreur dans cham_no.EXTR_COMP en PAR_LOT='OUI'")
+
+ ncham=self.get_name()
+ ncham=ncham+(8-len(ncham))*' '
+ nchams=ncham[0:7]+'S'
+ ncmp=comp+(8-len(comp))*' '
+
+ aster.prepcompcham(ncham,nchams,ncmp,"NO ",topo,lgno)
+
+ valeurs=Numeric.array(aster.getvectjev(nchams+(19-len(ncham))*' '+'.V'))
+
+ if (topo>0) :
+ noeud=(aster.getvectjev(nchams+(19-len(ncham))*' '+'.N'))
+ else :
+ noeud=None
+
+ aster.prepcompcham("__DETR__",nchams,ncmp,"NO ",topo,lgno)
+
+ return post_comp_cham_no(valeurs,noeud)
+
+ def __add__(self, other):
+ from SD.sd_nume_equa import sd_nume_equa
+ from SD.sd_maillage import sd_maillage
+ from SD.co_maillage import maillage_sdaster
+ from Cata.cata import CREA_CHAMP,_F
+ from Noyau.nommage import GetNomConceptResultat
+ # on recupere le type
+ __nume_ddl=sd_nume_equa(self.REFE.get()[1])
+ __gd=__nume_ddl.REFN.get()[1].strip()
+ __type='NOEU_'+__gd
+ # on recupere le nom du maillage
+ __nomMaillage=self.REFE.get()[0].strip()
+ # on recupere l'objet du maillage
+ __maillage=CONTEXT.get_current_step().get_concept(__nomMaillage)
+ # on recupere le nom a gauche du signe "="
+ toto=GetNomConceptResultat(self)
+ __CHAM = CREA_CHAMP(OPERATION='ASSE',
+ MAILLAGE=__maillage,
+ TYPE_CHAM=__type,
+ INFO=1,
+ ASSE=(_F(CHAM_GD=self,
+ TOUT='OUI',
+ CUMUL='OUI',
+ COEF_R=1.),
+ _F(CHAM_GD=other,
+ TOUT='OUI',
+ CUMUL='OUI',
+ COEF_R=1.),
+ ))
+ return __CHAM
+
+
+
+
+
+
--- /dev/null
+#@ MODIF co_champ SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_champ import sd_champ
+
+# -----------------------------------------------------------------------------
+class cham_gd_sdaster(ASSD, sd_champ):
+ pass
--- /dev/null
+#@ MODIF co_char_acou SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_char_acou import sd_char_acou
+
+# -----------------------------------------------------------------------------
+class char_acou(ASSD, sd_char_acou):
+ pass
--- /dev/null
+#@ MODIF co_char_cine_acou SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_char_cine import sd_char_cine
+
+# -----------------------------------------------------------------------------
+class char_cine_acou(ASSD, sd_char_cine):
+ pass
--- /dev/null
+#@ MODIF co_char_cine_meca SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_char_cine import sd_char_cine
+
+# -----------------------------------------------------------------------------
+class char_cine_meca(ASSD, sd_char_cine):
+ pass
--- /dev/null
+#@ MODIF co_char_cine_ther SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_char_cine import sd_char_cine
+
+# -----------------------------------------------------------------------------
+class char_cine_ther(ASSD, sd_char_cine):
+ pass
--- /dev/null
+#@ MODIF co_char_meca SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_char_meca import sd_char_meca
+
+# -----------------------------------------------------------------------------
+class char_meca(ASSD, sd_char_meca):
+ pass
--- /dev/null
+#@ MODIF co_char_ther SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_char_ther import sd_char_ther
+
+# -----------------------------------------------------------------------------
+class char_ther(ASSD, sd_char_ther):
+ pass
--- /dev/null
+#@ MODIF co_compor SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_compor import sd_compor
+
+# -----------------------------------------------------------------------------
+class compor_sdaster(ASSD, sd_compor):
+ pass
--- /dev/null
+#@ MODIF co_courbe SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_courbe import sd_courbe
+
+# -----------------------------------------------------------------------------
+class courbe_sdaster(ASSD, sd_courbe):
+ pass
--- /dev/null
+#@ MODIF co_fiss_xfem SD DATE 15/10/2007 AUTEUR GENIAUT S.GENIAUT
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_xfem import sd_fiss_xfem
+
+# -----------------------------------------------------------------------------
+class fiss_xfem(ASSD, sd_fiss_xfem):
+ pass
--- /dev/null
+#@ MODIF co_fonction SD DATE 16/11/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_fonction import sd_fonction_aster
+
+import os
+import Numeric
+from math import pi
+
+# -----------------------------------------------------------------------------
+# types 'fonction' :
+class fonction_class(ASSD):
+ def Valeurs(self):
+ pass
+ def Parametres(self):
+ """
+ Retourne un dictionnaire contenant les parametres de la fonction ;
+ le type jeveux (FONCTION, FONCT_C, NAPPE) n'est pas retourne,
+ le dictionnaire peut ainsi etre fourni a CALC_FONC_INTERP tel quel.
+ """
+ from Utilitai.Utmess import UTMESS
+ if self.accessible():
+ TypeProl={'E':'EXCLU', 'L':'LINEAIRE', 'C':'CONSTANT' }
+ objev = '%-19s.PROL' % self.get_name()
+ prol = aster.getvectjev(objev)
+ if prol == None:
+ UTMESS('F', 'SDVERI_2', valk=[objev])
+ dico={
+ 'INTERPOL' : [prol[1][0:3],prol[1][4:7]],
+ 'NOM_PARA' : prol[2][0:16].strip(),
+ 'NOM_RESU' : prol[3][0:16].strip(),
+ 'PROL_DROITE' : TypeProl[prol[4][1]],
+ 'PROL_GAUCHE' : TypeProl[prol[4][0]],
+ }
+ elif hasattr(self,'etape') and self.etape.nom=='DEFI_FONCTION' :
+ dico={
+ 'INTERPOL' : self.etape['INTERPOL'],
+ 'NOM_PARA' : self.etape['NOM_PARA'],
+ 'NOM_RESU' : self.etape['NOM_RESU'],
+ 'PROL_DROITE' : self.etape['PROL_DROITE'],
+ 'PROL_GAUCHE' : self.etape['PROL_GAUCHE'],
+ }
+ if type(dico['INTERPOL']) == tuple:
+ dico['INTERPOL']=list(dico['INTERPOL'])
+ elif type(dico['INTERPOL']) == str:
+ dico['INTERPOL']=[dico['INTERPOL'],]
+ if len(dico['INTERPOL'])==1 :
+ dico['INTERPOL']=dico['INTERPOL']*2
+ else:
+ raise Accas.AsException("Erreur dans fonction.Parametres en PAR_LOT='OUI'")
+ return dico
+ def Trace(self,FORMAT='TABLEAU',**kargs):
+ """Tracé d'une fonction"""
+ if not self.accessible() :
+ raise Accas.AsException("Erreur dans fonction.Trace en PAR_LOT='OUI'")
+ from Utilitai.Graph import Graph
+ gr=Graph()
+ gr.AjoutCourbe(Val=self.Valeurs(),
+ Lab=[self.Parametres()['NOM_PARA'],self.Parametres()['NOM_RESU']],
+ Leg=os.linesep.join(self.TITR.get()) )
+ gr.Trace(FORMAT=FORMAT,**kargs)
+
+# -----------------------------------------------------------------------------
+class fonction_sdaster(fonction_class, sd_fonction_aster):
+ def convert(self,arg='real'):
+ """
+ Retourne un objet de la classe t_fonction
+ représentation python de la fonction
+ """
+ from Cata_Utils.t_fonction import t_fonction,t_fonction_c
+ if arg=='real' :
+ return t_fonction(self.Absc(),
+ self.Ordo(),
+ self.Parametres(),
+ nom=self.nom)
+ elif arg=='complex' :
+ return t_fonction_c(self.Absc(),
+ self.Ordo(),
+ self.Parametres(),
+ nom=self.nom)
+ def Valeurs(self) :
+ """
+ Retourne deux listes de valeurs : abscisses et ordonnees
+ """
+ from Utilitai.Utmess import UTMESS
+ if self.accessible():
+ vale = '%-19s.VALE' % self.get_name()
+ lbl = aster.getvectjev(vale)
+ if lbl == None:
+ UTMESS('F', 'SDVERI_2', valk=[vale])
+ lbl = list(lbl)
+ dim = len(lbl)/2
+ lx = lbl[0:dim]
+ ly = lbl[dim:2*dim]
+ elif hasattr(self, 'etape') and self.etape.nom == 'DEFI_FONCTION' :
+ if self.etape['VALE'] != None:
+ lbl = list(self.etape['VALE'])
+ dim = len(lbl)
+ lx = [lbl[i] for i in range(0,dim,2)]
+ ly = [lbl[i] for i in range(1,dim,2)]
+ elif self.etape['VALE_PARA']!=None:
+ lx = self.etape['VALE_PARA'].Valeurs()
+ ly = self.etape['VALE_FONC'].Valeurs()
+ else:
+ raise Accas.AsException("Erreur (fonction.Valeurs) : ne fonctionne en " \
+ "PAR_LOT='OUI' que sur des fonctions produites par DEFI_FONCTION " \
+ "dans le jdc courant.")
+ return [lx, ly]
+ def Absc(self):
+ """Retourne la liste des abscisses"""
+ return self.Valeurs()[0]
+ def Ordo(self):
+ """Retourne la liste des ordonnées"""
+ return self.Valeurs()[1]
+ def __call__(self,val):
+ ### Pour EFICAS : substitution de l'instance de classe
+ ### parametre par sa valeur
+ if isinstance(val, ASSD):
+ val=val.valeur
+ ###
+ __ff=self.convert()
+ return __ff(val)
+
+# -----------------------------------------------------------------------------
+class para_sensi(fonction_sdaster):
+ pass
+
+# -----------------------------------------------------------------------------
+class fonction_c(fonction_class, sd_fonction_aster):
+ def convert(self,arg='real'):
+ """
+ Retourne un objet de la classe t_fonction ou t_fonction_c,
+ représentation python de la fonction complexe
+ """
+ from Cata_Utils.t_fonction import t_fonction,t_fonction_c
+ if arg=='real' :
+ return t_fonction(self.Absc(),
+ self.Ordo(),
+ self.Parametres(),
+ nom=self.nom)
+ elif arg=='imag' :
+ return t_fonction(self.Absc(),
+ self.OrdoImg(),
+ self.Parametres(),
+ nom=self.nom)
+ elif arg=='modul' :
+ modul=Numeric.sqrt(Numeric.array(self.Ordo())**2+Numeric.array(self.OrdoImg())**2)
+ return t_fonction(self.Absc(),
+ modul,
+ self.Parametres(),
+ nom=self.nom)
+ elif arg=='phase' :
+ phase=Numeric.arctan2(Numeric.array(self.OrdoImg()),Numeric.array(self.Ordo()))
+ phase=phase*180./pi
+ return t_fonction(self.Absc(),
+ phase,
+ self.Parametres(),
+ nom=self.nom)
+ elif arg=='complex' :
+ return t_fonction_c(self.Absc(),
+ map(complex,self.Ordo(),self.OrdoImg()),
+ self.Parametres(),
+ nom=self.nom)
+ def Valeurs(self) :
+ """
+ Retourne trois listes de valeurs : abscisses, parties reelles et imaginaires.
+ """
+ from Utilitai.Utmess import UTMESS
+ if self.accessible():
+ vale = '%-19s.VALE' % self.get_name()
+ lbl = aster.getvectjev(vale)
+ if lbl == None:
+ UTMESS('F', 'SDVERI_2', valk=[vale])
+ lbl = list(lbl)
+ dim=len(lbl)/3
+ lx=lbl[0:dim]
+ lr=[]
+ li=[]
+ for i in range(dim):
+ lr.append(lbl[dim+2*i])
+ li.append(lbl[dim+2*i+1])
+ elif hasattr(self, 'etape') and self.etape.nom == 'DEFI_FONCTION':
+ lbl=list(self.etape['VALE_C'])
+ dim=len(lbl)
+ lx=[lbl[i] for i in range(0,dim,3)]
+ lr=[lbl[i] for i in range(1,dim,3)]
+ li=[lbl[i] for i in range(2,dim,3)]
+ else:
+ raise Accas.AsException("Erreur (fonction_c.Valeurs) : ne fonctionne en " \
+ "PAR_LOT='OUI' que sur des fonctions produites par DEFI_FONCTION " \
+ "dans le jdc courant.")
+ return [lx, lr, li]
+ def Absc(self):
+ """Retourne la liste des abscisses"""
+ return self.Valeurs()[0]
+ def Ordo(self):
+ """Retourne la liste des parties réelles des ordonnées"""
+ return self.Valeurs()[1]
+ def OrdoImg(self):
+ """Retourne la liste des parties imaginaires des ordonnées"""
+ return self.Valeurs()[2]
+ def Trace(self,FORMAT='TABLEAU',**kargs):
+ """Tracé d'une fonction complexe"""
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans fonction_c.Trace en PAR_LOT='OUI'")
+ from Utilitai.Graph import Graph
+ para = self.Parametres()
+ gr=Graph()
+ gr.AjoutCourbe(Val=self.Valeurs(),
+ Lab=[para['NOM_PARA'], '%s_R' % para['NOM_RESU'], '%s_I' % para['NOM_RESU']],
+ Leg=os.linesep.join(self.TITR.get()) )
+ gr.Trace(FORMAT=FORMAT,**kargs)
+ def __call__(self,val):
+ ### Pour EFICAS : substitution de l'instance de classe
+ ### parametre par sa valeur
+ if isinstance(val, ASSD):
+ val=val.valeur
+ ###
+ __ff=self.convert(arg='complex')
+ return __ff(val)
+
+# -----------------------------------------------------------------------------
+class nappe_sdaster(fonction_class, sd_fonction_aster):
+ def convert(self):
+ """
+ Retourne un objet de la classe t_nappe, représentation python de la nappe
+ """
+ from Cata_Utils.t_fonction import t_fonction,t_nappe
+ para=self.Parametres()
+ vale=self.Valeurs()
+ l_fonc=[]
+ i=0
+ for pf in para[1] :
+ para_f={'INTERPOL' : pf['INTERPOL_FONC'],
+ 'PROL_DROITE' : pf['PROL_DROITE_FONC'],
+ 'PROL_GAUCHE' : pf['PROL_GAUCHE_FONC'],
+ 'NOM_PARA' : para[0]['NOM_PARA_FONC'],
+ 'NOM_RESU' : para[0]['NOM_RESU'],
+ }
+ l_fonc.append(t_fonction(vale[1][i][0],vale[1][i][1],para_f))
+ i+=1
+ return t_nappe(vale[0],
+ l_fonc,
+ para[0],
+ nom=self.nom)
+ def Valeurs(self):
+ """
+ Retourne la liste des valeurs du parametre,
+ et une liste de couples (abscisses,ordonnees) de chaque fonction.
+ """
+ from Utilitai.Utmess import UTMESS
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans nappe.Valeurs en PAR_LOT='OUI'")
+ nsd = '%-19s' % self.get_name()
+ dicv=aster.getcolljev(nsd+'.VALE')
+ # les cles de dicv sont 1,...,N (indice du parametre)
+ lpar=aster.getvectjev(nsd+'.PARA')
+ if lpar == None:
+ UTMESS('F', 'SDVERI_2', valk=[nsd+'.PARA'])
+ lval=[]
+ for k in range(len(dicv)):
+ lbl=dicv[k+1]
+ dim=len(lbl)/2
+ lval.append([lbl[0:dim],lbl[dim:2*dim]])
+ return [list(lpar),lval]
+ def Parametres(self):
+ """
+ Retourne un dictionnaire contenant les parametres de la nappe,
+ le type jeveux (NAPPE) n'est pas retourne,
+ le dictionnaire peut ainsi etre fourni a CALC_FONC_INTERP tel quel,
+ et une liste de dictionnaire des parametres de chaque fonction.
+ """
+ from Utilitai.Utmess import UTMESS
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans nappe.Parametres en PAR_LOT='OUI'")
+ TypeProl={'E':'EXCLU', 'L':'LINEAIRE', 'C':'CONSTANT' }
+ objev = '%-19s.PROL' % self.get_name()
+ prol=aster.getvectjev(objev)
+ if prol == None:
+ UTMESS('F', 'SDVERI_2', valk=[objev])
+ dico={
+ 'INTERPOL' : [prol[1][0:3],prol[1][4:7]],
+ 'NOM_PARA' : prol[2][0:16].strip(),
+ 'NOM_RESU' : prol[3][0:16].strip(),
+ 'PROL_DROITE' : TypeProl[prol[4][1]],
+ 'PROL_GAUCHE' : TypeProl[prol[4][0]],
+ 'NOM_PARA_FONC' : prol[6][0:4].strip(),
+ }
+ lparf=[]
+ nbf=(len(prol)-7)/2
+ for i in range(nbf):
+ dicf={
+ 'INTERPOL_FONC' : [prol[7+i*2][0:3],prol[7+i*2][4:7]],
+ 'PROL_DROITE_FONC' : TypeProl[prol[8+i*2][1]],
+ 'PROL_GAUCHE_FONC' : TypeProl[prol[8+i*2][0]],
+ }
+ lparf.append(dicf)
+ return [dico,lparf]
+ def Absc(self):
+ """Retourne la liste des abscisses"""
+ return self.Valeurs()[0]
+ def Trace(self,FORMAT='TABLEAU',**kargs):
+ """Tracé d'une nappe"""
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans nappe.Trace en PAR_LOT='OUI'")
+ from Utilitai.Graph import Graph
+ gr=Graph()
+ lv=self.Valeurs()[1]
+ dp=self.Parametres()[0]
+ for lx,ly in lv:
+ gr.AjoutCourbe(Val=[lx,ly], Lab=[dp['NOM_PARA_FONC'],dp['NOM_RESU']],
+ Leg=os.linesep.join(self.TITR.get()) )
+ gr.Trace(FORMAT=FORMAT,**kargs)
+ def __call__(self,val1,val2):
+ ### Pour EFICAS : substitution de l'instance de classe
+ ### parametre par sa valeur
+ if isinstance(val1, ASSD):
+ val1=val1.valeur
+ if isinstance(val2, ASSD):
+ val2=val2.valeur
+ ###
+ __ff=self.convert()
+ return __ff(val1,val2)
+
--- /dev/null
+#@ MODIF co_fond_fiss SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_fond_fiss import sd_fond_fiss
+
+# -----------------------------------------------------------------------------
+class fond_fiss(ASSD, sd_fond_fiss):
+ pass
--- /dev/null
+#@ MODIF co_gfibre SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_gfibre import sd_gfibre
+
+# -----------------------------------------------------------------------------
+class gfibre_sdaster(ASSD, sd_gfibre):
+ pass
--- /dev/null
+#@ MODIF co_interf_dyna_clas SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_interf_dyna_clas import sd_interf_dyna_clas
+
+# -----------------------------------------------------------------------------
+class interf_dyna_clas(ASSD, sd_interf_dyna_clas):
+ pass
--- /dev/null
+#@ MODIF co_list_inst SD DATE 20/07/2009 AUTEUR GENIAUT S.GENIAUT
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2009 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.
+# ======================================================================
+
+from SD import *
+from sd_list_inst import sd_list_inst
+
+# -----------------------------------------------------------------------------
+class list_inst(ASSD, sd_list_inst):
+ pass
--- /dev/null
+#@ MODIF co_listis SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_listis import sd_listis
+
+# -----------------------------------------------------------------------------
+class listis_sdaster(ASSD, sd_listis):
+ pass
--- /dev/null
+#@ MODIF co_listr8 SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_listr8 import sd_listr8
+
+# -----------------------------------------------------------------------------
+class listr8_sdaster(ASSD, sd_listr8):
+ def Valeurs(self) :
+ """
+ Retourne la liste des valeurs : [val1, ..., valN]
+ """
+ from Utilitai.Utmess import UTMESS
+ if self.accessible():
+ vale='%-19s.VALE' % self.get_name()
+ t_vale = aster.getvectjev(vale)
+ if t_vale == None:
+ UTMESS('F', 'SDVERI_2', valk=[vale])
+ return list(t_vale)
+ else:
+ raise Accas.AsException("Erreur dans listr8.Valeurs en PAR_LOT='OUI'")
+
--- /dev/null
+#@ MODIF co_macr_elem_dyna SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_macr_elem_dyna import sd_macr_elem_dyna
+
+import Numeric
+
+def VALE_triang2array(vect_VALE, dim, typ):
+ """Conversion (par recopie) de l'objet .VALE decrivant une matrice pleine
+ par sa triangulaire sup en Numeric.array plein.
+ """
+ triang_sup = Numeric.array(vect_VALE)
+ assert dim*(dim+1)/2 == len(triang_sup), \
+ 'Matrice non pleine : %d*(%d+1)/2 != %d' % (dim, dim, len(triang_sup))
+
+ valeur = Numeric.zeros([dim, dim], typ)
+ for i in range(1, dim+1):
+ for j in range(1, i+1):
+ k = i*(i-1)/2 + j
+ valeur[j-1, i-1]=triang_sup[k-1]
+ valeur = valeur + Numeric.transpose(valeur)
+ for i in range(dim):
+ valeur[i, i] = 0.5 * valeur[i, i]
+
+ return valeur
+
+# -----------------------------------------------------------------------------
+class macr_elem_dyna(ASSD, sd_macr_elem_dyna):
+
+ def EXTR_MATR_GENE(self,typmat) :
+ """ retourne les valeurs des matrices generalisees reelles
+ dans un format Numerical Array
+ typmat='MASS_GENE' pour obtenir la matrice de masse generalisee
+ typmat='RIGI_GENE' pour obtenir la matrice de raideur generalisee
+ typmat='AMOR_GENE' pour obtenir la matrice d'amortissement generalisee
+ Attributs retourne
+ - self.valeurs : Numeric.array contenant les valeurs """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans macr_elem_dyna.EXTR_MATR_GENE en PAR_LOT='OUI'")
+
+ if (typmat=='MASS_GENE') :
+ macr_elem = self.MAEL_MASS
+ elif (typmat=='RIGI_GENE') :
+ macr_elem = self.MAEL_RAID
+ elif (typmat=='AMOR_GENE') :
+ macr_elem = self.MAEL_AMOR
+ else:
+ raise Accas.AsException("Le type de la matrice est incorrect")
+
+ desc=Numeric.array(macr_elem.DESC.get())
+ # On teste si le DESC du vecteur existe
+ if (desc==None):
+ raise Accas.AsException("L'objet matrice n'existe pas ou est mal cree par Code Aster")
+
+ matrice = VALE_triang2array(macr_elem.VALE.get(), desc[1], Numeric.Float)
+ return matrice
+
+ def RECU_MATR_GENE(self,typmat,matrice) :
+ """ envoie les valeurs d'un Numerical Array dans des matrices generalisees
+ reelles definies dans jeveux
+ typmat='MASS_GENE' pour obtenir la matrice de masse generalisee
+ typmat='RIGI_GENE' pour obtenir la matrice de raideur generalisee
+ typmat='AMOR_GENE' pour obtenir la matrice d'amortissement generalisee
+ Attributs ne retourne rien """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans macr_elem_dyna.RECU_MATR_GENE en PAR_LOT='OUI'")
+
+ nommacr=self.get_name()
+ if (typmat=='MASS_GENE') :
+ macr_elem = self.MAEL_MASS
+ elif (typmat=='RIGI_GENE') :
+ macr_elem = self.MAEL_RAID
+ elif (typmat=='AMOR_GENE') :
+ macr_elem = self.MAEL_AMOR
+ else:
+ raise Accas.AsException("Le type de la matrice est incorrect")
+ nom_vale = macr_elem.VALE.nomj()
+ desc=Numeric.array(macr_elem.DESC.get())
+
+ # On teste si le DESC de la matrice jeveux existe
+ if (desc==None):
+ raise Accas.AsException("L'objet matrice n'existe pas ou est mal cree par Code Aster")
+ Numeric.asarray(matrice)
+
+ # On teste si la matrice python est de dimension 2
+ if (len(Numeric.shape(matrice))<>2):
+ raise Accas.AsException("La dimension de la matrice est incorrecte")
+
+ # On teste si les tailles de la matrice jeveux et python sont identiques
+ if (tuple([desc[1],desc[1]])<>Numeric.shape(matrice)) :
+ raise Accas.AsException("La dimension de la matrice est incorrecte")
+ taille=desc[1]*desc[1]/2.0+desc[1]/2.0
+ tmp=Numeric.zeros([int(taille)],Numeric.Float)
+ for j in range(desc[1]+1):
+ for i in range(j):
+ k=j*(j-1)/2+i
+ tmp[k]=matrice[j-1,i]
+ aster.putvectjev(nom_vale,len(tmp),tuple((
+ range(1,len(tmp)+1))),tuple(tmp),tuple(tmp),1)
+ return
+
--- /dev/null
+#@ MODIF co_macr_elem_stat SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_macr_elem_stat import sd_macr_elem_stat
+
+# -----------------------------------------------------------------------------
+# Description de la structure de données
+class macr_elem_stat(ASSD, sd_macr_elem_stat):
+ pass
--- /dev/null
+#@ MODIF co_maillage SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_maillage import sd_maillage
+
+# -----------------------------------------------------------------------------
+class maillage_sdaster(ASSD, sd_maillage):
+ def LIST_GROUP_NO(self) :
+ """ retourne la liste des groupes de noeuds sous la forme :
+ [ (gno1, nb noeuds gno1), ...] """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans maillage.LIST_GROUP_NO en PAR_LOT='OUI'")
+ nommail=self.get_name()
+ dic_gpno=aster.getcolljev(nommail.ljust(8)+".GROUPENO")
+ #dic_gpno = self.GROUPENO.get()
+ return [(gpno.strip(),len(dic_gpno[gpno])) for gpno in dic_gpno]
+
+ def LIST_GROUP_MA(self) :
+ """ retourne la liste des groupes de mailles sous la forme :
+ [ (gma1, nb mailles gma1, dime max des mailles gma1), ...] """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans maillage.LIST_GROUP_MA en PAR_LOT='OUI'")
+ nommail=self.get_name()
+ nommail=nommail.ljust(8)
+ ngpma=[]
+ ltyma =aster.getvectjev("&CATA.TM.NOMTM")
+ catama=aster.getcolljev("&CATA.TM.TMDIM")
+ dic_gpma=aster.getcolljev(nommail+".GROUPEMA")
+ dimama=[catama[ltyma[ma-1]][0] for ma in aster.getvectjev(nommail+".TYPMAIL")]
+ for grp in dic_gpma.keys():
+ dim=max([dimama[ma-1] for ma in dic_gpma[grp]])
+ ngpma.append((grp.strip(),len(dic_gpma[grp]),dim))
+ return ngpma
+
--- /dev/null
+#@ MODIF co_mater SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_mater import sd_mater
+
+# -----------------------------------------------------------------------------
+class mater_sdaster(ASSD, sd_mater):
+ def RCVALE(self, phenomene, nompar=(), valpar=(), nomres=(), stop='F'):
+ """Appel à la routine fortran RCVALE pour récupérer les valeurs des
+ propriétés du matériau.
+ """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans mater.RCVALE en PAR_LOT='OUI'")
+ from Utilitai.Utmess import UTMESS
+ # vérification des arguments
+ if not type(nompar) in (list, tuple):
+ nompar = [nompar,]
+ if not type(valpar) in (list, tuple):
+ valpar = [valpar,]
+ if not type(nomres) in (list, tuple):
+ nomres = [nomres,]
+ nompar = tuple(nompar)
+ valpar = tuple(valpar)
+ nomres = tuple(nomres)
+ if len(nompar) != len(valpar):
+ vk1=', '.join(nompar)
+ vk2=', '.join([repr(v) for v in valpar])
+ UTMESS('F','SDVERI_4',valk=[vk1,vk2])
+ if len(nomres) < 1:
+ UTMESS('F', 'SDVERI_5')
+ # appel à l'interface Python/C
+ return aster.rcvale(self.nom, phenomene, nompar, valpar, nomres, stop)
+
+
--- /dev/null
+#@ MODIF co_matr_asse SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_matr_asse import sd_matr_asse
+
+# -----------------------------------------------------------------------------
+class matr_asse(ASSD, sd_matr_asse):
+ pass
+
--- /dev/null
+#@ MODIF co_matr_asse_gd SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from sd_matr_asse_gd import sd_matr_asse_gd
+from co_matr_asse import matr_asse
+
+# -----------------------------------------------------------------------------
+# Description de la structure de données
+class matr_asse_gd(matr_asse, sd_matr_asse_gd):
+ pass
+
+class matr_asse_depl_c(matr_asse_gd):
+ pass
+
+class matr_asse_depl_r(matr_asse_gd):
+ pass
+
+class matr_asse_pres_c(matr_asse_gd):
+ pass
+
+class matr_asse_pres_r(matr_asse_gd):
+ pass
+
+class matr_asse_temp_c(matr_asse_gd):
+ pass
+
+class matr_asse_temp_r(matr_asse_gd):
+ pass
--- /dev/null
+#@ MODIF co_matr_asse_gene SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_matr_asse_gene import sd_matr_asse_gene
+
+import Numeric
+import math
+
+def VALM_triang2array(dict_VALM, dim, typ):
+ """Conversion (par recopie) de l'objet .VALM decrivant une matrice pleine
+ par sa triangulaire inf (et parfois triang sup) en Numeric.array plein.
+ """
+ # stockage symetrique ou non (triang inf+sup)
+ sym = len(dict_VALM) == 1
+ triang_sup = Numeric.array(dict_VALM[1])
+ assert dim*(dim+1)/2 == len(triang_sup), \
+ 'Matrice non pleine : %d*(%d+1)/2 != %d' % (dim, dim, len(triang_sup))
+ if sym:
+ triang_inf = triang_sup
+ else:
+ triang_inf = Numeric.array(dict_VALM[2])
+ valeur=Numeric.zeros([dim, dim], typ)
+ for i in range(1, dim+1):
+ for j in range(1, i+1):
+ k = i*(i-1)/2 + j
+ valeur[i-1, j-1]=triang_inf[k-1]
+ valeur[j-1, i-1]=triang_sup[k-1]
+ return valeur
+
+def VALM_diag2array(dict_VALM, dim, typ):
+ """Conversion (par recopie) de l'objet .VALM decrivant une matrice
+ diagonale en Numeric.array plein.
+ """
+ diag = Numeric.array(dict_VALM[1])
+ assert dim == len(diag), 'Dimension incorrecte : %d != %d' % (dim, len(diag))
+ valeur=Numeric.zeros([dim, dim], typ)
+ for i in range(dim):
+ valeur[i,i] = diag[i]
+ return valeur
+
+# -----------------------------------------------------------------------------
+class matr_asse_gene(ASSD, sd_matr_asse_gene):
+ pass
+
+# -----------------------------------------------------------------------------
+class matr_asse_gene_r(matr_asse_gene):
+ def EXTR_MATR_GENE(self) :
+ """ retourne les valeurs de la matrice generalisee reelle
+ dans un format Numerical Array
+ Attributs retourne
+ - self.valeurs : Numeric.array contenant les valeurs """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans matr_asse_gene.EXTR_MATR_GENE en PAR_LOT='OUI'")
+
+ desc=Numeric.array(self.DESC.get())
+ # On teste si le DESC de la matrice existe
+ if (desc==None):
+ raise Accas.AsException("L'objet matrice n'existe pas ou est mal cree par Code Aster")
+ # Si le stockage est plein
+ if desc[2]==2 :
+ valeur = VALM_triang2array(self.VALM.get(), desc[1], Numeric.Float)
+
+ # Si le stockage est diagonal
+ elif desc[2]==1 :
+ valeur = VALM_diag2array(self.VALM.get(), desc[1], Numeric.Float)
+
+ # Sinon on arrete tout
+ else:
+ raise KeyError
+ return valeur
+
+ def RECU_MATR_GENE(self,matrice) :
+ """ envoie les valeurs d'un Numerical Array dans des matrices
+ generalisees reelles definies dans jeveux
+ Attributs ne retourne rien """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans matr_asse_gene.RECU_MATR_GENE en PAR_LOT='OUI'")
+
+ ncham=self.get_name()
+ desc=Numeric.array(self.DESC.get())
+
+ # On teste si le DESC de la matrice existe
+ if (desc==None):
+ raise Accas.AsException("L'objet matrice n'existe pas ou est mal cree par Code Aster")
+ Numeric.asarray(matrice)
+
+ # On teste si la dimension de la matrice python est 2
+ if (len(Numeric.shape(matrice))<>2) :
+ raise Accas.AsException("La dimension de la matrice est incorrecte ")
+
+ # On teste si les tailles des matrices jeveux et python sont identiques
+ if (tuple([desc[1],desc[1]])<>Numeric.shape(matrice)) :
+ raise Accas.AsException("La taille de la matrice est incorrecte ")
+
+ # Si le stockage est plein
+ if desc[2]==2 :
+ taille=desc[1]*desc[1]/2.0+desc[1]/2.0
+ tmp=Numeric.zeros([int(taille)],Numeric.Float)
+ for j in range(desc[1]+1):
+ for i in range(j):
+ k=j*(j-1)/2+i
+ tmp[k]=matrice[j-1,i]
+ aster.putcolljev('%-19s.VALM' % ncham,len(tmp),tuple((\
+ range(1,len(tmp)+1))),tuple(tmp),tuple(tmp),1)
+ # Si le stockage est diagonal
+ elif desc[2]==1 :
+ tmp=Numeric.zeros(desc[1],Numeric.Float)
+ for j in range(desc[1]):
+ tmp[j]=matrice[j,j]
+ aster.putcolljev('%-19s.VALM' % ncham,len(tmp),tuple((\
+ range(1,len(tmp)+1))),tuple(tmp),tuple(tmp),1)
+ # Sinon on arrete tout
+ else:
+ raise KeyError
+ return
+
+# -----------------------------------------------------------------------------
+class matr_asse_gene_c(matr_asse_gene):
+ def EXTR_MATR_GENE(self) :
+ """ retourne les valeurs de la matrice generalisee complexe
+ dans un format Numerical Array
+ Attributs retourne
+ - self.valeurs : Numeric.array contenant les valeurs """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans matr_asse_gene_c.EXTR_MATR_GENE en PAR_LOT='OUI'")
+
+ desc = Numeric.array(self.DESC.get())
+ if desc == None:
+ raise Accas.AsException("L'objet matrice n'existe pas ou est mal cree par Code Aster ")
+ # Si le stockage est plein
+ if desc[2] == 2 :
+ valeur = VALM_triang2array(self.VALM.get(), desc[1], Numeric.Complex)
+
+ # Si le stockage est diagonal
+ elif desc[2]==1 :
+ valeur = VALM_diag2array(self.VALM.get(), desc[1], Numeric.Complex)
+
+ # Sinon on arrete tout
+ else:
+ raise KeyError
+ return valeur
+
+ def RECU_MATR_GENE(self,matrice) :
+ """ envoie les valeurs d'un Numerical Array dans des matrices
+ generalisees reelles definies dans jeveux
+ Attributs ne retourne rien """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans matr_asse_gene_c.RECU_MATR_GENE en PAR_LOT='OUI'")
+
+ Numeric.asarray(matrice)
+ ncham=self.get_name()
+ desc=Numeric.array(self.DESC.get())
+
+ # On teste si le DESC de la matrice existe
+ if (desc==None):
+ raise Accas.AsException("L'objet matrice n'existe pas ou est mal cree par Code Aster")
+ Numeric.asarray(matrice)
+
+ # On teste si la dimension de la matrice python est 2
+ if (len(Numeric.shape(matrice))<>2) :
+ raise Accas.AsException("La dimension de la matrice est incorrecte ")
+
+ # On teste si la taille de la matrice jeveux et python est identique
+ if (tuple([desc[1],desc[1]])<>Numeric.shape(matrice)) :
+ raise Accas.AsException("La taille de la matrice est incorrecte ")
+
+ # Si le stockage est plein
+ if desc[2]==2 :
+ taille=desc[1]*desc[1]/2.0+desc[1]/2.0
+ tmpr=Numeric.zeros([int(taille)],Numeric.Float)
+ tmpc=Numeric.zeros([int(taille)],Numeric.Float)
+ for j in range(desc[1]+1):
+ for i in range(j):
+ k=j*(j-1)/2+i
+ tmpr[k]=matrice[j-1,i].real
+ tmpc[k]=matrice[j-1,i].imag
+ aster.putvectjev('%-19s.VALM' % ncham, len(tmpr), tuple((\
+ range(1,len(tmpr)+1))),tuple(tmpr),tuple(tmpc),1)
+ # Si le stockage est diagonal
+ elif desc[2]==1 :
+ tmpr=Numeric.zeros(desc[1],Numeric.Float)
+ tmpc=Numeric.zeros(desc[1],Numeric.Float)
+ for j in range(desc[1]):
+ tmpr[j]=matrice[j,j].real
+ tmpc[j]=matrice[j,j].imag
+ aster.putvectjev('%-19s.VALM' % ncham,len(tmpr),tuple((\
+ range(1,len(tmpr)+1))),tuple(tmpr),tuple(tmpc),1)
+ # Sinon on arrete tout
+ else:
+ raise KeyError
+ return
--- /dev/null
+#@ MODIF co_matr_elem SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_matr_elem import sd_matr_elem
+
+# -----------------------------------------------------------------------------
+class matr_elem(ASSD, sd_matr_elem):
+ pass
+
+class matr_elem_depl_c(matr_elem):
+ pass
+
+class matr_elem_depl_r(matr_elem):
+ pass
+
+class matr_elem_pres_c(matr_elem):
+ pass
+
+class matr_elem_temp_r(matr_elem):
+ pass
+
+
--- /dev/null
+#@ MODIF co_melasflu SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_melasflu import sd_melasflu
+
+# -----------------------------------------------------------------------------
+class melasflu_sdaster(ASSD, sd_melasflu):
+ pass
--- /dev/null
+#@ MODIF co_mode_cycl SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_mode_cycl import sd_mode_cycl
+
+# -----------------------------------------------------------------------------
+class mode_cycl(ASSD, sd_mode_cycl):
+ pass
+
--- /dev/null
+#@ MODIF co_mode_meca SD DATE 11/05/2009 AUTEUR NISTOR I.NISTOR
+
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2009 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.
+# ======================================================================
+
+from SD import *
+from sd_mode_meca import sd_mode_meca
+
+from co_resultat_dyn import resultat_dyn
+
+# -----------------------------------------------------------------------------
+class mode_meca(resultat_dyn, sd_mode_meca):
+ pass
--- /dev/null
+#@ MODIF co_modele SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_modele import sd_modele
+
+# -----------------------------------------------------------------------------
+class modele_sdaster(ASSD, sd_modele):
+ pass
+
--- /dev/null
+#@ MODIF co_modele_gene SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_modele_gene import sd_modele_gene
+
+# -----------------------------------------------------------------------------
+class modele_gene(ASSD, sd_modele_gene):
+ def LIST_SOUS_STRUCT(self) :
+ """ retourne la liste des sous structures du modele generalise
+ la liste des macro-elements sous-jacents"""
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans modele_gene.LIST_SOUS_STRUCT en PAR_LOT='OUI'")
+ nommodgen=self.get_name()
+ ncham=nommodgen+(8-len(nommodgen))*' '
+ ssno=aster.getvectjev(ncham+(14-len(ncham))*' '+'.MODG.SSNO')
+ ssme=aster.getcolljev(ncham+(14-len(ncham))*' '+'.MODG.SSME')
+ return [([ssno[ind], ssme[ind+1]]) for ind in range(len(ssno))]
+
+ def LIST_LIAIS_STRUCT(self) :
+ """ retourne la liste des liaisons entre sous structures du modele generalise sous la forme :
+ [ (ss1, nom_liais1, ss2 , nom_liais2), ...] """
+ if not self.accessible() :
+ raise Accas.AsException("Erreur dans modele_gene.LIST_LIAIS_STRUCT en PAR_LOT='OUI'")
+ nommodgen=self.get_name()
+ ncham=nommodgen+(8-len(nommodgen))*' '
+ lidf=aster.getcolljev(ncham+(14-len(ncham))*' '+'.MODG.LIDF')
+ return [([(lidf[ind][indb]) for indb in range(4)]) for ind in lidf]
+
--- /dev/null
+#@ MODIF co_nume_ddl SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_nume_ddl import sd_nume_ddl
+
+# -----------------------------------------------------------------------------
+# Description de la structure de données
+class nume_ddl_sdaster(ASSD, sd_nume_ddl):
+ pass
--- /dev/null
+#@ MODIF co_nume_ddl_gene SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_nume_ddl import sd_nume_ddl
+###sd_nume_eqge ????????
+
+# -----------------------------------------------------------------------------
+class nume_ddl_gene(ASSD, sd_nume_ddl):
+ pass
--- /dev/null
+#@ MODIF co_resultat SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_resultat import sd_resultat
+
+# -----------------------------------------------------------------------------
+class resultat_sdaster(ASSD, sd_resultat):
+ def LIST_CHAMPS (self) :
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans resultat.LIST_CHAMPS en PAR_LOT='OUI'")
+ return aster.GetResu(self.get_name(), "CHAMPS")
+
+ def LIST_NOM_CMP (self) :
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans resultat.LIST_NOM_CMP en PAR_LOT='OUI'")
+ return aster.GetResu(self.get_name(), "COMPOSANTES")
+
+ def LIST_VARI_ACCES (self) :
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans resultat.LIST_VARI_ACCES en PAR_LOT='OUI'")
+ return aster.GetResu(self.get_name(), "VARI_ACCES")
+
+ def LIST_PARA (self) :
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans resultat.LIST_PARA en PAR_LOT='OUI'")
+ return aster.GetResu(self.get_name(), "PARAMETRES")
+
+# -----------------------------------------------------------------------------
+class resultat_jeveux(resultat_sdaster):
+ """Classe permettant d'accéder à un resultat jeveux qui n'a pas d'ASSD associée,
+ c'est le cas des concepts résultats (table, evol_xxxx) dérivés."""
+ def __init__(self,nom_jeveux):
+ self.nom=nom_jeveux
+ AsBase.__init__(self, nomj=self.nom)
--- /dev/null
+#@ MODIF co_resultat_dyn SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_resultat_dyn import sd_resultat_dyn
+
+from co_resultat import resultat_sdaster
+
+# -----------------------------------------------------------------------------
+class resultat_dyn(resultat_sdaster, sd_resultat_dyn):
+ pass
--- /dev/null
+#@ MODIF co_sd_feti SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_feti import sd_feti
+
+# -----------------------------------------------------------------------------
+class sd_feti_sdaster(ASSD, sd_feti):
+ pass
--- /dev/null
+#@ MODIF co_spectre SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_spectre import sd_spectre
+
+# -----------------------------------------------------------------------------
+class spectre_sdaster(ASSD, sd_spectre):
+ pass
--- /dev/null
+#@ MODIF co_squelette SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_squelette import sd_squelette
+
+from co_maillage import maillage_sdaster
+
+# -----------------------------------------------------------------------------
+class squelette(maillage_sdaster, sd_squelette):
+ pass
--- /dev/null
+#@ MODIF co_surface SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_surface import sd_surface
+
+# -----------------------------------------------------------------------------
+class surface_sdaster(ASSD, sd_surface):
+ pass
--- /dev/null
+#@ MODIF co_table SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_table import sd_table
+
+# -----------------------------------------------------------------------------
+class table_sdaster(ASSD, sd_table):
+ def __getitem__(self,key):
+ from Utilitai.Utmess import UTMESS
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans table.__getitem__ en PAR_LOT='OUI'")
+ requete = '%-24s' % key[0]
+ tblp = '%-19s.TBLP' % self.get_name()
+ tabnom = aster.getvectjev(tblp)
+ #tabnom = self.TBLP.get()
+ if tabnom == None:
+ UTMESS('F','SDVERI_2',valk=[tblp])
+ for i in range(len(tabnom)) :
+ if tabnom[i]==requete: break
+ resu=aster.getvectjev(tabnom[i+2])
+ if resu == None:
+ UTMESS('F','SDVERI_2',valk=[tabnom[i+2]])
+ exist=aster.getvectjev(tabnom[i+3])
+ if exist == None:
+ UTMESS('F','SDVERI_2',valk=[tabnom[i+3]])
+ if key[1]>len(resu) or exist[key[1]-1]==0:
+ raise KeyError
+ else:
+ return resu[key[1]-1]
+
+ def TITRE(self):
+ """Retourne le titre d'une table Aster
+ (Utile pour récupérer le titre et uniquement le titre d'une table dont
+ on souhaite manipuler la dérivée).
+ """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans table.TITRE en PAR_LOT='OUI'")
+ titj = aster.getvectjev('%-19s.TITR' % self.get_name())
+ #titj = self.TITR.get()
+ if titj != None:
+ titr = '\n'.join(titj)
+ else:
+ titr = ''
+ return titr
+
+ def EXTR_TABLE(self) :
+ """Produit un objet Table à partir du contenu d'une table Aster
+ """
+ def Nonefy(l1,l2) :
+ if l2==0 : return None
+ else : return l1
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans table.EXTR_TABLE en PAR_LOT='OUI'")
+ from Utilitai.Table import Table
+ # titre
+ titr = self.TITRE()
+ # récupération des paramètres
+ v_tblp = aster.getvectjev('%-19s.TBLP' % self.get_name())
+ #v_tblp = self.TBLP.get()
+ if v_tblp == None:
+ # retourne une table vide
+ return Table(titr=titr)
+ tabnom=list(v_tblp)
+ nparam=len(tabnom)/4
+ lparam=[tabnom[4*i:4*i+4] for i in range(nparam)]
+ dval={}
+ # liste des paramètres et des types
+ lpar=[]
+ ltyp=[]
+ for i in lparam :
+ value=list(aster.getvectjev(i[2]))
+ exist=aster.getvectjev(i[3])
+ dval[i[0].strip()] = map(Nonefy,value,exist)
+ lpar.append(i[0].strip())
+ ltyp.append(i[1].strip())
+ n=len(dval[lpar[0]])
+ # contenu : liste de dict
+ lisdic=[]
+ for i in range(n) :
+ d={}
+ for p in lpar:
+ d[p]=dval[p][i]
+ lisdic.append(d)
+ return Table(lisdic, lpar, ltyp, titr)
+
+# -----------------------------------------------------------------------------
+class table_fonction(table_sdaster):
+ """Table contenant en plus une colonne FONCTION et/ou FONCTION_C dont les
+ valeurs des cellules sont des noms de fonction_sdaster ou fonction_c.
+ """
+
+# -----------------------------------------------------------------------------
+class table_jeveux(table_sdaster):
+ """Classe permettant d'accéder à une table jeveux qui n'a pas d'ASSD associée,
+ c'est le cas des concepts résultats (table, evol_xxxx) dérivés."""
+ def __init__(self, nom_jeveux):
+ self.nom = nom_jeveux
+ AsBase.__init__(self, nomj=self.nom)
--- /dev/null
+#@ MODIF co_table_container SD DATE 12/02/2008 AUTEUR REZETTE C.REZETTE
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2008 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.
+# ======================================================================
+
+from SD import *
+from co_table import table_sdaster
+from sd_table_container import sd_table_container
+
+# -----------------------------------------------------------------------------
+class table_container(table_sdaster,sd_table_container):
+ """Table contenant les colonnes NOM_OBJET, TYPE_OBJET et NOM_SD.
+ """
+
--- /dev/null
+#@ MODIF co_table_fonction SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from co_table import table_sdaster
+from sd_table_fonction import sd_table_fonction
+
+# -----------------------------------------------------------------------------
+class table_fonction(table_sdaster,sd_table_fonction):
+ """Table contenant une colonne FONCTION et/ou FONCTION_C dont les
+ valeurs des cellules sont des noms de fonction_sdaster ou fonction_c.
+ """
+
--- /dev/null
+#@ MODIF co_tran_gene SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_tran_gene import sd_tran_gene
+
+# -----------------------------------------------------------------------------
+class tran_gene(ASSD, sd_tran_gene):
+ pass
--- /dev/null
+#@ MODIF co_type_flui_stru SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_type_flui_stru import sd_type_flui_stru
+
+# -----------------------------------------------------------------------------
+class type_flui_stru(ASSD, sd_type_flui_stru):
+ pass
--- /dev/null
+#@ MODIF co_vect_asse_gene SD DATE 30/06/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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 Accas
+from SD import *
+from sd_cham_gene import sd_cham_gene
+
+import Numeric
+
+# -----------------------------------------------------------------------------
+
+class vect_asse_gene(ASSD, sd_cham_gene):
+ def EXTR_VECT_GENE_R(self) :
+ """ retourne les valeurs du vecteur generalisee
+ dans un format Numerical Array
+ Attributs retourne
+ - self.valeurs : Numeric.array contenant les valeurs """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans vect_asse_gene_r.EXTR_VECT_GENE en PAR_LOT='OUI'")
+ ncham=self.get_name()
+ ncham=ncham+(8-len(ncham))*' '
+ valeur=Numeric.array(aster.getvectjev(ncham+(19-len(ncham))*' '+'.VALE'))
+ return valeur
+
+ def RECU_VECT_GENE_R(self,vecteur) :
+ """ envoie les valeurs d'un Numerical Array dans un vecteur generalise
+ reel definie dans jeveux
+ Attributs ne retourne rien """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans vect_asse_gene_r.RECU_VECT_GENE en PAR_LOT='OUI'")
+
+ Numeric.asarray(vecteur)
+ ncham=self.get_name()
+ ncham=ncham+(8-len(ncham))*' '
+ desc=Numeric.array(aster.getvectjev(ncham+(19-len(ncham))*' '+'.DESC'))
+ # On teste si le DESC du vecteur existe
+ if (desc==None):
+ raise Accas.AsException("L'objet vecteur n'existe pas ou \
+ est mal cree par Code Aster")
+ # On teste si la taille du vecteur jeveux et python est identique
+ if desc[1]<>Numeric.shape(vecteur)[0] :
+ raise Accas.AsException("La taille du vecteur python est incorrecte")
+ aster.putvectjev(ncham+(19-len(ncham))*' '+'.VALE',len(vecteur),tuple((\
+ range(1,len(vecteur)+1))),tuple(vecteur),tuple(vecteur),1)
+ return
+
+ def EXTR_VECT_GENE_C(self) :
+ """ retourne les valeurs du vecteur generalisee
+ dans un format Numerical Array
+ Attributs retourne
+ - self.valeurs : Numeric.array contenant les valeurs """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans vect_asse_gene_c.EXTR_VECT_GENE en PAR_LOT='OUI'")
+
+ ncham=self.get_name()
+ ncham=ncham+(8-len(ncham))*' '
+ valeur=Numeric.array(aster.getvectjev(ncham+(19-len(ncham))*' '+'.VALE'),Numeric.Complex)
+
+ return valeur
+
+ def RECU_VECT_GENE_C(self,vecteur) :
+ """ envoie les valeurs d'un Numerical Array dans un vecteur generalise
+ complexe definie dans jeveux
+ Attributs ne retourne rien """
+ if not self.accessible():
+ raise Accas.AsException("Erreur dans vect_asse_gene_c.RECU_VECT_GENE en PAR_LOT='OUI'")
+
+ Numeric.asarray(vecteur)
+ ncham=self.get_name()
+ ncham=ncham+(8-len(ncham))*' '
+ desc=Numeric.array(aster.getvectjev(ncham+(19-len(ncham))*' '+'.DESC'))
+ # On teste si le DESC de la matrice existe
+ if (desc==None):
+ raise Accas.AsException("L'objet vecteur n'existe pas ou \
+ est mal cree par Code Aster")
+ # On teste si la taille de la matrice jeveux et python est identique
+ if desc[1]<>Numeric.shape(vecteur)[0] :
+ raise Accas.AsException("La taille du vecteur python est incorrecte")
+ tmpr=vecteur.real
+ tmpc=vecteur.imag
+ aster.putvectjev(ncham+(19-len(ncham))*' '+'.VALE',len(tmpr),tuple((
+ range(1,len(tmpr)+1))),tuple(tmpr),tuple(tmpc),1)
+ return
+
--- /dev/null
+#@ MODIF co_vect_elem SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_vect_elem import sd_vect_elem
+
+# -----------------------------------------------------------------------------
+class vect_elem(ASSD, sd_vect_elem):
+ pass
+
+class vect_elem_depl_r(vect_elem):
+ pass
+
+class vect_elem_pres_r(vect_elem):
+ pass
+
+class vect_elem_pres_c(vect_elem):
+ pass
+
+class vect_elem_temp_r(vect_elem):
+ pass
--- /dev/null
+#@ MODIF sd_amor_modal SD DATE 04/04/2007 AUTEUR ABBAS M.ABBAS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+from SD import *
+
+class sd_amor_modal(AsBase):
+#------------------------------------
+ nomj = SDNom(fin=19)
+
+ VALM=AsVR()
+ BASM=AsVR()
+
--- /dev/null
+#@ MODIF sd_base_modale SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_resultat_dyn import sd_resultat_dyn
+
+
+class sd_base_modale(sd_resultat_dyn):
+#--------------------------------------------------
+ nomj = SDNom(fin=8)
+ UTIL = Facultatif(AsVI(SDNom(debut=19))) # AJACOT_PB : .UTIL n'existe pas pour sdlx201a
+
+
--- /dev/null
+#@ MODIF sd_cabl_precont SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+
+from SD.sd_liste_rela import sd_liste_rela
+from SD.sd_carte import sd_carte
+from SD.sd_l_table import sd_l_table
+
+
+class sd_cabl_precont(sd_titre):
+#-----------------------------------------
+ nomj = SDNom(fin=8)
+ chme_sigin = sd_carte(SDNom(nomj='.CHME.SIGIN', fin=19))
+ lirela = sd_liste_rela(SDNom(nomj='.LIRELA', fin=19))
+ lt = sd_l_table(SDNom(nomj=''))
+
+
--- /dev/null
+#@ MODIF sd_cara_elem SD DATE 23/10/2008 AUTEUR TORKHANI M.TORKHANI
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_cham_elem import sd_cham_elem
+from SD.sd_carte import sd_carte
+
+class sd_cara_elem(AsBase):
+#--------------------------
+ nomj = SDNom(fin=8)
+ CARGENBA = Facultatif(sd_carte())
+ CAFIBR = Facultatif(sd_cham_elem())
+ CARMASSI = Facultatif(sd_carte())
+ CARCABLE = Facultatif(sd_carte())
+ CARCOQUE = Facultatif(sd_carte())
+ CARGEOBA = Facultatif(sd_carte())
+ CANBSP = Facultatif(sd_cham_elem())
+ CARDISCK = Facultatif(sd_carte())
+ CARARCPO = Facultatif(sd_carte())
+ CARGENPO = Facultatif(sd_carte())
+ CARDISCM = Facultatif(sd_carte())
+ CARORIEN = Facultatif(sd_carte())
+ CARDISCA = Facultatif(sd_carte())
+ CVENTCXF = Facultatif(sd_carte())
+ CARPOUFL = Facultatif(sd_carte())
+ CARGEOPO = Facultatif(sd_carte())
+ CARRIGXN = Facultatif(AsVK8())
+ CARRIGXV = Facultatif(AsVR())
+ CARDNSCK = Facultatif(sd_carte())
+ CARDNSCM = Facultatif(sd_carte())
+ CARDNSCA = Facultatif(sd_carte())
+ CARDINFO = Facultatif(sd_carte())
+
+
--- /dev/null
+#@ MODIF sd_carte SD DATE 10/07/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+from SD.sd_util import *
+
+
+
+class sd_carte(sd_titre):
+#----------------------------
+ nomj = SDNom(fin=19)
+
+ DESC = AsVI(docu='CART', )
+ NOMA = AsVK8(lonmax=1, )
+ VALE = AsVect(type=Parmi('C', 'K', 'R'), ltyp=Parmi(16, 24, 8), )
+
+ NOLI = Facultatif(AsVK24())
+ LIMA = Facultatif(AsColl(acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', ))
+
+
+ def exists(self):
+ return self.NOMA.exists
+
+
+ def check_NOMA(self,checker):
+ if not self.exists() : return
+ noma=self.NOMA.get_stripped()
+
+ # faut-il vérifier le sd_maillage de chaque sd_carte ? AJACOT_PB (meme question que pour sd_cham_no)
+ # - cela risque de couter cher
+ # - cela pose un problème "import circulaire" avec sd_maillage -> sd_carte => import ici
+ # from SD.sd_maillage import sd_maillage
+ # sd2=sd_maillage(noma[0]); sd2.check(checker)
+ # Rem : si on vérifie le sd_maillage, il me semble que sdll503a se plante (RuntimeError: maximum recursion depth exceeded)
+
+
+ def check_DESC(self,checker):
+ if not self.exists() : return
+ desc=self.DESC.get()
+ numgd =desc[0]
+ n_gd_max =desc[1]
+ n_gd_edit=desc[2]
+ assert numgd > 0 , desc
+ assert n_gd_max > 0 , desc
+ assert n_gd_edit >=0 , desc # AJACOT_PB : j'aurais préféré n_gd_edit > 0
+ # mais acearp.f crée parfois des cartes "vides" (zzzz200a)
+ assert n_gd_edit <= n_gd_max , desc
+ for kedit in range(n_gd_edit) :
+ code=desc[3+2*kedit]
+ assert abs(code) in (1,2,3) , (code, kedit, desc)
+
+
+ def check_VALE(self,checker):
+ if not self.exists() : return
+ n1=self.VALE.lonmax
+ desc=self.DESC.get()
+ n_gd_max =desc[1]
+ numgd =desc[0]
+ ncmp_max=len(sdu_licmp_gd(numgd))
+ assert n1==ncmp_max*n_gd_max , (n1, ncmp_max, n_gd_max)
+
+
--- /dev/null
+#@ MODIF sd_cham_elem SD DATE 07/10/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+
+from SD.sd_ligrel import sd_ligrel
+
+
+class sd_cham_elem(sd_titre):
+#-------------------------------------
+ nomj = SDNom(fin=19)
+ CELD = AsVI(docu='CHML', )
+ CELV = AsObject(genr='V', xous='S', type=Parmi('C', 'I', 'K', 'R'), ltyp=Parmi(4,8,16), )
+ CELK = AsVK24(lonmax=7, )
+
+
+ def exists(self):
+ # retourne "vrai" si la SD semble exister (et donc qu'elle peut etre vérifiée)
+ return self.CELK.exists
+
+ def check_1(self, checker):
+ if not self.exists() : return
+ celk=self.CELK.get_stripped()
+ sd2=sd_ligrel(celk[0]); sd2.check(checker)
+ assert celk[1] != '' , celk
+ assert celk[2] in ('ELNO','ELGA','ELEM') , celk
+ assert celk[4] in ('','INF','MOY','SUP') , celk
+ assert celk[5] != '' , celk
+ assert celk[6] in ('MPI_COMPLET','MPI_INCOMPLET') , celk
+
+ def check_2(self, checker):
+ if not checker._profond : return
+ if not self.exists() : return
+ celd=self.CELD.get()
+ assert celd[0] > 0 , celd
+ ngrel= celd[1]
+ assert ngrel > 0 , celd
+ mxsp = celd[2]
+ assert mxsp > 0 , celd
+ mxcmp = celd[3]
+ lvari = mxcmp > 0
+ for kgrel in range(ngrel) :
+ debugr= celd[4+kgrel]-1
+ nbel = celd[debugr+1]
+ modelo= celd[debugr+2]
+ lgcata= celd[debugr+3]
+ lggrel= celd[debugr+4]
+
+ assert nbel > 0 , (nbel,kgrel)
+ assert modelo >= 0 , (modelo,kgrel)
+ if modelo == 0 :
+ assert lgcata == 0 , (lgcata,kgrel)
+ assert lggrel == 0 , (lggrel,kgrel)
+ continue
+
+ assert lgcata > 0 , (lgcata,kgrel)
+ assert lggrel > 0 , (lggrel,kgrel)
+ assert lggrel >= nbel*lgcata , (lggrel,kgrel,nbel,lgcata)
+
+
+ for iel in range(nbel) :
+ nbsp =celd[debugr+4+4*iel+1]
+ ncdyn =celd[debugr+4+4*iel+2]
+ lgchel=celd[debugr+4+4*iel+3]
+ adiel =celd[debugr+4+4*iel+4]
+ assert nbsp > 0 , (nbsp,kgrel,iel)
+ if lvari :
+ assert ncdyn > 0 , (ncdyn,kgrel,iel)
+ assert lgchel == lgcata*nbsp*ncdyn , (lgchel,lgcata,nbsp,ncdyn,kgrel,iel)
+ else :
+ assert ncdyn == 0 , (ncdyn,kgrel,iel)
+ assert lgchel == lgcata*nbsp , (lgchel,lgcata,nbsp,kgrel,iel)
+ assert adiel > 0 , (adiel,kgrel,iel)
+
+
--- /dev/null
+#@ MODIF sd_cham_gene SD DATE 27/11/2007 AUTEUR ANDRIAM H.ANDRIAMBOLOLONA
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_nume_ddl_gene import sd_nume_ddl_gene
+
+class sd_cham_gene(AsBase):
+ nomj = SDNom(fin=19)
+ REFE = AsVK24(lonmax=2, )
+ VALE = AsObject(genr='V', xous='S', type=Parmi('C', 'R'), ltyp=Parmi(16, 8), )
+ DESC = AsVI(docu='VGEN', )
+
+
+ def exists(self):
+ # retourne "vrai" si la SD semble exister (et donc qu'elle peut etre vérifiée)
+ return self.REFE.exists
+
+ # indirection vers NUME_DDL_GENE:
+ def check_REFE(self, checker):
+ if not self.exists() : return
+ refe = self.REFE.get_stripped()
+ # ce test fait planter les verif de SD issues de DYNA_TRAN_MODAL + RECU_GENE
+ # op0037 cree un refe[1]='$TRAN_GENE' bidon
+ if refe[1] == '$TRAN_GENE': return
+ if refe[1] :
+ sd2 = sd_nume_ddl_gene(refe[1]) ; sd2.check(checker)
+
+
--- /dev/null
+#@ MODIF sd_cham_mater SD DATE 30/06/2008 AUTEUR PROIX J-M.PROIX
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_carte import sd_carte
+from SD.sd_champ import sd_champ
+from SD.sd_mater import sd_mater
+from SD.sd_compor import sd_compor
+from SD.sd_util import *
+
+
+# Remarque :
+#------------
+# la sd_cham_mater est produite par la seule commande AFFE_MATERIAU.
+# C'est pourquoi, on fera appel parfois pour la décrire au vocabulaire de cette
+# commande.
+
+
+
+class sd_cham_mater_varc(AsBase):
+#----------------------------------
+# la sd_cham_mater_varc est la partie de la sd_cham_mater correspondant aux variables de commande
+# (mot clé AFFE_VARC)
+
+ nomj = SDNom(fin=8)
+ CVRCNOM = AsVK8()
+ CVRCGD = AsVK8()
+ CVRCDEF = AsVR()
+ CVRCVARC = AsVK8()
+ CVRCCMP = AsVK8()
+
+ def exists(self):
+ return self.CVRCVARC.exists
+
+ # indirection via CVRCVARC:
+ def check_cham_mater_i_CVRCVARC(self, checker):
+ if not self.exists() : return
+ lnom=self.CVRCVARC.get()
+ for nom in lnom :
+ nom2=self.nomj()[:8]+'.'+nom+'.1'
+ sd2=sd_carte(nom2) ; sd2.check(checker)
+
+ nom2=self.nomj()[:8]+'.'+nom+'.2'
+ sd2=sd_carte(nom2) ; sd2.check(checker)
+
+ # dans le cas de la temperature, on cree parfois des cartes sous-terraines
+ # (lorsque l'on indique VALE_REF sans donner de CHAMP_GD/EVOL) :
+ if nom.strip()=='TEMP':
+ desc=sd2.DESC.get()
+ ngdmax=desc[1]
+ ngdedi=desc[2]
+ vale=sd2.VALE.get_stripped()
+ ncmp=len(vale)/ngdmax
+ assert len(vale)==ncmp*ngdmax, (ngdmax, ncmp, vale)
+ for kedit in range(ngdedi):
+ assert vale[ncmp*kedit+0]=='TEMP' , (vale, kedit,ncmp)
+ if vale[ncmp*kedit+1]=='CHAMP' :
+ sd3=sd_champ(vale[ncmp*kedit+2]) ; sd3.check(checker)
+
+
+ # vérification des objets .CVRC* :
+ def check_CVRC(self, checker):
+ if not self.exists() : return
+ cvrccmp=self.CVRCCMP.get()
+ cvrcnom =self.CVRCNOM.get_stripped()
+ cvrcgd =self.CVRCGD.get_stripped()
+ cvrcvarc=self.CVRCVARC.get_stripped()
+ cvrcdef =self.CVRCDEF.get()
+
+ # Les 6 objets ont la meme longueur > 0 :
+ nbcvrc=len(cvrcnom)
+ assert nbcvrc > 0, (self)
+ assert len(cvrccmp) == nbcvrc , (cvrccmp,cvrcnom,self)
+ assert len(cvrcgd) == nbcvrc , (cvrcgd,cvrcnom,self)
+ assert len(cvrcvarc) == nbcvrc , (cvrcvarc,cvrcnom,self)
+ assert len(cvrcdef) == nbcvrc , (cvrcdef,cvrcnom,self)
+
+ # Les 4 objets sont "non blancs" :
+ sdu_tous_non_blancs(self.CVRCCMP,checker)
+ sdu_tous_non_blancs(self.CVRCNOM,checker)
+ sdu_tous_non_blancs(self.CVRCGD,checker)
+ sdu_tous_non_blancs(self.CVRCVARC,checker)
+
+ # les noms des CRVC doivent etre differents:
+ sdu_tous_differents(self.CVRCNOM,checker)
+
+
+
+
+class sd_cham_mater(AsBase):
+#=============================
+ nomj = SDNom(fin=8)
+
+ # CHAMP_MAT est une carte contenant la liste des noms de matériaux
+ # affectées sur les mailles du maillage.
+ CHAMP_MAT = sd_carte()
+
+ # si AFFE_VARC :
+ varc = Facultatif(sd_cham_mater_varc(SDNom(nomj='')))
+
+ # si AFFE_COMPOR :
+ # COMPOR est une carte définissant les sd_compor affectés
+ # sur les mailles du maillage
+ COMPOR = Facultatif(sd_carte())
+
+
+ def check_CHAMP_MAT(self,checker) :
+ #----------------------------------
+ # on vérifie que la carte .CHAMP_MAT contient bien des noms de matériau.
+ vale=self.CHAMP_MAT.VALE.get_stripped()
+ desc=self.CHAMP_MAT.DESC.get()
+ numgd =desc[0]
+ n_gd_edit=desc[2]
+ assert sdu_nom_gd(numgd) == 'NEUT_F', (desc,sdu_nom_gd(numgd))
+ ncmp_max=len(sdu_licmp_gd(numgd))
+ assert ncmp_max==30 , ncmp_max
+
+ for kedit in range(n_gd_edit):
+ v1=vale[kedit*ncmp_max:(kedit+1)*ncmp_max]
+ ktref=None
+ for k1 in range(len(v1)) :
+ x1=v1[k1]
+ if x1 == '' : continue
+
+ # cas particulier : 'TREF=>', '25.0'
+ if x1=='TREF=>' :
+ ktref=k1
+ continue
+ if ktref :
+ assert k1 == ktref+1 , (k1, ktref)
+ # on doit retrouver la valeur de TREF :
+ try :
+ tref=float(x1)
+ except :
+ assert 0 , ' On doit trouver la valeur de TREF: '+x1
+ continue
+
+ # cas général : x1 est un nom de sd_mater
+ sd2=sd_mater(x1) ; sd2.check(checker)
+
+
+ def check_COMPOR(self,checker) :
+ #----------------------------------
+ # on vérifie (un peu) la carte .COMPOR (si elle existe)
+ desc=self.COMPOR.DESC.get()
+ if not desc : return
+ vale=self.COMPOR.VALE.get_stripped()
+ numgd =desc[0]
+ n_gd_edit=desc[2]
+ assert sdu_nom_gd(numgd) == 'COMPOR', (desc,sdu_nom_gd(numgd))
+ ncmp_max=len(sdu_licmp_gd(numgd))
+
+ for kedit in range(n_gd_edit):
+ v1=vale[kedit*ncmp_max:(kedit+1)*ncmp_max]
+ assert v1[3]=='COMP_INCR' , v1
+ sd2=sd_compor(v1[6].split('.')[0].strip()) ; sd2.check(checker)
+
+ for x1 in v1[7:] :
+ assert x1=='' , v1
+
+
+
+
+
+
+
--- /dev/null
+#@ MODIF sd_cham_no SD DATE 03/11/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+
+from SD.sd_prof_chno import sd_prof_chno
+
+
+class sd_cham_no(sd_titre):
+#------------------------------------
+ nomj = SDNom(fin=19)
+ VALE = AsVect(ltyp=Parmi(4,8,16,24), type=Parmi('C', 'I', 'K', 'R'), docu=Parmi('', '2', '3'), )
+ REFE = AsVK24()
+ DESC = AsVI(docu='CHNO', )
+
+
+ def exists(self):
+ # retourne "vrai" si la SD semble exister (et donc qu'elle peut etre vérifiée)
+ return self.REFE.exists
+
+ def check_cham_no_i_REFE(self, checker):
+ if not self.exists() : return
+ lnom = self.REFE.get()
+
+ # faut-il vérifier le sd_maillage de chaque sd_cham_no ? AJACOT_PB
+ # - cela risque de couter cher
+ # - cela pose un problème "import circulaire" avec sd_maillage -> sd_cham_no => import ici
+ from SD.sd_maillage import sd_maillage
+ sd2 = sd_maillage(lnom[0])
+ sd2.check(checker)
+
+ if lnom[1].strip() :
+ if checker.names.has_key(lnom[1][:14]+'.NUME.PRNO'): return
+ sd2 = sd_prof_chno(lnom[1]) ; sd2.check(checker)
+
+
--- /dev/null
+#@ MODIF sd_champ SD DATE 17/07/2007 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_cham_no import sd_cham_no
+from SD.sd_cham_elem import sd_cham_elem
+from SD.sd_cham_gene import sd_cham_gene
+from SD.sd_carte import sd_carte
+from SD.sd_resuelem import sd_resuelem
+
+#---------------------------------------------------------------------------------
+# classe "chapeau" à sd_cham_no, sd_cham_elem, sd_carte, ...
+#---------------------------------------------------------------------------------
+
+class sd_champ(AsBase):
+#---------------------------
+ nomj = SDNom(fin=19)
+
+
+ def check_champ_1(self, checker):
+ # est-ce un sd_cham_no, un sd_cham_elem, ... ?
+ nom=self.nomj()[:19]
+ nom1=nom+'.CELD'
+ iexi=aster.jeveux_exists(nom1)
+ if iexi :
+ nom2=nom+'.CELD'
+ else :
+ nom2=nom+'.DESC'
+ iexi2=aster.jeveux_exists(nom2)
+ if not iexi2 :
+ if not self.optional and not checker.optional :
+ checker.err( self, "n'existe pas (%r)" %self._parent )
+ return
+
+
+ docu=aster.jeveux_getattr(nom2,'DOCU')[1].strip()
+ if docu=='CHNO' :
+ sd2 = sd_cham_no(nom)
+ elif docu=='CART' :
+ sd2 = sd_carte(nom)
+ elif docu=='CHML' :
+ sd2 = sd_cham_elem(nom)
+ elif docu=='RESL' :
+ sd2 = sd_resuelem(nom)
+ elif docu=='VGEN' :
+ sd2 = sd_cham_gene(nom)
+ else :
+ assert 0,docu
+ sd2.check(checker)
--- /dev/null
+#@ MODIF sd_char_acou SD DATE 16/09/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_ligrel import sd_ligrel
+from SD.sd_carte import sd_carte
+from SD.sd_char_cine import sd_char_cine
+
+
+class sd_char_acou(AsBase):
+ nomj = SDNom(fin=8)
+ chac_vitfa = Facultatif(sd_carte(SDNom(nomj='.CHAC.VITFA', fin=19)))
+ CHAC_MODEL_NOMO = AsVK8(SDNom(nomj='.CHAC.MODEL.NOMO'), lonmax=1, )
+ chac_cmult = Facultatif(sd_carte(SDNom(nomj='.CHAC.CMULT', fin=19)))
+ chac_cimpo = Facultatif(sd_carte(SDNom(nomj='.CHAC.CIMPO', fin=19)))
+ chac_imped = Facultatif(sd_carte(SDNom(nomj='.CHAC.IMPED', fin=19)))
+ chac_ligre = Facultatif(sd_ligrel(SDNom(nomj='.CHAC.LIGRE', fin=19)))
+ ELIM = Facultatif(sd_char_cine())
+ TYPE = AsVK8(lonmax=1, )
+
+
--- /dev/null
+#@ MODIF sd_char_cine SD DATE 04/05/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_modele import sd_modele
+from SD.sd_fonction import sd_fonction
+
+
+class sd_char_cine(AsBase):
+#===========================
+ nomj = SDNom(fin=19)
+
+ AFCK = AsVK8(lonmax=3)
+ AFCI = AsVI()
+ AFCV = Facultatif(OJBVect(type=Parmi('C','R','K')))
+
+
+
+ def exists(self):
+ # retourne "vrai" si la SD semble exister (et donc qu'elle peut etre vérifiée)
+ return self.AFCK.exists
+
+
+ def u_veri1(self): # retourne (CIME/CITH/CIAC, RE/CX/FT)
+ #---------------------------------------------------------------
+ if not self.exists() : return
+ afck=self.AFCK.get()
+ l1=afck[0].strip().split('_') ; assert len(l1)==2 , afck
+ phen, tsca= l1[0], l1[1]
+ assert phen in ('CIME', 'CITH', 'CIAC'), afck
+ assert tsca in ('RE', 'CX', 'FT'), tsca
+ return phen, tsca
+
+
+ def check_AFCK(self,checker):
+ #---------------------------------------------
+ if not self.exists() : return
+ phen, tsca = self.u_veri1()
+ afck=self.AFCK.get()
+ nomo=afck[1].strip()
+ sd2=sd_modele(nomo); sd2.check(checker)
+ if afck[2].strip() != '' : assert (phen=='CIME' or phen=='CITH') and tsca=='FT', afck
+
+
+ def check_AFCI(self,checker):
+ #---------------------------------------------
+ if not self.exists() : return
+ phen, tsca = self.u_veri1()
+ afci=self.AFCI.get()
+ nbloc=afci[0]
+ assert len(afci)>=3*nbloc+1 , afci
+ for k in range(nbloc) :
+ nuno =afci[3*k +1]
+ nucmp=afci[3*k +2]
+ assert afci[3*k +3] == 0 , (k,afci)
+ assert nuno > 0 , (k,afci)
+ assert nucmp> 0 , (k,afci)
+
+
+ def check_AFCV(self,checker):
+ #-------------------------------------------------
+ if not self.exists() : return
+ phen, tsca = self.u_veri1()
+ afci=self.AFCI.get()
+ nbloc=afci[0]
+ if not self.AFCV.exists :
+ assert tsca=='FT',tsca
+ afck=self.AFCK.get()
+ assert afck[2].strip() != '' , afck
+ else :
+ tsca2 = self.AFCV.type.strip()
+ assert self.AFCV.lonmax >= nbloc , (nbloc,self.AFCV.lonmax)
+
+ if tsca == 'RE' :
+ assert tsca2=='R', tsca2 # champ de réels
+ if tsca == 'FT' :
+ assert tsca2=='K', tsca2 # champ de fonctions
+ if tsca == 'CX' :
+ assert tsca2=='C', tsca2 # champ de complexes
+
+ # vérification des fonctions :
+ if tsca == 'FT' :
+ afcv = self.AFCV.get()
+ for fonc in afcv[:nbloc] :
+ sd2=sd_fonction(fonc); sd2.check(checker)
+
--- /dev/null
+#@ MODIF sd_char_contact SD DATE 12/05/2009 AUTEUR MAZET S.MAZET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_champ import sd_champ
+from SD.sd_xfem import sd_modele_xfem, sd_contact_xfem
+
+class sd_char_contact(AsBase):
+ nomj =SDNom(fin=16)
+
+ FORMCO = Facultatif(AsVI())
+
+ def exists(self):
+ # retourne True si la SD semble exister.
+ return self.FORMCO.exists
+
+
+ def formulation_xfem(self):
+ if not self.exists() : return False
+ iform = self.FORMCO.get()[0]
+ return iform == 3
+
+ def contact_xfem_actif(self):
+ if not self.formulation_xfem() : return False
+ return self.XNBASC.exists
+
+ BAMACO = Facultatif(AsVI())
+ BANOCO = Facultatif(AsVI())
+ CARACF = Facultatif(AsVR())
+ COMAFO = Facultatif(AsVR())
+ JEUSUR = Facultatif(AsVR())
+ CONVCO = Facultatif(AsVI())
+ DIRNOR = Facultatif(AsVR())
+ DIRAPP = Facultatif(AsVR())
+ ECPDON = Facultatif(AsVI())
+ CARFRO = Facultatif(AsVR())
+ FROTE = Facultatif(AsVR())
+ JEUCON = Facultatif(AsVR())
+ JEUCOQ = Facultatif(AsVR())
+ JEUPOU = Facultatif(AsVR())
+ JFO1CO = Facultatif(AsVK8())
+ JFO2CO = Facultatif(AsVK8())
+ JFO3CO = Facultatif(AsVK8())
+ JSUPCO = Facultatif(AsVR())
+ MAESCL = Facultatif(AsVI())
+ MAILCO = Facultatif(AsVI())
+ MAMACO = Facultatif(AsVI())
+ MANOCO = Facultatif(AsVI())
+ METHCO = Facultatif(AsVI())
+ NDIMCO = Facultatif(AsVI())
+ NOESCL = Facultatif(AsVR())
+ NOEUCO = Facultatif(AsVI())
+ NOEUQU = Facultatif(AsVI())
+ NOMACO = Facultatif(AsVI())
+ NORLIS = Facultatif(AsVI())
+ NOZOCO = Facultatif(AsVI())
+ PBAMACO = Facultatif(AsVI())
+ PBANOCO = Facultatif(AsVI())
+ PENAL = Facultatif(AsVR())
+ PMAMACO = Facultatif(AsVI())
+ PMANOCO = Facultatif(AsVI())
+ PNOEUQU = Facultatif(AsVI())
+ PNOMACO = Facultatif(AsVI())
+ PRANOCO = Facultatif(AsVI())
+ PSSNOCO = Facultatif(AsVI())
+ PSANOFR = Facultatif(AsVI())
+ PSUMACO = Facultatif(AsVI())
+ PSUNOCO = Facultatif(AsVI())
+ PZONECO = Facultatif(AsVI())
+ RANOCO = Facultatif(AsVI())
+ SANSNQ = Facultatif(AsVI())
+ SSNOCO = Facultatif(AsVI())
+ SANOFR = Facultatif(AsVI())
+ SYMECO = Facultatif(AsVI())
+ TABFIN = Facultatif(AsVR())
+ TANDEF = Facultatif(AsVR())
+ TANPOU = Facultatif(AsVR())
+ TOLECO = Facultatif(AsVR())
+ xfem = Facultatif(AsVI())
+ XFIMAI = Facultatif(AsVK8())
+ XNBASC = Facultatif(AsVK24())
+ XNRELL = Facultatif(AsVK24())
+ TANINI = Facultatif(AsVR())
+ NORMCO = Facultatif(AsVR())
+ TANGCO = Facultatif(AsVR())
+ EXCLFR = Facultatif(AsVR())
+ MODELX = Facultatif(AsVK8(lonmax=1,))
+ CNCTE = Facultatif(AsVI())
+
+ # si contact xfem :
+ xfem = Facultatif(sd_contact_xfem(SDNom(nomj='')))
+
+
+ # indirection vers les champs de .XNBASC :
+ # Question à Mickael :
+ # la fonction suivante ne serait-elle pas mieux placée dans la classe sd_contact_xfem ?
+ def check_char_contact_xfem_XNBASC(self, checker):
+ if not self.contact_xfem_actif() : return
+ lnom = self.XNBASC.get()
+ nbnom = self.XNBASC.lonuti
+ for k in range(nbnom) :
+ nom = lnom[k]
+ if not nom.strip(): continue
+ sd2 = sd_champ(nom)
+ sd2.check(checker)
+
+
+ # indirection vers les champs de .XNRELL :
+ # On ne vérifie rien pour l'instant
+ # Question à Mickael :
+ # la fonction suivante ne serait-elle pas mieux placée dans la classe sd_contact_xfem ?
+ def check_char_contact_xfem_XNRELL(self, checker):
+ if not self.contact_xfem_actif() : return
+ lnom = self.XNRELL.get()
+ nbnom = self.XNRELL.lonuti
+ for k in range(nbnom) :
+ nom = lnom[k]
+ oo = AsObject(SDNom(nomj=nom,debut=0),genr='V', xous='S', type=Parmi('I','R'))
+ oo.check(checker)
+
+
+ # Verification MODELE xfem
+ def check_char_contact_xfem_MODELX(self, checker):
+ if not self.contact_xfem_actif() : return
+ nom = self.MODELX.get()[0]
+ sd2 = sd_modele_xfem(nom)
+ sd2.check(checker)
+
+
--- /dev/null
+#@ MODIF sd_char_meca SD DATE 16/09/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_ligrel import sd_ligrel
+from SD.sd_carte import sd_carte
+from SD.sd_char_unilate import sd_char_unilate
+from SD.sd_char_contact import sd_char_contact
+from SD.sd_char_cine import sd_char_cine
+
+
+class sd_char_gf_xx(AsBase):
+ nomj = SDNom(fin=19)
+ VALE = AsVR()
+ NCMP = AsVK8()
+
+
+class sd_char_grflu(AsBase):
+ nomj = SDNom(fin=19)
+
+ ABSC = AsVR()
+ APPL = AsVI()
+ GEOM = AsVR()
+ LIMA = AsVI()
+ LINO = AsVI()
+ NOMA = AsVK8()
+ VDIR = AsVR()
+
+
+class sd_char_chme(AsBase):
+ nomj = SDNom(fin=13)
+
+ MODEL_NOMO = AsVK8(SDNom(nomj='.MODEL.NOMO'), lonmax=1, )
+
+ LIGRE = Facultatif(sd_ligrel())
+
+ CIMPO = Facultatif(sd_carte())
+ CMULT = Facultatif(sd_carte())
+ EPSIN = Facultatif(sd_carte())
+ F1D1D = Facultatif(sd_carte())
+ F1D2D = Facultatif(sd_carte())
+ F1D3D = Facultatif(sd_carte())
+ F2D2D = Facultatif(sd_carte())
+ F2D3D = Facultatif(sd_carte())
+ F3D3D = Facultatif(sd_carte())
+ FCO2D = Facultatif(sd_carte())
+ FCO3D = Facultatif(sd_carte())
+ FELEC = Facultatif(sd_carte())
+ FL101 = Facultatif(sd_carte())
+ FL102 = Facultatif(sd_carte())
+ FLUX = Facultatif(sd_carte())
+ FORNO = Facultatif(sd_carte())
+ IMPE = Facultatif(sd_carte())
+ ONDE = Facultatif(sd_carte())
+ PESAN = Facultatif(sd_carte())
+ PRESS = Facultatif(sd_carte())
+ ROTAT = Facultatif(sd_carte())
+ SIGIN = Facultatif(sd_carte())
+ VNOR = Facultatif(sd_carte())
+
+ # si GRAPPE_FLUIDE :
+ GRFLU = Facultatif(sd_char_grflu())
+ GF_AS = Facultatif(sd_char_gf_xx())
+ GF_DH = Facultatif(sd_char_gf_xx())
+ GF_GR = Facultatif(sd_char_gf_xx())
+ GF_MA = Facultatif(sd_char_gf_xx())
+ GF_MC = Facultatif(sd_char_gf_xx())
+ GF_PC = Facultatif(sd_char_gf_xx())
+ GF_TG = Facultatif(sd_char_gf_xx())
+
+ VEASS = Facultatif(AsVK8(lonmax=1, ))
+ EVOL_CHAR = Facultatif(AsVK8(SDNom(nomj='.EVOL.CHAR'), lonmax=1, ))
+ TEMPE_TEMP = Facultatif(AsVK8(SDNom(nomj='.TEMPE.TEMP'), lonmax=1, ))
+
+
+class sd_char_meca(AsBase):
+ nomj = SDNom(fin=8)
+
+ TYPE = AsVK8(lonmax=1)
+
+ CHME = Facultatif(sd_char_chme())
+ ELIM = Facultatif(sd_char_cine())
+
+ UNILATE = Facultatif(sd_char_unilate())
+ CONTACT = Facultatif(sd_char_contact())
+
+ TRANS01 = Facultatif(AsVR(lonmax=6, ))
+ TRANS02 = Facultatif(AsVR(lonmax=6, ))
+ LISMA01 = Facultatif(AsVI(lonmax=12, ))
+ LISMA02 = Facultatif(AsVI(lonmax=12, ))
+ POIDS_MAILLE = Facultatif(AsVR())
+
+
+
--- /dev/null
+#@ MODIF sd_char_ther SD DATE 16/09/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_ligrel import sd_ligrel
+from SD.sd_cham_elem import sd_cham_elem
+from SD.sd_carte import sd_carte
+from SD.sd_champ import sd_champ
+from SD.sd_fonction import sd_fonction
+from SD.sd_char_cine import sd_char_cine
+
+
+class sd_char_chth(AsBase):
+#--------------------------------
+ nomj = SDNom(fin=13)
+
+ CONVE_VALE = Facultatif(AsVK8(SDNom(nomj='.CONVE.VALE'), lonmax=1))
+ MODEL_NOMO = AsVK8(SDNom(nomj='.MODEL.NOMO'), lonmax=1)
+ LIGRE = Facultatif(sd_ligrel())
+
+ SOURE = Facultatif(sd_champ(SDNom(nomj='.SOURE'))) # pour l'instant : sd_carte ou sd_cham_elem
+
+ CIMPO = Facultatif(sd_carte())
+ CMULT = Facultatif(sd_carte())
+ COEFH = Facultatif(sd_carte())
+ FLUNL = Facultatif(sd_carte())
+ FLUR2 = Facultatif(sd_carte())
+ FLURE = Facultatif(sd_carte())
+ GRAIN = Facultatif(sd_carte())
+ HECHP = Facultatif(sd_carte())
+ RAYO = Facultatif(sd_carte())
+ T_EXT = Facultatif(sd_carte())
+
+
+ # parfois, TEMP_IMPO crée une carte de sd_fonction :
+ # il faut alors vérifier ces sd_fonction
+ def check_CIMPO_FONC(self, checker):
+ if self.CIMPO.VALE.ltyp != 24 : return
+ vale=self.CIMPO.VALE.get()
+ for x in vale :
+ if x.strip()=='' : continue
+ nomfon=x[:19]
+ sd2=sd_fonction(nomfon) ; sd2.check(checker)
+
+
+
+class sd_char_ther(AsBase):
+#--------------------------------
+ nomj = SDNom(fin=8)
+ TYPE = AsVK8(lonmax=1)
+ CHTH = sd_char_chth()
+ ELIM = Facultatif(sd_char_cine())
+
+
--- /dev/null
+#@ MODIF sd_char_unilate SD DATE 22/10/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_char_unilate(AsBase):
+ nomj = SDNom(fin=16)
+ DIMECU = AsVI()
+ LISNOE = AsVI()
+ POINOE = AsVI()
+ METHCU = AsVI(lonmax=1,)
+ PARACU = AsVR(lonmax=1,)
+ CMPGCU = AsVK8()
+ COEFD = AsVect(ltyp=8, type=Parmi('K','R'))
+ COEFG = AsVect(ltyp=8, type=Parmi('K','R'))
+
+
--- /dev/null
+#@ MODIF sd_compor SD DATE 30/06/2008 AUTEUR PROIX J-M.PROIX
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_mater import sd_mater
+
+# Remarque :
+#------------
+# la sd_compor est produite par la seule commande DEFI_COMPOR.
+# C'est pourquoi, on fera appel parfois pour la décrire au vocabulaire de cette
+# commande.
+
+class sd_compor(AsBase):
+ nomj = SDNom(fin=8)
+ CPRK = AsVK16()
+ CPRI = AsVI()
+ CPRR = Facultatif(AsVR())
+
+
+ def check_tout(self,checker) :
+ #-------------------------------
+ cpri=self.CPRI.get()
+ type=cpri[0]
+ assert type in (1,2,3) , CPRI
+ if type == 1 :
+ self.monocristal(cpri,checker)
+ if type == 2 :
+ self.polycristal(cpri,checker)
+ if type == 3 :
+ self.multifibres(cpri,checker)
+
+
+
+ def monocristal(self,cpri,checker) :
+ #------------------------------------
+ nboccm=cpri[4]
+ nvi =cpri[2]
+ nbsys=(nvi-9)/3
+ assert nvi==9+3*nbsys , (nvi, nbsys, cpri)
+ cprk=self.CPRK.get_stripped()
+
+ # vérif existence et longueur
+ assert len(cpri)==7, cpri
+ assert len(cprk)==5*nboccm+1, (cpri,cprk)
+ assert not self.CPRR.get()
+
+ # vérif CPRI :
+ #-------------
+ assert cpri[1] == 1 ,cpri
+ assert cpri[2] == nvi ,cpri
+ assert cpri[3] == 1 ,cpri
+ assert cpri[4] > 0 ,cpri
+ assert cpri[5] == 1 ,cpri
+ assert cpri[6] == nvi ,cpri
+
+ # vérif CPRK :
+ #-------------
+ elas=cprk[5*nboccm]
+ assert elas in ('ELAS', 'ELAS_ORTH') ,cprk
+ for k in range(nboccm):
+ famil =cprk[5*k+0]
+ mater =cprk[5*k+1]
+ ecoul =cprk[5*k+2]
+ ecro_isot =cprk[5*k+3]
+ ecro_cine =cprk[5*k+4]
+ sd2=sd_mater(mater) ; sd2.check(checker)
+ assert famil in ('BASAL','BCC24','PRISMATIQUE','OCTAEDRIQUE','PYRAMIDAL1',
+ 'PYRAMIDAL2','CUBIQUE1','CUBIQUE2','MACLAGE','JOINT_GRAIN',
+ 'RL','UNIAXIAL')
+ assert ecoul in ('ECOU_VISC1','ECOU_VISC2','ECOU_VISC3')
+ assert ecro_isot in ('ECRO_ISOT1','ECRO_ISOT2')
+ assert ecro_cine in ('ECRO_CINE1','ECRO_CINE2')
+
+
+
+ def polycristal(self,cpri,checker) :
+ #------------------------------------
+ nbphases=cpri[1]
+ assert nbphases > 0 , cpri
+ lgcprk =cpri[6+3*nbphases-2]
+ assert lgcprk > 0 , cpri
+ cprk=self.CPRK.get_stripped()
+ cprr=self.CPRR.get()
+
+ # vérif existence et longueur
+ #------------------------------
+ assert len(cpri)==6+3*nbphases, (cpri,nbphases)
+ assert len(cprr)==2+4*nbphases, (cpri,cprr,nbphases)
+ assert len(cprk)==lgcprk, (cpri,cprk)
+
+ # vérif CPRI :
+ #-------------
+ nvitot=cpri[2]
+ assert nvitot >= 0 ,cpri
+ nbmono=cpri[3]
+ assert nbmono > 0 ,cpri
+ nbpara =cpri[6+3*nbphases-1]
+ assert nbpara in (0,1,2) ,cpri
+ for k in range(nbphases):
+ nbfam1 = cpri[4+3*k+0]
+ numono = cpri[4+3*k+1]
+ nvi1 = cpri[4+3*k+2]
+ assert nbfam1 > 0 ,cpri
+ assert numono > 0 and numono <= nbmono ,(cpri,nbmono)
+ assert nvi1 >=0 ,cpri
+
+ # vérif CPRR :
+ #-------------
+ frac_tot=0.
+ for k in range(nbphases):
+ frac =cprr[4*k+0]
+ assert frac >= 0. and frac <= 1. ,(cprr,k)
+ frac_tot=frac_tot+frac
+ for dir in range(1,4):
+ angl =cprr[4*k+dir]
+ assert angl >=0. and angl <=360. , (angl,dir)
+ assert frac_tot > 0.99 and frac_tot < 1.01
+
+ # vérif CPRK :
+ #-------------
+ locali =cprk[0]
+ assert locali in ('BZ','BETA') ,(locali,cprk)
+ decal=0
+ for k in range(nbmono):
+ mono1 =cprk[0+decal+1]
+ sd2=sd_compor(mono1) ; sd2.check(checker)
+ nbfam1=int(cprk[0+decal+2])
+ assert nbfam1 > 0 , (nbfam1,k,decal,cprk)
+ decal=decal+2+5*nbfam1+1
+ # on pourrait encore vérifier que le .CPRK de mono1 a bien été recopié
+ # mais il faut bien s'arreter ...
+
+
+
+ def multifibres(self,cpri,checker) :
+ #------------------------------------
+ nbgmax=cpri[2]
+ cprk=self.CPRK.get_stripped()
+
+ # vérif existence et longueur
+ assert len(cpri)==3, cpri
+ assert len(cprk)==6*nbgmax+1, (cpri,cprk)
+ assert not self.CPRR.get()
+
+ # vérif CPRI :
+ #-------------
+ assert cpri[1] > 0, cpri
+ assert cpri[2] > 0, cpri
+
+ # vérif CPRK :
+ #-------------
+ mater=cprk[6*nbgmax]
+ assert mater != '', cprk
+ sd2=sd_mater(mater) ; sd2.check(checker)
+ for k in range(nbgmax):
+ grfib1 =cprk[6*k+0]
+ mater1 =cprk[6*k+1]
+ loifib1 =cprk[6*k+2]
+ algo1d =cprk[6*k+3]
+ deform =cprk[6*k+4]
+ nbfib= int(cprk[6*k+5])
+ assert grfib1 != '' , cprk
+ assert mater1 != '' , cprk
+ sd2=sd_mater(mater1) ; sd2.check(checker)
+ assert loifib1 != '' , cprk
+ assert algo1d in ('ANALYTIQUE','DEBORST') , cprk
+ assert deform in ('PETIT','PETIT_REAC','REAC_GEOM') , cprk
+ assert nbfib > 0 , cprk
+
+
--- /dev/null
+#@ MODIF sd_courbe SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_courbe_sa import sd_courbe_sa
+from SD.sd_courbe_lm import sd_courbe_lm
+
+
+class sd_courbe(AsBase):
+#----------------------------
+ nomj = SDNom(fin=8)
+ NOMMAIL = AsVK8(lonmax=1, )
+ TYPCOURBE = AsVK8(lonmax=1, )
+ lm= Facultatif(sd_courbe_lm(SDNom(nomj='')))
+ sa= Facultatif(sd_courbe_sa(SDNom(nomj='')))
+
+
--- /dev/null
+#@ MODIF sd_courbe_lm SD DATE 30/06/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_courbe_lm(AsBase):
+ nomj = SDNom(fin=8)
+ MAIL1 = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ MAIL2 = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ CHEMIN = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ def check_DIM(self,checker):
+# verification que les 3 collections ont le meme nbre d'objets
+ n1 = self.MAIL1.nmaxoc
+ n2 = self.MAIL2.nmaxoc
+ assert n1 == n2
+ bool = self.CHEMIN.exists
+ if self.CHEMIN.exists:
+ n = self.CHEMIN.nmaxoc
+ assert n == n1
+ chemin = self.CHEMIN.get()
+ mail1 = self.MAIL1.get()
+ mail2 = self.MAIL2.get()
+ for i in chemin.keys():
+ lon = len(chemin[i])
+ lon1 = len(mail1[i])
+ lon2 = len(mail2[i])
+# verification que les objets des 3 collections ont la meme longueur
+ assert lon == lon1
+ assert lon == lon2
+ deb = chemin[i][0]
+ fin = chemin[i][lon-1]
+# verification que le chemin est soit simple (fin = 0) soit cyclique (deb = fin)
+ assert (deb == fin) or (fin == 0)
+# verification que le dernier entier des objets des collections mail1 et mail2 est nul
+ fin = mail1[i][lon1-1]
+ assert fin == 0
+ fin = mail2[i][lon2-1]
+ assert fin == 0
+
--- /dev/null
+#@ MODIF sd_courbe_sa SD DATE 30/06/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_courbe_sa(AsBase):
+ nomj = SDNom(fin=8)
+ MAIL1 = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ MAIL2 = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ XYBSGT = AsVR(SDNom(debut=8), )
+ XYASGT = AsVR(SDNom(debut=8), )
+ XSARC = AsVR(SDNom(debut=8), )
+ XYCARC = AsVR(SDNom(debut=8), )
+ XRARC = AsVR(SDNom(debut=8), )
+ ORSGT = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='R', ltyp=8, )
+ EXSGT = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='R', ltyp=8, )
+ PAROR = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='R', ltyp=8, )
+ PAREX = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='R', ltyp=8, )
+ FACOR = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ FACEX = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ CNXOR = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ CNXEX = AsColl(SDNom(debut=8), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ def check_1(self,checker):
+ if self.XYASGT.exists:
+ valea=self.XYASGT.get()
+ valeb=self.XYBSGT.get()
+ assert len(valea) == len(valeb)
+ assert valea[0] == 0.
+ assert valea[1] == 0.
+ assert valeb[0] == 0.
+ assert valeb[1] == 0.
+ valec=self.XYCARC.get()
+ valeth=self.XSARC.get()
+ valer=self.XRARC.get()
+ assert len(valec) == len(valeth)
+ assert valec[0] == 0.
+ assert valec[1] == 0.
+ assert valeth[0] == 0.
+ assert valeth[1] == 0.
+ assert valer[0] == 0.
+
--- /dev/null
+#@ MODIF sd_feti SD DATE 23/10/2007 AUTEUR BOITEAU O.BOITEAU
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+# AJACOT_PB en attendant la correction de la fiche 10475 :
+# on dédouble la SD pour la rendre facultative.
+
+
+class sd_feti1(AsBase):
+ nomj = SDNom(fin=19)
+ FLIM = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ FDIM = AsVI(lonmax=5, )
+ FREF = AsVK8()
+ FETG = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ FLIN = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='K', ltyp=24, )
+ FLII = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ FETB = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ FETA = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ FETJ = AsVI()
+ FETI = AsVI()
+ FETH = AsVI()
+ FCFI = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ FCFL = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='K', ltyp=24, )
+ FCFM = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ FCFN = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+
+
+class sd_feti(AsBase):
+ nomj = SDNom(fin=19)
+ sd1 = Facultatif(sd_feti1(SDNom('')))
+
--- /dev/null
+#@ MODIF sd_fonction SD DATE 19/02/2008 AUTEUR MACOCCO K.MACOCCO
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+from SD.sd_util import *
+
+
+#----------------------------------------------------------------
+# définition de 3 classes :
+# sd_formule (objets python + jeveux)
+# sd_fonction_aster (objets jeveux)
+# sd_fonction (chapeau des 2 classes précédentes)
+#----------------------------------------------------------------
+
+
+
+class sd_formule(AsBase):
+#--------------------------------------
+ nomj = SDNom(fin=19)
+ PROL = AsVK24(lonmax=6, )
+ NOVA = AsVK8()
+
+
+class sd_fonction_aster(sd_titre):
+#--------------------------------------
+ nomj = SDNom(fin=19)
+ PROL = AsVK24()
+ VALE = AsObject(acces='NU', sd_stockage='CONTIG', modelong='VARIABLE', type='R', xous=Parmi('S', 'X'), genr='V', ltyp=8, )
+ PARA = Facultatif(AsVR())
+
+ # existence possible de la SD :
+ def exists(self):
+ return self.PROL.exists
+
+
+ def check_PROL(self,checker) :
+ #-------------------------------
+ if not self.exists() : return
+
+ prol=self.PROL.get()
+ assert prol , self
+ typfon= prol[0].strip()
+ assert typfon in ('CONSTANT', 'FONCTION', 'FONCT_C', 'NAPPE', 'INTERPRE') ,prol
+ #ltabul = True : la fonction est tabulée (et non interpretée)
+ ltabul = typfon != 'INTERPRE'
+
+ if typfon == 'NAPPE' :
+ assert len(prol) > 7 , (prol,self)
+ else :
+ # tester que le prol[5] est bien le nom de la fonction
+ assert len(prol) == 6 , (prol,self)
+
+ if ltabul : # type d'interpolation
+ interp= prol[1].strip()
+ assert interp[:3] in ('NON', 'LIN', 'LOG') , prol
+ assert interp[4:] in ('NON', 'LIN', 'LOG') , prol
+
+ if ltabul : # nom d'un paramètre
+ para=prol[2].strip()
+ assert para != '', prol
+
+ assert prol[3].strip() != '' , prol # type du résultat
+
+ if ltabul : # prolongement à droite et à gauche
+ prolgd=prol[4].strip()
+ assert len(prolgd)==2, prol
+ assert prolgd[0] in ('E', 'C', 'L', 'I'), prol
+ assert prolgd[1] in ('E', 'C', 'L', 'I'), prol
+
+ if typfon == 'NAPPE' :
+ nf= (len(prol) - 7)/2
+ assert len(prol)==7+2*nf, prol
+ # 1er paramètre de la nappe
+ assert prol[6].strip() != '' , prol
+
+ for kf in range(nf):
+ interp= prol[6+2*kf+1].strip()
+ prolgd= prol[6+2*kf+2].strip()
+ assert interp[:3] in ('NON', 'LIN', 'LOG') , prol
+ assert interp[4:] in ('NON', 'LIN', 'LOG') , prol
+ assert prolgd[0] in ('E', 'C', 'L', 'I'), prol
+ assert prolgd[1] in ('E', 'C', 'L', 'I'), prol
+
+
+ def check_VALE(self,checker) :
+ #-------------------------------
+ if not self.exists() : return
+
+ prol=self.PROL.get()
+ vale=self.VALE.get()
+ typfon= prol[0].strip()
+
+ if typfon=='CONSTANT' :
+ assert len(vale)==2, (vale,self)
+
+ elif typfon=='FONCTION' :
+ nbpt=len(vale)/2
+ assert len(vale)==2*nbpt, (vale,self)
+ if nbpt > 1 :
+ assert sdu_monotone(vale[:nbpt]) in (1,),(nbpt,vale,self)
+
+ elif typfon=='FONCT_C' :
+ nbpt=len(vale)/3
+ assert len(vale)==3*nbpt, (vale,self)
+ if nbpt > 1 :
+ # print "AJACOT fonction=",self
+ assert sdu_monotone(vale[:nbpt]) in (1,),(nbpt,vale,self)
+
+ elif typfon=='NAPPE' :
+ nbfonc=len(vale.keys())
+ for k in range(nbfonc):
+ val1=vale[k+1]
+ nbpt=len(val1)/2
+ assert len(val1)==2*nbpt, (val1,self)
+ if nbpt > 1 :
+ assert sdu_monotone(val1[:nbpt]) in (1,),(nbpt,val1,self)
+
+
+ def check_NAPPE(self,checker) :
+ #-------------------------------
+ if not self.exists() : return
+
+ prol=self.PROL.get()
+ typfon= prol[0].strip()
+ if typfon != 'NAPPE' : return
+
+ para=self.PARA.get()
+ if len(para) > 1 :
+ assert sdu_monotone(para) in (1,),(para,self)
+ vale=self.VALE.get()
+ assert len(para)==len(vale.keys()),self
+
+
+class sd_fonction(sd_titre):
+#---------------------------
+ nomj = SDNom(fin=19)
+ PROL = AsVK24()
+ NOVA = Facultatif(AsVK8())
+ VALE = Facultatif(AsObject())
+ PARA = Facultatif(AsVR())
+
+ def check_1(self,checker) :
+ nom=self.nomj()[:19]
+ if self.NOVA.exists :
+ sd2=sd_formule(nom) ; sd2.check()
+ else :
+ sd2=sd_fonction_aster(nom) ; sd2.check()
+
--- /dev/null
+#@ MODIF sd_fond_fiss SD DATE 08/01/2008 AUTEUR MACOCCO K.MACOCCO
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_fond_fiss(AsBase):
+ nomj = SDNom(fin=8)
+ LEVREINF___MAIL = Facultatif(AsVK8(SDNom(nomj='.LEVREINF .MAIL'), ))
+ NORMALE = Facultatif(AsVR(lonmax=3, ))
+ FOND_______TYPE = AsVK8(SDNom(nomj='.FOND .TYPE'), lonmax=1, )
+ FOND_______NOEU = AsVK8(SDNom(nomj='.FOND .NOEU'), )
+ FONDSUP____NOEU = Facultatif(AsVK8(SDNom(nomj='.FOND_SUP .NOEU'), ))
+ FONDINF____NOEU = Facultatif(AsVK8(SDNom(nomj='.FOND_INF .NOEU'), ))
+ DTAN_EXTREMITE = Facultatif(AsVR(lonmax=3, ))
+ INFNORM____NOEU = Facultatif(AsVK8(SDNom(nomj='.INFNORM .NOEU'), ))
+ DTAN_ORIGINE = Facultatif(AsVR(lonmax=3, ))
+ SUPNORM____NOEU = Facultatif(AsVK8(SDNom(nomj='.SUPNORM .NOEU'), ))
+ LEVRESUP___MAIL = Facultatif(AsVK8(SDNom(nomj='.LEVRESUP .MAIL'), ))
+
+
--- /dev/null
+#@ MODIF sd_gfibre SD DATE 10/07/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+
+
+class sd_gfibre(sd_titre):
+#-------------------------------------
+ nomj = SDNom(fin=8)
+ POINTEUR = AsVI()
+ CARFI = AsVR()
+ NOMS_GROUPES = AsPn(ltyp=8)
+ NB_FIBRE_GROUPE = AsVI()
+
+
+ def check_dimension(self,checker) :
+ nbgf=self.NOMS_GROUPES.nommax
+ assert self.NB_FIBRE_GROUPE.lonmax == nbgf
+ assert self.POINTEUR.lonmax == nbgf
+
+
+ def check_CARFI(self,checker) :
+ nbgf=self.NOMS_GROUPES.nommax
+ pointeur=self.POINTEUR.get()
+ nb_fibre=self.NB_FIBRE_GROUPE.get()
+ nbfib_tot=0
+ for igf in range(nbgf) :
+ assert pointeur[igf]==3*nbfib_tot +1 , (igf, nbfib_tot, pointeur[igf])
+ nbfib=nb_fibre[igf]
+ nbfib_tot=nbfib_tot+nbfib
+ assert self.CARFI.lonmax == 3*nbfib_tot , (nbfib_tot,self.CARFI.lonmax)
+
--- /dev/null
+#@ MODIF sd_interf_dyna_clas SD DATE 19/06/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_maillage import sd_maillage
+from SD.sd_nume_ddl import sd_nume_ddl
+from SD.sd_util import *
+
+
+class sd_interf_dyna_clas(AsBase):
+#---------------------------------------
+ nomj = SDNom(fin=8)
+ IDC_NOMS = AsObject(genr='N', xous='S', type='K', ltyp=8, )
+ IDC_DDAC = AsColl(acces='NU', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ IDC_DY_FREQ = AsVR(lonmax=1, )
+ IDC_LINO = AsColl(acces='NU', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ IDC_TYPE = AsVK8()
+ IDC_DESC = AsVI(lonmax=5, )
+ IDC_DEFO = AsVI()
+ IDC_REFE = AsVK24(lonmax=3, )
+
+
+ def check_coherence_longueurs(self,checker):
+ noms=self.IDC_NOMS.get()
+ type=self.IDC_TYPE.get()
+ lino=self.IDC_LINO.get()
+ ddac=self.IDC_DDAC.get()
+ nb_intf=len(noms)
+ assert nb_intf > 0 , noms
+ assert len(type) == nb_intf, (nb_intf,type)
+ assert len(lino.keys()) == nb_intf, (nb_intf,lino)
+ assert len(ddac.keys()) == nb_intf, (nb_intf,ddac)
+
+
+ def check_REFE(self,checker):
+ refe=self.IDC_REFE.get()
+ sd2=sd_maillage(refe[0]) ; sd2.check(checker)
+ sd2=sd_nume_ddl(refe[1]) ; sd2.check(checker)
+ assert refe[2].strip() == '' , refe
+
+
+ def check_DESC(self,checker):
+ desc=self.IDC_DESC.get()
+ assert desc[0] == 1 , desc
+ assert desc[1] >2 and desc[1] <10 , desc
+ assert desc[2] >60 and desc[2] <300 , desc
+ assert desc[3] >0 and desc[3] <500 , desc
+ assert desc[4] >0 , desc
+ nomgd=sdu_nom_gd(desc[3]).strip()
+ assert nomgd == 'DEPL_R', (nomgd, desc)
+
+
+ def check_NOMS(self,checker):
+ # il n'y a rien à vérifier : un pointeur de noms contient
+ # toujours des noms "non blancs" et "tous différents"
+ pass
+
+
+ def check_TYPE(self,checker):
+ type=self.IDC_TYPE.get()
+ for t1 in type :
+ assert t1.strip() in ('CRAIGB', 'MNEAL', 'CB_HARMO', 'AUCUN'), type
+
+
+ def check_LINO_DDAC(self,checker):
+ lino=self.IDC_LINO.get()
+ ddac=self.IDC_DDAC.get()
+ desc=self.IDC_DESC.get()
+ nbec=desc[1]
+ nb_intf=len(lino.keys())
+
+ for kintf in range(nb_intf) :
+ llino=lino.values()[kintf]
+ lddac=ddac.values()[kintf]
+ nbno=len(llino)
+ assert len(lddac)==nbno*nbec , (lino,ddac)
+ for nuno in llino :
+ assert nuno > 0 , lino
+
+
+ def check_FREQ(self,checker):
+ freq=self.IDC_DY_FREQ.get()
+ assert freq[0] >=0 , freq
+
+
+ def check_DEFO(self,checker):
+ defo=self.IDC_DEFO.get()
+ desc=self.IDC_DESC.get()
+ nbec=desc[1]
+ nbnot=len(defo)/(nbec+2)
+ assert len(defo)==nbnot*(nbec+2), defo
+ for k in range(nbnot) :
+ assert defo[k] > 0 , defo
+
+ assert sdu_monotone(defo[nbnot:2*nbnot]) in (1,0) , (nbnot,nbec,defo)
+
--- /dev/null
+#@ MODIF sd_l_charges SD DATE 17/07/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_l_charges(AsBase):
+ nomj = SDNom(fin=19)
+ INFC = AsVI()
+ LCHA = AsVK24()
+ FCHA = AsVK24()
+ FCSS = Facultatif(AsVK24())
+
+
--- /dev/null
+#@ MODIF sd_l_table SD DATE 09/05/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_table import sd_table
+from SD.sd_util import *
+
+
+class sd_l_table(AsBase):
+#------------------------
+ nomj = SDNom(fin=19)
+
+ # la SD l_table (liste de tables) est une SD destinée à stocker un ensemble de tables
+ # les tables stockées dans la l_table sont identifiées par un "petit nom" (K16)
+
+ LTNT = AsVK16()
+ LTNS = AsVK24()
+
+
+ # existence possible de la SD :
+ def exists(self):
+ return self.LTNT.exists or self.LTNS.exists
+
+ # indirection vers les tables :
+ def check_l_table_i_LTNS(self, checker):
+ if not self.exists() : return
+ ltnt = self.LTNT.get()
+ ltns = self.LTNS.get()
+ nbtable=self.LTNT.lonuti
+ sdu_compare(self.LTNT,checker,nbtable,'>',0,'NBUTI(LTNT)>0')
+ sdu_compare(self.LTNS,checker,self.LTNS.lonuti,'==',nbtable,'NBUTI(LTNS)==NBUTI(LTNT)')
+ for k in range(nbtable) :
+ petinom=ltnt[k].strip()
+ nomtabl=ltns[k].strip()
+ sdu_compare(self.LTNT,checker,petinom,'!=','',"LTNT[k]!=''")
+ sdu_compare(self.LTNS,checker,nomtabl,'!=','',"LTNS[k]!=''")
+ sd2 = sd_table(nomtabl) ; sd2.check(checker)
+
--- /dev/null
+#@ MODIF sd_ligrel SD DATE 16/06/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_ligrel(AsBase):
+ nomj = SDNom(fin=19)
+
+ LGRF = AsVK8(lonmax=2, docu=Parmi('ACOU', 'MECA', 'THER'), )
+ NBNO = AsVI(lonmax=1,)
+ PRNM = AsVI()
+
+ # AU_MOINS_UN : LIEL, SSSA
+ # LIEL : il existe des éléments finis
+ # SSSA : il existe des sous-structures statiques
+ LIEL = Facultatif(AsColl( acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', ))
+ SSSA = Facultatif(AsVI())
+ # ENSEMBLE : LIEL, REPE
+ REPE = Facultatif(AsVI())
+
+ # si mailles tardives :
+ NEMA = Facultatif(AsColl( acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', ))
+ # si noeuds tardifs :
+ PRNS = Facultatif(AsVI())
+ LGNS = Facultatif(AsVI())
+
+
+ def exists(self):
+ # retourne True si la SD semble exister.
+ return self.LGRF.exists
+
+ def check_LGRF(self,checker):
+ if not self.exists() : return
+ lgrf=self.LGRF.get_stripped()
+ from SD.sd_maillage import sd_maillage
+ sd2=sd_maillage(lgrf[0]); sd2.check(checker)
+ if lgrf[1] != '' :
+ from SD.sd_partition import sd_partition
+ sd2=sd_partition(lgrf[1]); sd2.check(checker)
+
+
+ def check_presence(self,checker):
+ if not self.exists() : return
+ exi_liel=self.LIEL.exists
+ exi_sssa=self.SSSA.exists
+ exi_repe=self.REPE.exists
+ exi_nema=self.NEMA.exists
+ exi_prns=self.PRNS.exists
+ exi_lgns=self.LGNS.exists
+
+ # AU_MOINS_UN : .LIEL, .SSSA
+ assert exi_liel or exi_sssa
+
+ # SI .LIEL AU_MOINS_UN : .REPE, .NEMA
+ if exi_liel :
+ assert exi_repe or exi_nema
+
+ # .REPE => .LIEL
+ if exi_repe : assert exi_liel
+
+ # .NEMA => .LIEL
+ if exi_nema : assert exi_liel
+
+ # noeuds tardifs => .PRNS .LGNS et .NEMA
+ nb_no_tard= self.NBNO.get()[0]
+ if nb_no_tard > 0 :
+ assert exi_prns
+ assert exi_lgns
+ assert exi_nema
+ assert self.LGNS.lonmax >= nb_no_tard # .LGNS est surdimensionné
+ nbec= self.PRNS.lonmax / nb_no_tard
+ assert self.PRNS.lonmax == nb_no_tard * nbec , (nbec, nb_no_tard)
+ assert nbec >= 1 and nbec < 10 , nbec
+
+
--- /dev/null
+#@ MODIF sd_list_inst SD DATE 20/07/2009 AUTEUR GENIAUT S.GENIAUT
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2009 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.
+# ======================================================================
+
+from SD import *
+
+class sd_list_inst(AsBase):
+ nomj = SDNom(fin=8)
+
+# 1) objets relatifs a la liste
+
+ LIST_INFOR = AsVR(SDNom(nomj='.LIST.INFOR'),lonmax=7,)
+ LIST_DITR = AsVR(SDNom(nomj='.LIST.DITR'))
+
+ ECHE_EVENR = AsVR(SDNom(nomj='.ECHE.EVENR'))
+ ECHE_EVENK = AsVK16(SDNom(nomj='.ECHE.EVENK'))
+ ECHE_SUBDR = AsVR(SDNom(nomj='.ECHE.SUBDR'))
+
+ ADAP_EVENR = Facultatif(AsVR(SDNom(nomj='.ADAP.EVENR')))
+ ADAP_EVENK = Facultatif(AsVK8(SDNom(nomj='.ADAP.EVENK')))
+ ADAP_TPLUR = Facultatif(AsVR(SDNom(nomj='.ADAP.TPLUR')))
+ ADAP_TPLUK =Facultatif( AsVK16(SDNom(nomj='.ADAP.TPLUK')))
--- /dev/null
+#@ MODIF sd_liste_rela SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_liste_rela(AsBase):
+ nomj = SDNom(fin=19)
+ RLLA = AsVK8(SDNom(debut=19), )
+ RLBE = AsVR(SDNom(debut=19), )
+ RLSU = AsVI(SDNom(debut=19), )
+ RLTC = AsVK8(SDNom(debut=19), lonmax=1, )
+ RLNO = AsVK8(SDNom(debut=19), )
+ RLCO = AsVR(SDNom(debut=19), )
+ RLNT = AsVI(SDNom(debut=19), )
+ RLPO = AsVI(SDNom(debut=19), )
+ RLNR = AsVI(SDNom(debut=19), lonmax=1, )
+ RLTV = AsVK8(SDNom(debut=19), lonmax=1, )
+ RLDD = AsVK8(SDNom(debut=19), )
+
+
--- /dev/null
+#@ MODIF sd_listis SD DATE 22/10/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+from SD.sd_util import *
+
+
+class sd_listis(sd_titre):
+#-------------------------------------
+ nomj = SDNom(fin=19)
+ LPAS = AsVI()
+ BINT = AsVI()
+ NBPA = AsVI()
+ VALE = AsVI()
+
+
+ def check_1(self,checker):
+ nbpa=self.NBPA.get()
+ bint=self.BINT.get()
+ lpas=self.LPAS.get()
+ vale=self.VALE.get()
+
+ # cas général :
+ if len(vale) > 1 :
+ assert len(bint) == len(nbpa)+1
+ assert len(nbpa) == len(lpas)
+
+ n1=0
+ assert vale[0] == bint[0]
+ for k in range(len(nbpa)) :
+ npas=nbpa[k]
+ assert npas > 0
+ n1 = n1 + npas
+ assert vale[n1] == bint[k+1]
+
+ assert len(vale) == n1+1
+ assert sdu_monotone(vale) in (1,) , vale
+
+
+ # cas particulier :
+ if len(vale) == 1 :
+ assert len(bint) == 1
+ assert len(nbpa) == 1
+ assert len(lpas) == 1
+ assert vale[0] == bint[0]
+ assert nbpa[0] == 0, nbpa
+ assert lpas[0] == 0, lpas
+
+
--- /dev/null
+#@ MODIF sd_listr8 SD DATE 10/07/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+
+
+class sd_listr8(sd_titre):
+#----------------------------------
+ nomj = SDNom(fin=19)
+ LPAS = AsVR()
+ BINT = AsVR()
+ NBPA = AsVI()
+ VALE = AsVR()
+
+
+ def proche(self,a,b):
+ # retourne 1 si a est proche de b
+ # retourne -1 si a est loin de b
+ # retourne 0 si a = 0. (ou b = 0.)
+ if a != 0. and b != 0. :
+ erreur= abs(a-b)/(abs(a)+abs(b))
+ if erreur < 1.e-12 :
+ return 1
+ else :
+ return -1
+ else :
+ return 0
+
+
+ def check_1(self,checker):
+ nbpa=self.NBPA.get()
+ bint=self.BINT.get()
+ lpas=self.LPAS.get()
+ vale=self.VALE.get()
+
+ # cas général :
+ if len(vale) > 1 :
+ assert len(bint) == len(nbpa)+1
+ assert len(nbpa) == len(lpas)
+
+ n1=0
+ assert self.proche(vale[0], bint[0]) in (1,0)
+ for k in range(len(nbpa)) :
+ npas=nbpa[k]
+ assert npas > 0
+ n1 = n1 + npas
+ assert self.proche(vale[n1],bint[k+1]) in (1,0) , (k+1,vale[n1], bint[k+1],)
+
+ assert len(vale) == n1+1
+
+ # cas particulier :
+ if len(vale) == 1 :
+ assert len(bint) == 1
+ assert len(nbpa) == 1
+ assert len(lpas) == 1
+ assert vale[0] == bint[0]
+
+
--- /dev/null
+#@ MODIF sd_macr_elem_dyna SD DATE 22/09/2008 AUTEUR ANDRIAM H.ANDRIAMBOLOLONA
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_util import *
+from SD.sd_nume_ddl_gd import sd_nume_ddl_gd
+
+
+class sd_macr_elem_dyna_m(AsBase):
+#----------------------------------
+ nomj = SDNom(fin=18)
+ DESC = AsVI (SDNom(nomj='_DESC'),lonmax=3)
+ REFE = AsVK24 (SDNom(nomj='_REFE'),lonmax=2)
+ VALE = AsObject (SDNom(nomj='_VALE'),type=Parmi('C','R',),)
+
+ def check_macr_elem_dyna_m_1(self,checker):
+ vale=self.VALE.get()
+ if not vale : return # si Facultatif()
+
+ sdu_tous_compris(self.DESC,checker,vmin=1)
+ nbdef=self.DESC.get()[1]
+ sdu_compare(self.VALE,checker,len(vale),'==',(nbdef*(nbdef+1))/2,'LONMAX(VALE)')
+
+
+class sd_macr_elem_dyna(AsBase):
+#-------------------------------
+ nomj = SDNom(fin=8)
+
+ # description géométrique et topolique :
+ DESM = AsVI(lonmax=10)
+ REFM = AsVK8()
+ LINO = AsVI()
+ CONX = Facultatif(AsVI())
+
+ # rigidité, masse, amortissement condensés :
+ nume = sd_nume_ddl_gd(SDNom(nomj=''))
+
+ MAEL_RAID = sd_macr_elem_dyna_m()
+ MAEL_MASS = sd_macr_elem_dyna_m()
+ MAEL_AMOR = Facultatif(sd_macr_elem_dyna_m())
+
+ MAEL_INER_VALE = AsVR()
+ MAEL_INER_REFE = AsVK24(lonmax=2, )
+
+ MAEL_DESC = AsVI(lonmax=3, )
+ MAEL_REFE = AsVK24(lonmax=2, )
+
+
+
+ def check_macr_elem_dyna_1(self,checker):
+ nbdef=self.MAEL_MASS.DESC.get()[1]
+ sdu_compare(self.MAEL_INER_VALE, checker,len(self.MAEL_INER_VALE.get()),'==',3*nbdef,'LONMAX(MAEL_INER_VALE)')
+
--- /dev/null
+#@ MODIF sd_macr_elem_stat SD DATE 27/11/2007 AUTEUR ANDRIAM H.ANDRIAMBOLOLONA
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_matr_asse_gd import sd_matr_asse_gd
+from SD.sd_stoc_lciel import sd_stoc_lciel
+from SD.sd_proj_mesu import sd_proj_mesu
+
+
+class sd_macr_elem_stat(AsBase):
+#----------------------------------------------
+ nomj = SDNom(fin=8)
+
+ # description géométrique et topolique :
+ DESM = AsVI(lonmax=10)
+ REFM = AsVK8()
+ LINO = AsVI()
+ VARM = AsVR(lonmax=2)
+ CONX = Facultatif(AsVI()) # l'objet devient obligatoire dès l'étape de condensation de la rigidité
+
+ # rigidité condensée :
+ rigimeca = Facultatif(sd_matr_asse_gd(SDNom(nomj='.RIGIMECA', fin=19)))
+ MAEL_RAID_VALE = Facultatif(AsVR())
+ PHI_IE = Facultatif(AsColl(acces='NU', stockage='DISPERSE', modelong='CONSTANT', type='R', ltyp=8))
+
+ # masse condensée :
+ massmeca = Facultatif(sd_matr_asse_gd(SDNom(nomj='.MASSMECA', fin=19)))
+ MAEL_MASS_VALE = Facultatif(AsVR())
+
+ # amortissement condensé :
+ MAEL_AMOR_VALE = Facultatif(AsVR())
+
+ # chargements condensés :
+ LICA = Facultatif(AsColl(acces='NO', stockage='DISPERSE', modelong='CONSTANT', type='R', ltyp=8))
+ LICH = Facultatif(AsColl(acces='NO', stockage='CONTIG', modelong='CONSTANT', type='K', ltyp=8))
+
+ # si utilisation de PROJ_MESU_MODAL :
+ PROJM = Facultatif(sd_proj_mesu())
+
+
+ def check_longueurs(self, checker):
+ #------------------------------------
+ # vérifs existence, longueurs, ...
+
+ desm=self.DESM.get()
+ refm=self.REFM.get()
+ assert desm[0]==0, desm
+ nbnoe, nbnoi, nddle, nddli, nbchar, nbcas, nlage, nlagl, nlagi =desm[1:10]
+ assert nbnoe > 0 ,desm
+ assert nbchar >= 0 ,desm
+
+ # si on n'a pas encore condensé la rigidité, certaines valeurs ne sont pas encore calculées :
+ if self.MAEL_RAID_VALE.exists :
+ assert nbnoi > 0 ,desm
+ assert nddle > 1 ,desm
+ assert nddli > 0 ,desm
+ assert nbcas >= 0 ,desm
+ assert nlage >= 0 ,desm
+ assert nlagl >= 0 ,desm
+ assert nlagi >= 0 ,desm
+ assert self.CONX.lonmax == 3*(nbnoe+nlage+nlagl) ,(desm,self.CONX.get())
+ assert refm[5] == 'OUI_RIGI'
+
+ assert self.REFM.lonmax == 9+nbchar ,(desm,self.REFM.get())
+ assert self.LINO.lonmax == nbnoe ,(desm,self.LINO.get())
+
+ # rigidité condensée :
+ if self.MAEL_RAID_VALE.exists :
+ assert self.MAEL_RAID_VALE.lonmax == (nddle*(nddle+1))/2
+
+ assert self.PHI_IE.exists
+ phi_ie=self.PHI_IE.get() # on ne sait pas faire autrement que ramener l'objet entier ...
+ nlblph=len(phi_ie[1])/nddli # nombre de lignes de phi_ie par bloc
+ assert self.PHI_IE.nmaxoc == (nddle-1)/nlblph +1 , (nddle, self.PHI_IE.nmaxoc)
+ for ke in phi_ie.keys() :
+ assert len(phi_ie[ke]) == nddli*nlblph ,(nddli,nlblph,nddle,len(phi_ie[ke]),ke)
+
+ # masse condensée :
+ if self.MAEL_MASS_VALE.exists :
+ assert self.MAEL_MASS_VALE.lonmax == (nddle*(nddle+1))/2
+ assert refm[6] == 'OUI_MASS'
+
+ # amortissement condensé : (JP : je ne sais pas si ca peut exister ?)
+ if self.MAEL_AMOR_VALE.exists :
+ assert self.MAEL_AMOR_VALE.lonmax == (nddle*(nddle+1))/2
+ assert refm[7] == 'OUI_AMOR'
+
+ # chargements condensés :
+ if nbcas > 0 :
+ assert self.LICA.exists
+ assert self.LICA.nmaxoc >= nbcas
+ lica=self.LICA.get()
+ for k in lica.keys():
+ assert len(lica[k]) == 2*(nddli + nddle)
+
+ assert self.LICH.exists
+ assert self.LICH.nmaxoc == self.LICA.nmaxoc
+ assert self.LICH.nutioc == self.LICA.nutioc
+ lich=self.LICH.get()
+ for k in lich.keys():
+ assert len(lich[k]) >= nbchar + 1
+
--- /dev/null
+#@ MODIF sd_maillage SD DATE 06/05/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+
+from SD.sd_cham_no import sd_cham_no
+from SD.sd_carte import sd_carte
+from SD.sd_l_table import sd_l_table
+
+
+class sd_voisinage(AsBase):
+#-------------------------------
+ nomj = SDNom(fin=12)
+ PTVOIS = AsVI()
+ ELVOIS = AsVI()
+
+
+class sd_maillage(sd_titre):
+#-------------------------------
+ nomj = SDNom(fin=8)
+
+ DIME = AsVI(lonmax=6, )
+
+ # un sd_maillage a toujours des noeuds :
+ NOMNOE = AsPn(ltyp=8)
+ COORDO = sd_cham_no()
+
+ # normalement, un sd_maillage a toujours une "sd_l_table" contenant des caractéristiques géométriques :
+ lt = sd_l_table(SDNom(nomj=''))
+
+ # si le sd_maillage a des groupes :
+ GROUPENO = Facultatif(AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', ))
+ GROUPEMA = Facultatif(AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', ))
+
+ # si le sd_maillage a des mailles :
+ CONNEX = Facultatif(AsColl(acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', ))
+ TYPMAIL = Facultatif(AsVI())
+ NOMMAI = Facultatif(AsPn(ltyp=8))
+
+ # si le sd_maillage a des super-mailles :
+ NOMACR = Facultatif(AsVK8())
+ SUPMAIL = Facultatif(AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', ))
+ PARA_R = Facultatif(AsVR())
+ TYPL = Facultatif(AsVI())
+
+ # si le sd_maillage est linéique (tube_GV) :
+ abs_curv = Facultatif(sd_carte(SDNom(nomj='.ABS_CURV')))
+
+ # Lorsque le sd_maillage sert de support a un sd_modele contenant des volumes finis :
+ VGE = Facultatif(sd_voisinage())
+
+ ADAPTATION = Facultatif(AsVI(lonmax=1, ))
+ FORM = Facultatif(AsVK32(SDNom(debut=19), lonmax=2, ))
+
+
+ def u_dime(self):
+ dime=self.DIME.get()
+ nb_no =dime[0]
+ nb_nl =dime[1]
+ nb_ma =dime[2]
+ nb_sm =dime[3]
+ nb_sm_mx =dime[4]
+ dim_coor =dime[5]
+ return nb_no, nb_nl, nb_ma, nb_sm, nb_sm_mx, dim_coor
+
+# remarque : la sd_maillage pouvant etre "volumineuse", on s'interdit (pour des raisons de temps CPU)
+# de vérifier le contenu des gros objets.
+
+ def check_DIME(self,checker):
+ nb_no, nb_nl, nb_ma, nb_sm, nb_sm_mx, dim_coor = self.u_dime()
+ assert nb_sm <= nb_sm_mx , (nb_sm, nb_sm_mx)
+ if nb_nl > 0 : assert nb_sm > 0
+ assert nb_no > 0 , nb_no
+ assert dim_coor in (2,3), dim_coor
+
+
+ def check_NOEUDS(self,checker):
+ nb_no, nb_nl, nb_ma, nb_sm, nb_sm_mx, dim_coor = self.u_dime()
+ assert self.NOMNOE.nomuti == nb_no + nb_nl , (nb_no, nb_nl)
+ assert self.COORDO.VALE.lonmax == 3*nb_no , nb_no
+
+
+ def check_MAILLES(self,checker):
+ nb_no, nb_nl, nb_ma, nb_sm, nb_sm_mx, dim_coor = self.u_dime()
+ if nb_ma == 0 : return
+ assert self.NOMMAI.nommax == nb_ma , nb_ma
+ assert self.TYPMAIL.lonmax == nb_ma , nb_ma
+ assert self.CONNEX.nmaxoc == nb_ma , nb_ma
+
+
+ def check_SSS(self,checker):
+ nb_no, nb_nl, nb_ma, nb_sm, nb_sm_mx, dim_coor = self.u_dime()
+ if nb_sm == 0 : return
+ assert self.NOMACR.lonmax == nb_sm , nb_sm
+ assert self.PARA_R.lonmax == 14*nb_sm , nb_sm
+ assert self.SUPMAIL.nmaxoc == nb_sm , nb_sm
+
+ def check_TYPL(self,checker):
+ nb_no, nb_nl, nb_ma, nb_sm, nb_sm_mx, dim_coor = self.u_dime()
+ if nb_nl == 0 : return
+ assert self.TYPL.lonmax == nb_nl , nb_nl
+ typl=self.TYPL.get()
+ for k in typl :
+ assert k in (-1, -2) , typl
+
--- /dev/null
+#@ MODIF sd_mater SD DATE 06/05/2008 AUTEUR MARKOVIC D.MARKOVIC
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_fonction import sd_fonction
+
+
+
+class sd_mater_XDEP(AsBase):
+#---------------------------
+ # on dirait une fonction, mais c'est plutot la concaténation de plusieurs fonctions
+ nomj = SDNom(fin=19)
+ PROL = AsVK24()
+ VALE = AsVR()
+
+
+class sd_compor1(AsBase):
+#-----------------------
+ nomj = SDNom(fin=19)
+ VALC = AsVC(SDNom(), )
+ VALK = AsVK8(SDNom(), )
+ VALR = AsVR(SDNom(), )
+
+
+ # parfois, THER_NL crée une sd_fonction pour BETA
+ def check_compor1_i_VALK(self, checker):
+ nom= self.nomj().strip()
+ if nom[8:16]=='.THER_NL' :
+ valk=list(self.VALK.get_stripped())
+ if valk :
+ nbk2=self.VALK.lonuti
+ nbr=self.VALR.lonuti
+ nbc=self.VALC.lonuti
+ nbk=nbk2-nbr-nbc
+ k2=valk.index('BETA')
+ k=k2-nbr-nbc
+ nomfon=valk[nbr+nbc+nbk/2+k]
+ sd2=sd_fonction(nomfon) ; sd2.check(checker)
+ if nom[8:16]=='.GLRC_DA' :
+ valk=list(self.VALK.get_stripped())
+ if valk :
+ nbk2=self.VALK.lonuti
+ nbr=self.VALR.lonuti
+ nbc=self.VALC.lonuti
+ nbk=nbk2-nbr-nbc
+ for fon in ('FMEX1' ,'FMEX2' ,'FMEY1' ,'FMEY2' ,
+ 'DFMEX1' ,'DFMEX2' ,'DFMEY1' ,'DFMEY2',
+ 'DDFMEX1','DDFMEX2','DDFMEY1','DDFMEY2'):
+ k2=valk.index(fon)
+ k=k2-nbr-nbc
+ nomfon=valk[nbr+nbc+nbk/2+k]
+ sd2=sd_fonction(nomfon) ; sd2.check(checker)
+
+
+class sd_mater(AsBase):
+#----------------------
+ nomj = SDNom(fin=8)
+ NOMRC = AsVK16(SDNom(nomj='.MATERIAU.NOMRC'), )
+ rdep = Facultatif(sd_mater_XDEP(SDNom(nomj='.&&RDEP'))) # à documenter
+ mzp = Facultatif(sd_mater_XDEP(SDNom(nomj='.&&MZP' ))) # à documenter
+
+ # existence possible de la SD :
+ def exists(self):
+ return self.NOMRC.exists
+
+ # indirection vers les sd_compor1 de NOMRC :
+ def check_mater_i_NOMRC(self, checker):
+ lnom = self.NOMRC.get()
+ if not lnom: return
+ for nom in lnom:
+ if not nom.strip(): continue
+ nomc1=self.nomj()[:8]+'.'+nom
+ comp1 = sd_compor1(nomc1)
+
+ # parfois, comp1 est vide : ssls115g/DEFI_COQU_MULT
+ if comp1.VALK.get() : comp1.check(checker)
+
--- /dev/null
+#@ MODIF sd_matr_asse SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_matr_asse_gd import sd_matr_asse_gd
+from SD.sd_matr_asse_gene import sd_matr_asse_gene
+from SD.sd_matr_asse_com import sd_matr_asse_com
+
+#---------------------------------------------------------------------------------
+# classe "chapeau" à sd_matr_asse_gene et sd_matr_asse_gd ne servant que pour "check"
+#---------------------------------------------------------------------------------
+
+
+class sd_matr_asse(sd_matr_asse_com):
+#--------------------------------------------
+ nomj = SDNom(fin=19)
+
+
+ # pour orienter vers sd_matr_asse_gene ou sd_matr_asse_gd :
+ def check_matr_asse_1(self, checker):
+ # on est obligé de se protéger dans le cas des Facultatif(sd_matr_asse) :
+ if not self.REFA.get() : return
+ gene=self.REFA.get()[9].strip()=='GENE'
+ if gene :
+ sd2=sd_matr_asse_gene(self.nomj)
+ else :
+ sd2=sd_matr_asse_gd(self.nomj)
+ sd2.check(checker)
+
+
--- /dev/null
+#@ MODIF sd_matr_asse_com SD DATE 25/03/2008 AUTEUR REZETTE C.REZETTE
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+
+from SD.sd_maillage import sd_maillage
+from SD.sd_nume_ddl import sd_nume_ddl
+from SD.sd_matr_cine import sd_matr_cine
+
+
+class sd_matr_asse_com(sd_titre):
+#-----------------------------
+ nomj = SDNom(fin=19)
+
+ REFA = AsVK24(lonmax=11,)
+ VALM = AsColl(acces='NU', stockage='DISPERSE', modelong='CONSTANT', type=Parmi('C', 'R'))
+ UALF = Facultatif(AsColl(acces='NU', stockage='DISPERSE', modelong='CONSTANT', type=Parmi('C', 'R')))
+ VALF = Facultatif(AsColl(acces='NU', stockage='DISPERSE', modelong='VARIABLE', type=Parmi('C', 'R')))
+ WALF = Facultatif(AsColl(acces='NU', stockage='DISPERSE', modelong='VARIABLE', type=Parmi('C', 'R')))
+ CONL = Facultatif(OJBVect(type=Parmi('C', 'R')))
+ DIGS = Facultatif(OJBVect(type=Parmi('C', 'R'))) # seulement si solveurs LDLT et MULT_FRONT
+ LIME = Facultatif(AsVK24())
+ cine = Facultatif(sd_matr_cine(SDNom(nomj='')))
+
+ def exists(self):
+ # retourne "vrai" si la SD semble exister (et donc qu'elle peut etre vérifiée)
+ return self.REFA.exists
+
+ def check_REFA(self, checker):
+ if not self.exists() : return
+ refa=self.REFA.get_stripped()
+ assert refa[9] in ('NOEU','GENE') , refa
+ lgene = refa[9] == 'GENE'
+ # pour les matrices generalisees, on ne sait pas ce qui est stocké dans refa[0]='' :
+ if not lgene :
+ sd2=sd_maillage(refa[0]) ; sd2.check(checker)
+ sd2=sd_nume_ddl(refa[1]) ; sd2.check(checker)
+ assert refa[2] in ('ELIMF','ELIML','') , refa
+ assert refa[4] in ('FETI','') , refa
+ # pour les matrices generalisees, refa[7] n'est pas toujours rempli :
+ if not lgene :
+ # glute à résorber : j'ajoute '' à la liste permise pour le test yyyy108e :
+ assert refa[7] in ('ASSE','DECT','DECP','') , refa
+ assert refa[8] in ('MS','MR') , refa
+ if refa[8]=='MS' :
+ assert self.VALM.nmaxoc == 1 , (refa,self.VALM.nmaxoc)
+ elif refa[8]=='MR' :
+ assert self.VALM.nmaxoc == 2 , (refa,self.VALM.nmaxoc)
+ assert refa[10] in ('MPI_COMPLET','MPI_INCOMPLET') , refa
+
+
--- /dev/null
+#@ MODIF sd_matr_asse_gd SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_matr_asse_com import sd_matr_asse_com
+from SD.sd_nume_ddl_gd import sd_nume_ddl_gd
+
+
+class sd_matr_asse_gd(sd_matr_asse_com):
+#--------------------------------------------
+ nomj = SDNom(fin=19)
+
+
+ # indirection vers sd_nume_ddl_gd à faire car FACT_LDLT modifie le sd_nume_ddl_gd de la sd_matr_asse :
+ def check_matr_asse_gd_i_REFA(self, checker):
+ # on est obligé de se protéger dans le cas des Facultatif(sd_matr_asse) :
+ if not self.REFA.get() : return
+ nom=self.REFA.get()[1]
+ sd2=sd_nume_ddl_gd(nom) ; sd2.check(checker)
+
--- /dev/null
+#@ MODIF sd_matr_asse_gene SD DATE 09/05/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_matr_asse_com import sd_matr_asse_com
+from SD.sd_nume_ddl_gene import sd_nume_ddl_gene
+
+
+class sd_matr_asse_gene(sd_matr_asse_com):
+#-----------------------------------------
+ nomj = SDNom(fin=19)
+
+ DESC = Facultatif(AsVI(lonmax=3,)) # PB_JACOT : n'existe pas toujours : exemple : fdlv105a
+
+ def exists(self):
+ return self.REFA.exists
+
+
+ # indirection vers sd_nume_ddl à faire car FACT_LDLT modifie le sd_nume_ddl_gene de la sd_matr_asse :
+ def check_matr_asse_gene_i_REFA(self, checker):
+ if not self.exists : return
+ nom=self.REFA.get()[1]
+ sd2=sd_nume_ddl_gene(nom) ; sd2.check(checker)
+
--- /dev/null
+#@ MODIF sd_matr_cine SD DATE 22/09/2008 AUTEUR DESOZA T.DESOZA
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+
+class sd_matr_cine(AsBase):
+#-----------------------
+ nomj = SDNom(fin=19)
+
+ CCID = AsVI()
+ CCII = Facultatif(AsVI())
+ CCLL = Facultatif(AsVI())
+ CCVA = Facultatif(AsObject(genr='V', xous='S', type=Parmi('R','C')))
+
+
--- /dev/null
+#@ MODIF sd_matr_elem SD DATE 08/06/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_resuelem import sd_resuelem
+from SD.sd_cham_no import sd_cham_no
+from SD.sd_modele import sd_modele
+from SD.sd_cham_mater import sd_cham_mater
+from SD.sd_cara_elem import sd_cara_elem
+
+
+class sd_matr_elem(AsBase):
+ nomj = SDNom(fin=19)
+ RERR = AsVK24(lonmax=5, )
+ RELR = Facultatif(AsVK24())
+ RECC = Facultatif(AsVK8())
+ TITR = AsVK80(SDNom(debut=19), optional=True)
+
+ # indirection par RELR :
+ def check_matr_elem_i_RELR(self, checker):
+ if not self.RELR.exists : return
+ lnom = self.RELR.get_stripped()
+ for nom in lnom:
+ if nom != '' :
+ # le nom est celui d'un resuelem ou parfois d'un cham_no (VECT_ASSE):
+ sd2 = sd_resuelem(nom)
+ if sd2.RESL.exists :
+ sd2.check(checker)
+ else :
+ sd2 = sd_cham_no(nom)
+ sd2.check(checker)
+
+
+ def check_1(self, checker):
+ refe = self.RERR.get_stripped()
+ assert refe[2] in ('OUI_SOUS_STRUC', 'NON_SOUS_STRUC'), refe
+
+ # existence de RELR :
+ if refe[2] == 'NON_SOUS_STRUC':
+ assert self.RELR.exists
+
+ assert refe[1] != '', refe
+
+ sd2=sd_modele(refe[0]) ; sd2.check(checker)
+
+ if refe[3] != '' :
+ sd2=sd_cham_mater(refe[3]) ; sd2.check(checker)
+
+ if refe[4] != '' :
+ sd2=sd_cara_elem(refe[4]) ; sd2.check(checker)
+
+
+
--- /dev/null
+#@ MODIF sd_melasflu SD DATE 21/04/2008 AUTEUR MACOCCO K.MACOCCO
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_l_table import sd_l_table
+from SD.sd_table import sd_table
+from SD.sd_cham_no import sd_cham_no
+from SD.sd_matr_asse_gene import sd_matr_asse_gene
+from SD.sd_type_flui_stru import sd_type_flui_stru
+from SD.sd_resultat_dyn import sd_resultat_dyn
+from SD.sd_util import *
+
+
+class sd_melasflu(AsBase):
+#-------------------------------
+ nomj = SDNom(fin=8)
+
+ MASG = AsVR(SDNom(debut=19), )
+ VITE = AsVR(SDNom(debut=19), )
+ REMF = AsVK8(SDNom(debut=19), lonmax=2, )
+ FREQ = AsVR(SDNom(debut=19), )
+ NUMO = AsVI(SDNom(debut=19))
+ FACT = AsVR(SDNom(debut=19), )
+ DESC = AsVK16(SDNom(debut=19), lonmax=1, )
+
+ # si FAISCEAU_TRANS + couplage fluide-structure + BASE_MODALE/AMOR_REDUIT_CONN :
+ VCN = Facultatif(AsVR())
+ VEN = Facultatif(AsVR())
+ RAP = Facultatif(AsVR())
+
+ sd_table = sd_table(SDNom(nomj=''))
+ sd_l_table = Facultatif(sd_l_table(SDNom(nomj=''))) # Si FAISCEAU_AXIAL
+
+
+ # indirections via .REMF :
+ #----------------------------------
+ def check_melasflu_i_REMF(self, checker):
+ remf=self.REMF.get_stripped()
+ sd2 = sd_type_flui_stru(remf[0]) ; sd2.check(checker)
+ sd2 = sd_resultat_dyn(remf[1]) ; sd2.check(checker)
+
+
+ # Vérifications supplémentaires :
+ #----------------------------------
+ def check_veri1(self, checker):
+ remf=self.REMF.get()
+ desc=self.DESC.get_stripped()
+
+ # calcul de itypfl (type d'interaction fluide / structure) :
+ typfl = sd_type_flui_stru(remf[0])
+ itypfl=typfl.FSIC.get()[0] # 1 -> FAISCEAU_TRANS
+ # 3 -> FAISCEAU_AXIAL
+ couplage=typfl.FSIC.get()[1] # 1 -> prise en compte du couplage
+ assert itypfl > 0 , remf
+
+ # calcul de nbmode (nombre de modes) :
+ nbmode=self.NUMO.lonmax
+ assert nbmode > 0
+
+ # calcul de nbvite (nombre de vitesses) :
+ nbvite=self.VITE.lonmax
+ assert nbvite > 0
+
+ # vérification de l'objet .DESC :
+ #--------------------------------
+ assert len(desc)==1 , desc
+ assert desc[0] == 'DEPL' , desc
+
+ # vérification de l'objet .NUMO :
+ #--------------------------------
+ for x in self.NUMO.get() :
+ assert x >= 1 , numo
+
+ # vérification de l'objet .FACT :
+ #--------------------------------
+ if itypfl==3 : # faisceau axial
+ assert self.FACT.lonmax == 3*nbmode*nbvite
+ else :
+ assert self.FACT.lonmax == 3*nbmode
+
+ # vérification de l'objet .MASG :
+ #--------------------------------
+ if itypfl==3 : # faisceau axial
+ assert self.MASG.lonmax == nbmode*nbvite
+ else :
+ assert self.MASG.lonmax == nbmode
+
+ # vérification de l'objet .FREQ :
+ #--------------------------------
+ assert self.FREQ.lonmax == 2*nbmode*nbvite
+
+ # vérification existence .VCN et .VEN:
+ #-------------------------------------
+ if self.VCN.exists : assert self.VEN.exists
+ if self.VEN.exists : assert self.VCN.exists
+ if self.VEN.exists : assert itypfl == 1 and couplage == 1
+ if self.RAP.exists : assert (self.VEN.exists and self.VCN.exists)
+
+ # vérification de l'objet .VCN :
+ #--------------------------------
+ if self.VCN.exists :
+ fsvi=typfl.FSVI.get()
+ nbzone=fsvi[1]
+ nbval=0
+ for i in range(nbzone) :
+ nbval=nbval+fsvi[2+nbzone+i]
+ assert self.VCN.lonmax == nbmode*nbval*2
+
+ # vérification de l'objet .VEN :
+ #--------------------------------
+ if self.VEN.exists :
+ assert self.VEN.lonmax == nbmode*2
+
+ # vérification de l'objet .RAP :
+ #--------------------------------
+ if self.RAP.exists :
+ fsvi=typfl.FSVI.get()
+ nbzone=fsvi[1]
+ nbval=0
+ for i in range(nbzone) :
+ nbval=nbval+fsvi[2+nbzone+i]
+ assert self.RAP.lonmax == nbmode*nbval*2
+
+ # vérification de la SD table contenant les cham_no :
+ #----------------------------------------------------
+ tcham=self.sd_table
+ assert tcham.nb_column() == 1 , tcham
+ col1=tcham.get_column_name('NOM_CHAM')
+ assert col1, "Il manque la colonne NOM_CHAM"
+
+ data=col1.data.get()
+ mask=col1.mask.get()
+ profchno=''
+ for k in range(len(mask)):
+ if not mask[k] : continue
+ ch1=sd_cham_no(data[k])
+ ch1.check(checker)
+
+ # Tous les cham_no doivent avoir le meme prof_chno :
+ profchn1=ch1.REFE.get()[1]
+ if profchno == '':
+ profchno=profchn1
+ else:
+ assert profchn1 == profchno ,(profchn1, profchno)
+
+
+ # vérification de la SD l_table :
+ #--------------------------------
+ if self.sd_l_table.LTNT.exists : assert itypfl == 3 # FAISCEAU_AXIAL
+ if itypfl == 3 : assert self.sd_l_table.LTNT.exists
+
+ if self.sd_l_table.LTNT.exists :
+ l_table = self.sd_l_table
+ l_table.check(checker)
+
+ # la l_table ne contient qu'une seule table nommée 'MATR_GENE'
+ sdu_compare(l_table.LTNT,checker,l_table.LTNT.lonuti,'==',1,"LONUTI(LTNT)==1")
+ sdu_compare(l_table.LTNT,checker,l_table.LTNT.get()[0].strip(),'==','MATR_GENE',"LTNT[0]==MATR_GENE")
+
+ # vérification de la table 'MATR_GENE' :
+ tmatgen=sd_table(l_table.LTNS.get()[0])
+ col1=tmatgen.get_column_name('NUME_VITE')
+ sdu_assert(None, checker, col1, "Manque colonne NUME_VITE")
+ col1=tmatgen.get_column_name('VITE_FLUI')
+ sdu_assert(None, checker, col1, "Manque colonne VITE_FLUI")
+
+ for x in 'MATR_RIGI', 'MATR_MASS', 'MATR_AMOR' :
+ col1=tmatgen.get_column_name(x)
+ sdu_assert(None, checker, col1, "Manque colonne : "+x)
+ data=col1.data.get()
+ mask=col1.mask.get()
+ for k in range(len(mask)):
+ if not mask[k] : continue
+ matgen=sd_matr_asse_gene(data[k])
+ matgen.check(checker)
+
+
--- /dev/null
+#@ MODIF sd_mode_cycl SD DATE 11/05/2009 AUTEUR NISTOR I.NISTOR
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_maillage import sd_maillage
+from SD.sd_interf_dyna_clas import sd_interf_dyna_clas
+#from SD.sd_base_modale import sd_base_modale
+from SD.sd_mode_meca import sd_mode_meca
+from SD.sd_util import *
+
+
+class sd_mode_cycl(AsBase):
+#--------------------------
+ nomj = SDNom(fin=8)
+ CYCL_TYPE = AsVK8(lonmax=1, )
+ CYCL_CMODE = AsVC()
+ CYCL_NBSC = AsVI(lonmax=1, )
+ CYCL_DIAM = AsVI()
+ CYCL_REFE = AsVK24(lonmax=3, )
+ CYCL_DESC = AsVI(lonmax=4, )
+ CYCL_FREQ = AsVR()
+ CYCL_NUIN = AsVI(lonmax=3, )
+
+
+ def u_dime(self) :
+ desc=self.CYCL_DESC.get()
+ nb_mod = desc[0] ; assert nb_mod > 0
+ nb_ddl = desc[1] ; assert nb_ddl > 0
+ nb_ddli = desc[2] ; assert nb_ddli >= 0
+ nb_freq = desc[3] ; assert nb_freq > 0
+ nb_diam=self.CYCL_DIAM.lonmax / 2 ; assert nb_diam > 0
+ assert self.CYCL_DIAM.lonmax == 2*nb_diam
+ return (nb_mod, nb_ddl, nb_ddli, nb_freq, nb_diam)
+
+ def check_REFE(self,checker) :
+ refe=self.CYCL_REFE.get_stripped()
+ sd2=sd_maillage(refe[0]); sd2.check
+ sd2=sd_interf_dyna_clas(refe[1]); sd2.check
+# sd2=sd_base_modale(refe[2]); sd2.check
+ sd2=sd_mode_meca(refe[2]); sd2.check
+
+ def check_NUIN(self,checker) :
+ nuin=self.CYCL_NUIN.get()
+ assert nuin[0] > 0 , nuin
+ assert nuin[1] > 0 , nuin
+ assert nuin[2] >= 0 , nuin
+
+
+ def check_NBSC(self,checker) :
+ nbsc=self.CYCL_NBSC.get()
+ assert nbsc[0] > 0 , nbsc
+
+
+ def check_TYPE(self,checker) :
+ type=self.CYCL_TYPE.get_stripped()
+ assert type[0] in ('MNEAL', 'CRAIGB', 'CB_HARMO', 'AUCUN') ,type
+
+
+ def check_CMODE(self,checker) :
+ nb_mod, nb_ddl, nb_ddli, nb_freq, nb_diam = self.u_dime()
+ assert self.CYCL_CMODE.lonmax== nb_diam*nb_freq*(nb_mod+nb_ddl+nb_ddli)
+
+
+ def check_DIAM(self,checker) :
+ diam=self.CYCL_DIAM.get()
+ nb_diam=len(diam)/2
+ for x in diam[:nb_diam] : assert x >= 0 , diam
+ for x in diam[nb_diam:] : assert x > 0 , diam
+ sdu_tous_differents(self.CYCL_DIAM,checker,diam[:nb_diam])
+
+
+ def check_FREQ(self,checker) :
+ nb_mod, nb_ddl, nb_ddli, nb_freq, nb_diam = self.u_dime()
+ freq=self.CYCL_FREQ.get()
+ assert len(freq) == nb_diam*nb_freq ,(self.CYCL_DESC.get(),len(freq))
+ for x in freq : assert x >= 0 , freq
+
+
--- /dev/null
+#@ MODIF sd_mode_meca SD DATE 11/05/2009 AUTEUR NISTOR I.NISTOR
+
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2009 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_resultat_dyn import sd_resultat_dyn
+
+
+class sd_mode_meca(sd_resultat_dyn):
+#--------------------------------------------------
+ nomj = SDNom(fin=8)
+# UTIL = Facultatif(AsVI(SDNom(debut=19))) # AJACOT_PB : .UTIL n'existe pas pour sdlx201a
+
+
--- /dev/null
+#@ MODIF sd_modele SD DATE 06/05/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_ligrel import sd_ligrel
+from SD.sd_maillage import sd_maillage
+from SD.sd_prof_chno import sd_prof_chno
+from SD.sd_carte import sd_carte
+from SD.sd_xfem import sd_modele_xfem
+from SD.sd_l_table import sd_l_table
+
+
+
+class sd_modele(AsBase):
+#-----------------------------
+ nomj = SDNom(fin=8)
+
+ MODELE = sd_ligrel()
+ NOEUD = Facultatif(AsVI())
+ MAILLE = Facultatif(AsVI())
+
+ # une sd_modele peut avoir une "sd_l_table" contenant des grandeurs caractéristiques de l'étude :
+ lt = Facultatif(sd_l_table(SDNom(nomj='')))
+
+ # Si le modèle vient de MODI_MODELE_XFEM :
+ xfem = Facultatif(sd_modele_xfem(SDNom(nomj='')))
+
+
+ def check_existence(self,checker) :
+ exi_liel=self.MODELE.LIEL.exists
+ exi_maille=self.MAILLE.exists
+ exi_noeud=self.NOEUD.exists
+
+ # si .LIEL => .MAILLE et .NOEUD
+ if exi_liel :
+ assert exi_maille
+ assert exi_noeud
+
+
+ def check_maillage(self,checker) :
+ # on est obligé de checker le maillage pour permettre la creation de la sd_voisinage
+ lgrf=self.MODELE.LGRF.get_stripped()
+ sd2 = sd_maillage(lgrf[0]); sd2.check(checker)
+
--- /dev/null
+#@ MODIF sd_modele_gene SD DATE 11/05/2009 AUTEUR NISTOR I.NISTOR
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_interf_dyna_clas import sd_interf_dyna_clas
+#from SD.sd_base_modale import sd_base_modale
+from SD.sd_mode_meca import sd_mode_meca
+from SD.sd_macr_elem_dyna import sd_macr_elem_dyna
+from SD.sd_util import *
+
+
+
+class sd_modele_gene(AsBase):
+#-----------------------------
+ nomj = SDNom(fin=14)
+ MODG_LIPR = AsVI(SDNom(nomj='.MODG.LIPR'), )
+ MODG_LIDF = AsColl(SDNom(nomj='.MODG.LIDF'), acces='NU', stockage='DISPERSE', modelong='CONSTANT', type='K', ltyp=8, )
+ MODG_SSTR = AsColl(SDNom(nomj='.MODG.SSTR'), acces='NU', stockage='CONTIG', modelong='CONSTANT', type='R', ltyp=8, )
+ MODG_SSOR = AsColl(SDNom(nomj='.MODG.SSOR'), acces='NU', stockage='CONTIG', modelong='CONSTANT', type='R', ltyp=8, )
+ MODG_SSNO = AsPn(SDNom(nomj='.MODG.SSNO'), ltyp=8, )
+ MODG_SSME = AsColl(SDNom(nomj='.MODG.SSME'), acces='NU', stockage='CONTIG', modelong='CONSTANT', type='K', ltyp=8, )
+ MODG_DESC = AsVI(SDNom(nomj='.MODG.DESC'), lonmax=3, )
+ MODG_LIMA = AsColl(SDNom(nomj='.MODG.LIMA'), acces='NU', stockage='DISPERSE', modelong='VARIABLE', type='R', ltyp=8, )
+
+
+
+ def check_dimensions(self,checker) :
+ nb_struc=self.MODG_SSME.nmaxoc
+ nb_liaison=self.MODG_LIDF.nmaxoc
+
+ assert self.MODG_LIPR.lonmax == 9*nb_liaison
+ assert self.MODG_LIMA.nmaxoc == 3*nb_liaison
+ assert self.MODG_LIMA.nutioc == 3*nb_liaison
+
+ assert self.MODG_SSNO.nomuti == nb_struc
+ assert self.MODG_SSNO.nommax == nb_struc
+ assert self.MODG_SSOR.nmaxoc == nb_struc
+ assert self.MODG_SSOR.nutioc == nb_struc
+ assert self.MODG_SSTR.nmaxoc == nb_struc
+ assert self.MODG_SSTR.nutioc == nb_struc
+
+
+ def check_SSME(self,checker) :
+ nb_struc=self.MODG_SSME.nmaxoc
+ ssme=self.MODG_SSME.get()
+ for k in range(nb_struc) :
+ sd2=sd_macr_elem_dyna(ssme[k+1][0].strip()); sd2.check
+
+
+ def check_DESC(self,checker) :
+ desc=self.MODG_DESC.get()
+ nomgd=sdu_nom_gd(desc[2])
+ assert nomgd == 'DEPL_R', (nomgd, desc)
+ assert desc[0] > 2 and desc[0] < 15 , desc
+ assert desc[1] > 2*30 and desc[1] < 15*30 , desc
+
+
+ def check_SSOR(self,checker) :
+ nb_struc=self.MODG_SSME.nmaxoc
+ ssor=self.MODG_SSOR.get()
+ for k in range(nb_struc) :
+ assert len(ssor[k+1]) == 3 , ssor
+
+
+ def check_SSTR(self,checker) :
+ nb_struc=self.MODG_SSME.nmaxoc
+ sstr=self.MODG_SSTR.get()
+ for k in range(nb_struc) :
+ assert len(sstr[k+1]) == 3 , sstr
+
+
+ def check_LIDF(self,checker) :
+ lidf=self.MODG_LIDF.get()
+ nb_liaison=self.MODG_LIDF.nmaxoc
+ for k in range(nb_liaison) :
+ assert len(lidf[k+1]) == 5 , lidf
+ assert lidf[k+1][4].strip() in ('OUI', 'NON') , lidf
+
+
+ def check_LIPR_LIMA(self,checker) :
+ lipr=self.MODG_LIPR.get()
+ lima=self.MODG_LIMA.get()
+ nb_liaison=self.MODG_LIDF.nmaxoc
+ for k in range(nb_liaison) :
+ mat1_nlig=lipr[9*k+0] ; assert mat1_nlig > 0
+ mat1_ncol=lipr[9*k+1] ; assert mat1_ncol > 0
+ mat1_nume=lipr[9*k+2] ; assert mat1_nume == 3*k +1 , (mat1_nume, k)
+ assert len(lima[3*k+1]) == mat1_nlig*mat1_ncol
+
+ mat2_nlig=lipr[9*k+3] ; assert mat2_nlig > 0
+ mat2_ncol=lipr[9*k+4] ; assert mat2_ncol > 0
+ mat2_nume=lipr[9*k+5] ; assert mat2_nume == 3*k +2 , (mat2_nume, k)
+ assert len(lima[3*k+2]) == mat2_nlig*mat2_ncol
+
+ mat3_nlig=lipr[9*k+6] ; assert mat3_nlig > 0
+ mat3_ncol=lipr[9*k+7] ; assert mat3_ncol > 0
+ mat3_nume=lipr[9*k+8] ; assert mat3_nume == 3*k +3 , (mat3_nume, k)
+ assert len(lima[3*k+3]) == mat3_nlig*mat3_ncol
+
--- /dev/null
+#@ MODIF sd_multi_appui SD DATE 04/04/2007 AUTEUR ABBAS M.ABBAS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+from SD import *
+
+class sd_multi_appui(AsBase):
+#------------------------------------
+ nomj = SDNom(fin=19)
+
+ FDEP=AsVK8()
+ FVIT=AsVK8()
+ FACC=AsVK8()
+ MULA=AsVI()
+ PSID=AsVR()
--- /dev/null
+#@ MODIF sd_nume_ddl SD DATE 17/07/2007 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_solveur import sd_solveur
+
+from SD.sd_nume_ddl_gene import sd_nume_ddl_gene
+from SD.sd_nume_ddl_gd import sd_nume_ddl_gd
+
+
+#---------------------------------------------------------------------------------
+# classe "chapeau" à sd_nume_ddl_gene et sd_nume_ddl_gd ne servant que pour "check"
+#---------------------------------------------------------------------------------
+
+
+class sd_nume_ddl(AsBase):
+#--------------------------------------------
+ nomj = SDNom(fin=14)
+
+
+ # pour orienter vers sd_nume_ddl_gene ou sd_nume_ddl_gd :
+ def check_nume_ddl_i_GENE(self, checker):
+ gene= aster.jeveux_exists(self.nomj()[:14]+'.NUME.ORIG')
+ if gene :
+ sd2=sd_nume_ddl_gene(self.nomj)
+ else :
+ sd2=sd_nume_ddl_gd(self.nomj)
+ sd2.check(checker)
+
--- /dev/null
+#@ MODIF sd_nume_ddl_com SD DATE 03/11/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_solveur import sd_solveur
+from SD.sd_stockage import sd_stockage
+
+
+class sd_nume_ddl_com(sd_stockage):
+#----------------------------------
+ nomj = SDNom(fin=14)
+ NSLV = AsVK24(lonmax=1, )
+
+ # indirection vers SOLVEUR :
+ def check_nume_ddl_com_i_NSLV(self, checker):
+ lnom = self.NSLV.get()
+ if not lnom: return
+ sd2=sd_solveur(lnom[0]); sd2.check(checker)
+
+
--- /dev/null
+#@ MODIF sd_nume_ddl_gd SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_nume_ddl_com import sd_nume_ddl_com
+from SD.sd_nume_equa import sd_nume_equa
+
+
+class sd_nume_ddl_gd(sd_nume_ddl_com):
+#--------------------------------
+ nomj = SDNom(fin=14)
+ nume = sd_nume_equa(SDNom(nomj='.NUME'))
+ FETN = Facultatif(AsVK24())
--- /dev/null
+#@ MODIF sd_nume_ddl_gene SD DATE 03/11/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_nume_ddl_com import sd_nume_ddl_com
+from SD.sd_nume_eqge import sd_nume_eqge
+
+
+class sd_nume_ddl_gene(sd_nume_ddl_com):
+#---------------------------------------
+ nomj = SDNom(fin=14)
+ nume = Facultatif(sd_nume_eqge(SDNom(nomj='.NUME'))) # n'existe pas toujours : CALC_MATR_AJOU/fdlv106a
+
+
+
--- /dev/null
+#@ MODIF sd_nume_eqge SD DATE 11/02/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_prof_vgen import sd_prof_vgen
+class sd_nume_eqge(sd_prof_vgen):
+ nomj = SDNom(fin=19)
+ REFN = AsVK24(SDNom(debut=19), lonmax=4, )
+ DESC = AsVI(SDNom(debut=19), lonmax=1, )
+ NEQU = AsVI(SDNom(debut=19), lonmax=1, )
+ ORIG = AsColl(SDNom(debut=19), acces='NU', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+
+
--- /dev/null
+#@ MODIF sd_nume_equa SD DATE 03/11/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_prof_chno import sd_prof_chno
+class sd_nume_equa(sd_prof_chno):
+ nomj = SDNom(fin=19)
+ NEQU = AsVI(lonmax=2,)
+ DELG = AsVI( )
+ REFN = AsVK24(lonmax=4,)
+
+
--- /dev/null
+#@ MODIF sd_para_sensi SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_fonction import sd_fonction
+class sd_para_sensi(sd_fonction):
+ nomj = SDNom(fin=19)
+
+
--- /dev/null
+#@ MODIF sd_partition SD DATE 16/06/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2009 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.
+# ======================================================================
+
+from SD import *
+
+class sd_partition(AsBase):
+ nomj = SDNom(fin=8)
+ NUPROC_MAILLE = AsVI(SDNom(nomj='.NUPROC.MAILLE'))
+
--- /dev/null
+#@ MODIF sd_prof_chno SD DATE 03/11/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_prof_chno(AsBase):
+ nomj = SDNom(fin=19)
+ PRNO = AsColl( acces='NU', stockage='CONTIG', modelong=Parmi('CONSTANT', 'VARIABLE'), type='I', )
+ LILI = AsObject( genr='N', xous='S', type='K', ltyp=24, )
+ NUEQ = AsVI( )
+ DEEQ = AsVI( )
+
+
--- /dev/null
+#@ MODIF sd_prof_vgen SD DATE 21/02/2008 AUTEUR ANDRIAM H.ANDRIAMBOLOLONA
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_prof_vgen(AsBase):
+ nomj = SDNom(fin=19)
+ PRNO = AsColl(SDNom(debut=19), acces='NU', stockage='DISPERSE', modelong='VARIABLE', type='I', )
+ LILI = AsObject(SDNom(debut=19), genr='N', xous='S', type='K', ltyp=8, )
+ NUEQ = AsVI(SDNom(debut=19), )
+ DEEQ = AsVI(SDNom(debut=19), )
+ DELG = AsVI(SDNom(debut=19), )
+
+
--- /dev/null
+#@ MODIF sd_proj_mesu SD DATE 15/01/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from sd_modele import sd_modele
+
+
+
+class sd_proj_mesu(AsBase):
+#-------------------------------------
+ nomj = SDNom(fin=18)
+ PJMNO = AsVI()
+ PJMRG = AsVK8()
+ PJMBP = AsVR()
+ PJMRF = AsVK16(lonmax=5)
+
+ # si PROJ_MESU_MODAL :
+ PJMOR = Facultatif(AsVR())
+
+ # si MACR_ELEM_STAT :
+ PJMIG = Facultatif(AsVR())
+ PJMMM = Facultatif(AsObject(genr='V',type=Parmi('C', 'R')))
+
+
+ def exists(self):
+ # retourne .true. si la SD semble exister
+ return self.PJMNO.exists
+
+
+ def check_1(self, checker):
+ #------------------------------------
+ if not self.exists() : return
+
+ nbutil=self.PJMNO.lonuti
+ assert nbutil > 0 , nbutil
+
+ # vérifications communes :
+ assert self.PJMRG.lonmax >= nbutil
+ n1=self.PJMBP.lonmax
+ nbmode=n1/nbutil
+ assert n1==nbutil*nbmode , (nbmode,nbutil,n1)
+ assert self.PJMRF.exists
+ pjmrf=self.PJMRF.get_stripped()
+ sd2=sd_modele(pjmrf[0]) ; sd2.check(checker)
+ assert pjmrf[1] != '' , pjmrf
+ assert pjmrf[2] != '' , pjmrf
+
+ # quel cas de figure : PROJ_MESU_MODAL ou MACR_ELEM_STAT ?
+ lproj=self.PJMOR.exists
+
+ # si PROJ_MESU_MODAL :
+ if lproj :
+ nbcapt=nbutil
+ assert self.PJMOR.lonmax >= 3*nbcapt
+ assert not self.PJMIG.exists
+ assert pjmrf[3] == '' , pjmrf
+ assert pjmrf[4] == '' , pjmrf
+
+ # si MACR_ELEM_STAT :
+ else :
+ nbddle=nbutil
+ assert self.PJMIG.exists
+ assert self.PJMMM.exists
+ n1=self.PJMIG.lonmax
+ nbmoid=n1/nbddle
+ assert n1==nbddle*nbmoid , (nbmodi,nbddle,n1)
+
+ assert pjmrf[3] != '' , pjmrf
+ sd2=sd_proj_mesu(pjmrf[4]) ; sd2.check(checker)
+
--- /dev/null
+#@ MODIF sd_proj_modal SD DATE 04/04/2007 AUTEUR ABBAS M.ABBAS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+from SD import *
+
+class sd_proj_modal(AsBase):
+#------------------------------------
+ nomj = SDNom(fin=19)
+
+ MASG=AsVR()
+
+ AGEM=AsVR()
+ AGEP=AsVR()
+ VGEM=AsVR()
+ VGEP=AsVR()
+ DGEM=AsVR()
+ DGEP=AsVR()
+ RIGG=AsVR()
+ AMOG=AsVR()
+ BASM=AsVR()
+ FONG=Facultatif(AsVK24())
+ FORG=Facultatif(AsVR())
+
--- /dev/null
+#@ MODIF sd_reperage_1d SD DATE 30/06/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_reperage_1d(AsBase):
+ nomj = SDNom(fin=19)
+ TYPE = AsVI(SDNom(debut=19), )
+ EXTR = AsVR(SDNom(debut=19), )
+ ORIG = AsVR(SDNom(debut=19), )
+ def check_1(self,checker):
+ type=self.TYPE.get()
+ extr=self.EXTR.get()
+ orig=self.ORIG.get()
+ assert len(extr) == len(orig)
+ assert len(extr) == len(type)
+ for k in range(len(type)):
+ assert (type[k] <= 3) and (type[k] >= 1)
+
+
--- /dev/null
+#@ MODIF sd_reperage_omega SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_reperage_omega(AsBase):
+ nomj = SDNom(fin=13)
+ CREFF_EXTR = AsVR(SDNom(nomj='.CREFF.EXTR', debut=13), )
+ FACE__ORIG = AsVI(SDNom(nomj='.FACE .ORIG', debut=13), )
+ CREFF_ORIG = AsVR(SDNom(nomj='.CREFF.ORIG', debut=13), )
+ ARETE_EXTR = AsVI(SDNom(nomj='.ARETE.EXTR', debut=13), )
+ FACE__EXTR = AsVI(SDNom(nomj='.FACE .EXTR', debut=13), )
+ MAIL = AsColl(SDNom(debut=13), acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I', )
+ CREFM_ORIG = AsVR(SDNom(nomj='.CREFM.ORIG', debut=13), )
+ CREFM_EXTR = AsVR(SDNom(nomj='.CREFM.EXTR', debut=13), )
+ ARETE_ORIG = AsVI(SDNom(nomj='.ARETE.ORIG', debut=13), )
+
+
--- /dev/null
+#@ MODIF sd_resuelem SD DATE 06/05/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_ligrel import sd_ligrel
+
+
+class sd_resuelem(AsBase):
+ nomj = SDNom(fin=19)
+ NOLI = AsVK24(lonmax=4, )
+ DESC = AsVI(docu='RESL', )
+ RESL = AsColl(acces='NU', stockage='DISPERSE', modelong='VARIABLE', type=Parmi('C', 'R'))
+ RSVI = Facultatif(AsColl(acces='NU', stockage='CONTIG', modelong='VARIABLE', type='I'))
+
+ def exists(self):
+ # retourne "vrai" si la SD semble exister (et donc qu'elle peut etre vérifiée)
+ return self.NOLI.exists
+
+ def check_1(self, checker):
+ if not self.exists() : return
+ noli = self.NOLI.get_stripped()
+ sd2=sd_ligrel(noli[0]) ; sd2.check(checker)
+ assert noli[1] != '' , noli
+ assert noli[2] in ('MPI_COMPLET','MPI_INCOMPLET') , noli
+ assert noli[3] in ('','VOISIN_VF') , noli
+ if noli[3]=='VOISIN_VF' : assert self.RSVI.exists
+
+ desc = self.DESC.get()
+ assert desc[0] > 0 and desc[0] < 1000 , desc
+ nbgr=desc[1]
+ assert nbgr > 0 , desc
+ assert len(desc)==nbgr+2, desc
+ assert self.RESL.nmaxoc == nbgr, desc
+ for k in desc :
+ assert k >= 0, desc
--- /dev/null
+#@ MODIF sd_resultat SD DATE 10/11/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+
+from SD.sd_l_table import sd_l_table
+from SD.sd_champ import sd_champ
+from SD.sd_l_charges import sd_l_charges
+from SD.sd_char_contact import sd_char_contact
+from SD.sd_util import *
+
+
+class sd_resultat(sd_titre):
+#---------------------------------------
+ nomj = SDNom(fin=8)
+ TAVA = AsColl(SDNom(debut=19), acces='NU', stockage='CONTIG', modelong='CONSTANT', type='K', ltyp=8, )
+ NOVA = AsObject(SDNom(debut=19), genr='N', xous='S', type='K', ltyp=16, )
+ TACH = AsColl(SDNom(debut=19), acces='NU', stockage='CONTIG', modelong='CONSTANT', type='K', ltyp=24, )
+ ORDR = AsVI(SDNom(debut=19), )
+ DESC = AsObject(SDNom(debut=19), genr='N', xous='S', type='K', ltyp=16, )
+
+ NOEU = Facultatif(AsVK16(SDNom(debut=19))) # en attendant la correction de EL 12583
+
+ # la déclaration suivante simplifie la fonction check_resultat_i_char
+ CHAR = Facultatif(AsVK24(SDNom(debut=19),))
+
+ sd_l_table = Facultatif(sd_l_table(SDNom(nomj='')))
+
+
+ # existence de la SD :
+ def exists(self):
+ return self.ORDR.exists
+
+
+ # indirection vers les champs de .TACH :
+ def check_resultat_i_TACH(self, checker):
+ tach = self.TACH.get()
+ for nosym in tach.keys():
+ for nom in tach[nosym] :
+ if not nom.strip(): continue
+ sd2 = sd_champ(nom)
+ sd2.check(checker)
+
+
+ # indirection vers les objets de .TAVA :
+ def check_resultat_i_TAVA(self, checker):
+ tava = self.TAVA.get()
+ S1=set()
+ for knova in tava.keys():
+ suffix=tava[knova][0][:5]
+ if not suffix.strip(): continue # JP : est-ce possible ?
+ S1.add(suffix)
+ for suffix in S1 :
+ nom=self.nomj()[:19]+suffix
+ sd2 = AsObject(SDNom(nomj=nom,debut=0), xous='S', genr='V', type=Parmi('I','R','C','K'),
+ ltyp=Parmi(4,8,16,24),) ; sd2.check(checker)
+
+
+ # indirection vers les sd_l_charges stockées comme paramètres sous le nom EXCIT :
+ def check_resultat_i_EXCIT(self, checker):
+ lnom = self.CHAR.get()
+ if not lnom: return
+ S1=set()
+ for nom in lnom:
+ if not nom.strip(): continue
+ S1.add(nom)
+ for nom in S1 :
+ sd2 = sd_l_charges(nomj=nom); sd2.check(checker)
+
+
+ # vérification de .ORDR :
+ def check_ORDR(self, checker):
+ V = self.ORDR
+ nuti=V.lonuti
+ nmax=V.lonmax
+ sdu_compare(V, checker, nuti, '> ', 0 , comment='nuti > 0')
+ sdu_compare(V, checker, nuti, '<=', nmax, comment='nuti <= nmax')
+
+ # les numeros d'ordre doivent etre tous différents :
+ sdu_tous_differents(V,checker,V.get()[:nuti],'1:NUTI')
+
+
+ # vérification des longueurs des différents objets :
+ def check_LONGUEURS(self, checker):
+ ordr = self.ORDR.get()
+ tach = self.TACH.get()
+ nova = self.NOVA.get()
+ tava = self.TAVA.get()
+ desc = self.DESC.get()
+
+ nbmax_ordr=len(ordr) # la SD est concue pour stocker jusqu'à nbmax_ordr nume_ordre
+ nbmax_para=len(nova) # la SD est concue pour stocker jusqu'à nbmax_para paramètres
+ nbmax_nosym=len(desc) # la SD est concue pour stocker jusqu'à nbmax_nosym nom_cham
+
+ sdu_compare(self.TACH,checker,len(tach),'==',nbmax_nosym,'Incohérence TACH/DESC')
+ sdu_compare(self.TAVA,checker,len(tava),'==',nbmax_para, 'Incohérence TAVA/NOVA')
+
+ # .TACH
+ for ksym in tach.keys():
+ nosym=desc[ksym-1].strip()
+ sdu_compare(self.TACH,checker,len(tach[ksym]),'==',nbmax_ordr,nosym+' LONMAX(.TACH) != LONMAX(.ORDR)')
+
+
+ # objets trouvés dans .TAVA
+ for knova in tava.keys():
+ sdu_compare(tava,checker,len(tava[knova]),'==',4,'LONMAX(TAVA[ksym]==4')
+ suffix=tava[knova][0][:5]
+ npara=int(tava[knova][2])
+ if not suffix.strip(): continue
+ nom=self.nomj()[:19]+suffix
+ sd2 = AsObject(SDNom(nomj=nom,debut=0), xous='S', genr='V', type=Parmi('I','R','C','K'),
+ ltyp=Parmi(4,8,16,24),)
+ sdu_compare(sd2,checker,len(sd2.get()),'==',npara*nbmax_ordr,'Incohérence LONMAX / LONMAX(.ORDR)')
+
+
+ # vérifications supplémentaires :
+ def check_veri1(self, checker):
+ ordr = self.ORDR.get()
+ nova = self.NOVA.get()
+ tava = self.TAVA.get()
+
+ nbmax_ordr=len(ordr) # la SD est concue pour stocker jusqu'à nbmax_ordr nume_ordre
+ nbuti_ordr=self.ORDR.lonuti # la SD contient réellement nbuti_ordr nume_ordre
+
+
+ # objets trouvés dans .TAVA
+ for knova in tava.keys():
+ nova1=nova[knova-1].strip()
+ suffix=tava[knova][0][:5]
+ if not suffix.strip(): continue
+
+ nupara=int(tava[knova][1])
+ nbpara=int(tava[knova][2])
+ assert nupara <= nbpara, (nupara, nbpara)
+ acces=tava[knova][3].strip()
+ assert acces in ('PARA','ACCES') , acces
+
+ # on vérifie que les variables d'accès sont toutes différentes :
+ if acces == 'ACCES' :
+ # pour l'instant, on ne vérifie que 'INST' car 'FREQ', 'NUME_MODE', 'NOEUD_CMP' ne semblent pas tous différents ...
+ if nova1 != 'INST' : continue
+
+ nom=self.nomj()[:19]+suffix
+ sd2 = AsObject(SDNom(nomj=nom,debut=0),)
+ vect=sd2.get()
+ seq=[]
+ for k in range(nbuti_ordr) :
+ seq.append(vect[k*nbpara+nupara-1])
+
+ sdu_tous_differents(sd2,checker,seq,nova1)
+
+ # on vérifie les éventuelles sd_l_charge (EXCIT) :
+ if nova1=="EXCIT" :
+ nom=self.nomj()[:19]+suffix
+ sd2 = AsObject(SDNom(nomj=nom,debut=0),)
+ vect=sd2.get()
+ S1=set()
+ for k in range(nbuti_ordr) :
+ S1.add(vect[k*nbpara+nupara-1])
+ for nom in S1 :
+ if nom.strip() != '' :
+ sd2 = sd_l_charges(nomj=nom); sd2.check(checker)
+
+
--- /dev/null
+#@ MODIF sd_resultat_dyn SD DATE 11/05/2009 AUTEUR NISTOR I.NISTOR
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_resultat import sd_resultat
+from SD.sd_nume_ddl import sd_nume_ddl
+from SD.sd_matr_asse import sd_matr_asse
+from SD.sd_interf_dyna_clas import sd_interf_dyna_clas
+from SD.sd_proj_mesu import sd_proj_mesu
+
+
+class sd_resultat_dyn(sd_resultat):
+#--------------------------------------------------
+ nomj = SDNom(fin=8)
+ REFD = AsVK24(SDNom(debut=19), lonmax=7, )
+
+ # si utilisation de PROJ_MESU_MODAL :
+ PROJM = Facultatif(sd_proj_mesu())
+
+
+ # indirection vers les SD de .REFD :
+ def check_resultat_dyn_i_REFD(self, checker):
+ refd = self.REFD.get_stripped()
+ if not refd : return
+ for k in 0,1,2 :
+ if refd[k] :
+ sd2 = sd_matr_asse(refd[0]); sd2.check(checker)
+ if refd[3] :
+ sd2 = sd_nume_ddl(refd[3]); sd2.check(checker)
+ if refd[4] :
+ sd2 = sd_interf_dyna_clas(refd[4]); sd2.check(checker)
+
--- /dev/null
+#@ MODIF sd_sddyna SD DATE 04/04/2007 AUTEUR ABBAS M.ABBAS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+from SD import *
+
+class sd_sddyna(AsBase):
+#------------------------------------
+ nomj = SDNom(fin=15)
+
+ TYPE_SCH=AsVK16(SDNom(nomj='.TYPE_SCH'),lonmax=8)
+ PARA_SCH=Facultatif(AsVR( SDNom(nomj='.PARA_SCH'),lonmax=4))
+ INI_CONT=Facultatif(AsVR( SDNom(nomj='.INI_CONT'),lonmax=4))
+ NOM_SD =Facultatif(AsVK24(SDNom(nomj='.NOM_SD' ),lonmax=3))
+ TYPE_FOR=Facultatif(AsVI( SDNom(nomj='.TYPE_FOR'),lonmax=2))
+ COEF_SCH=Facultatif(AsVR( SDNom(nomj='.COEF_SCH'),lonmax=4))
+ INFO_SD =Facultatif(AsVL( SDNom(nomj='.INFO_SD' ),lonmax=5))
+
--- /dev/null
+#@ MODIF sd_solveur SD DATE 05/10/2009 AUTEUR BOITEAU O.BOITEAU
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_solveur(AsBase):
+ nomj = SDNom(fin=19)
+ SLVK = AsVK24(SDNom(debut=19), lonmax=11, )
+ SLVR = AsVR(SDNom(debut=19), lonmax=4, )
+ SLVI = AsVI(SDNom(debut=19), lonmax=7, )
+
+
+ def check_SLVK(self,checker):
+ #---------------------------------------------
+ slvk = self.SLVK.get_stripped()
+ method=slvk[0]
+ if method == 'MUMPS' :
+ assert slvk[1] in ('AUTO', 'SANS'), slvk
+ assert slvk[2] in ('NONSYM', 'SYMGEN', 'SYMDEF', 'AUTO'), slvk
+ assert slvk[3] in ('AMD','AMF','PORD','METIS','QAMD','AUTO'), slvk
+ assert slvk[4] in ('OUI', 'NON'), slvk
+ assert slvk[5] in ('OUI', 'NON'), slvk
+ else :
+ pass
+
+
--- /dev/null
+#@ MODIF sd_spectre SD DATE 19/06/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+from SD.sd_modele import sd_modele
+from SD.sd_cara_elem import sd_cara_elem
+from SD.sd_fonction import sd_fonction
+
+
+types_possibles=[ # liste des divers types de spectres :
+ 'SPEC_LONG_COR_1',
+ 'SPEC_LONG_COR_2',
+ 'SPEC_LONG_COR_3',
+ 'SPEC_LONG_COR_4',
+ 'SPEC_CORR_CONV_1',
+ 'SPEC_CORR_CONV_2',
+ 'SPEC_FONC_FORME',
+ 'SPEC_EXCI_POINT',]
+
+class sd_spectre(sd_titre):
+#------------------------------------
+ nomj = SDNom(fin=19)
+
+ VAIN = AsVI()
+ VATE = AsVK16()
+
+ VARE = Facultatif(AsVR())
+ VAVF = Facultatif(AsVK8(lonmax=1))
+ NNOE = Facultatif(AsVK8())
+
+
+ def u_type(self) :
+ vate=self.VATE.get()
+ type=vate[0].strip()
+ assert type in types_possibles
+ return type
+
+
+ def u_nbno(self) :
+ vain=self.VAIN.get()
+ intesp =vain[1]
+ nbno =vain[2]
+ return (intesp,nbno)
+
+
+ def check_VAIN(self,checker):
+ #-------------------------------
+ vain=self.VAIN.get()
+ itype=vain[0]
+ assert itype in (1,2,3,4,11,21) , vain
+
+ type = self.u_type()
+ if itype==1 : assert type in ('SPEC_LONG_COR_1', 'SPEC_CORR_CONV_1') ,vain
+ if itype==2 : assert type in ('SPEC_LONG_COR_2', 'SPEC_CORR_CONV_2') ,vain
+ if itype==3 : assert type in ('SPEC_LONG_COR_3',) ,vain
+ if itype==4 : assert type in ('SPEC_LONG_COR_4',) ,vain
+ if itype==11 : assert type in ('SPEC_FONC_FORME',) ,vain
+ if itype==21 : assert type in ('SPEC_EXCI_POINT',) ,vain
+
+ if type in ('SPEC_EXCI_POINT','SPEC_FONC_FORME') :
+ assert len(vain)==3, vain
+ assert vain[1] in (0,1) ,vain
+ assert vain[2] >=0 ,vain
+ else :
+ assert len(vain)==1, vain
+
+
+
+ def check_VARE(self,checker):
+ #-------------------------------
+ vare=self.VARE.get()
+ type = self.u_type()
+
+ if type == 'SPEC_FONC_FORME' :
+ assert not vare
+ return
+
+ elif type == 'SPEC_EXCI_POINT' :
+ intesp, nbno= self.u_nbno()
+ if intesp==0 :
+ assert len(vare)==nbno, vare
+ else :
+ assert len(vare)==1, vare
+
+ else :
+ assert len(vare)==12, vare
+
+
+
+ def check_VATE(self,checker):
+ #-------------------------------
+ vate=self.VATE.get_stripped()
+ type = self.u_type()
+
+ if type == 'SPEC_EXCI_POINT' :
+ #---------------------------------
+ intesp, nbno= self.u_nbno()
+ if intesp==0 :
+ assert len(vate)==4+nbno, vate
+ else :
+ assert len(vate)==5, vate
+ sd2=sd_cara_elem(vate[1]) ; sd2.check()
+ sd2=sd_modele(vate[2]) ; sd2.check()
+ if vate[3]=='GRAPPE_2' :
+ assert vate[4] in ('ASC_CEN','ASC_EXC','DES_CEN','DES_EXC')
+ else :
+ for x in vate[4:] :
+ assert x in ('FORCE','MOMENT')
+
+ elif type == 'SPEC_FONC_FORME' :
+ #---------------------------------
+ intesp, nbno= self.u_nbno()
+ if intesp==0 :
+ nbfonc=len(vate)-4
+ assert nbfonc>0, vate
+ else :
+ assert len(vate)==5, vate
+ sd2=sd_cara_elem(vate[1]) ; sd2.check()
+ sd2=sd_modele(vate[2]) ; sd2.check()
+ if vate[3]=='GRAPPE_1' :
+ assert vate[4] in ('DEBIT_180','DEBIT_300')
+ else :
+ for x in vate[4:] :
+ sd2=sd_fonction(x) ; sd2.check()
+
+ elif type == 'SPEC_LONG_COR_1' :
+ #---------------------------------
+ sd2=sd_fonction(vate[2]) ; sd2.check()
+ assert vate[3] == 'VISC_CINE'
+
+ elif type == 'SPEC_LONG_COR_2' :
+ #---------------------------------
+ sd2=sd_fonction(vate[2]) ; sd2.check()
+ assert vate[5] == 'BETA'
+
+ elif type == 'SPEC_LONG_COR_3' :
+ #---------------------------------
+ sd2=sd_fonction(vate[2]) ; sd2.check()
+ assert vate[7] == 'BETA_2'
+
+ elif type == 'SPEC_LONG_COR_4' :
+ #---------------------------------
+ sd2=sd_fonction(vate[2]) ; sd2.check()
+ assert vate[5] == 'GAMMA'
+
+ elif type == 'SPEC_CORR_CONV_1' :
+ #---------------------------------
+ assert vate[9] == 'COEF_VITE_FLUI_O'
+ assert vate[10] in ('GENERALE', 'CORCOS', 'AU_YANG')
+
+ elif type == 'SPEC_CORR_CONV_2' :
+ #---------------------------------
+ sd2=sd_fonction(vate[1]) ; sd2.check()
+ assert vate[4] in ('GENERALE', 'CORCOS', 'AU_YANG')
+ assert vate[6] == 'COEF_VITE_FLUI_O'
+
+
+
+ def check_VAVF(self,checker):
+ #-------------------------------
+ vavf=self.VAVF.get_stripped()
+ type = self.u_type()
+
+ if type in ('SPEC_FONC_FORME', 'SPEC_EXCI_POINT') :
+ assert not vavf
+ else :
+ sd2=sd_fonction(vavf[0]) ; sd2.check()
+
+
+
+ def check_NNOE(self,checker):
+ #-------------------------------
+ nnoe=self.NNOE.get()
+ type = self.u_type()
+
+ if type in ('SPEC_FONC_FORME', 'SPEC_EXCI_POINT') :
+ intesp, nbno= self.u_nbno()
+ assert len(nnoe) == nbno
+ else :
+ assert not nnoe
--- /dev/null
+#@ MODIF sd_squelette SD DATE 03/11/2008 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_maillage import sd_maillage
+from SD.sd_util import *
+
+
+class sd_squelette(sd_maillage):
+#-------------------------------
+ nomj = SDNom(fin=8)
+ inv_skeleton = Facultatif(AsVI(SDNom(nomj='.INV.SKELETON'),))
+
+ CORRES = Facultatif(AsVI())
+ NOMSST = Facultatif(AsVK8(SDNom(debut=17),))
+
+ # ENSEMBLE__ : TRANS , ANGL_NAUT
+ TRANS = Facultatif(AsVK8(lonmax=3))
+ ANGL_NAUT = Facultatif(AsVK8(lonmax=3))
+
+
+ def check_SKELETON(self,checker):
+ if not self.inv_skeleton.exists : return
+ skeleton=self.inv_skeleton.get()
+ dime=self.DIME.get()
+ nbno=dime[0]
+ assert len(skeleton)==2*nbno, (dime,len(skeleton))
+ for k in skeleton :
+ assert k > 0 , skeleton
+
+
+ def check_TRANS_ANGL_NAUT(self,checker):
+ trans =self.TRANS.get()
+ angl_naut =self.ANGL_NAUT.get()
+ assert (trans and angl_naut) or ((not trans) and (not angl_naut))
+
+
+ def check_CORRES(self,checker):
+ if not self.CORRES.exists : return
+ dime=self.DIME.get()
+ corres=self.CORRES.get()
+ sdu_tous_differents(self.CORRES,checker)
+ assert len(corres) == dime[0], (dime, len(corres))
--- /dev/null
+#@ MODIF sd_stoc_lciel SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_stoc_lciel(AsBase):
+ nomj = SDNom(fin=19)
+ SCDI = AsVI()
+ SCBL = AsVI()
+ SCHC = AsVI()
+ SCIB = AsVI()
+ SCDE = AsVI(lonmax=6)
+
+
--- /dev/null
+#@ MODIF sd_stoc_mltf SD DATE 08/06/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_stoc_mltf(AsBase):
+ nomj = SDNom(fin=19)
+ ADNT = AsVI()
+ ADPI = AsVI()
+ ADRE = AsVI()
+ ANCI = AsVI()
+ DECA = AsVI()
+ DESC = AsVI(lonmax=5,)
+ FILS = AsVI()
+ FRER = AsVI()
+ GLOB = AsVS()
+ LFRN = AsVI()
+ LGBL = AsVI()
+ LGSN = AsVI()
+ LOCL = AsVS()
+ NBAS = AsVI()
+ NBLI = AsVI()
+ NCBL = AsVI()
+ NOUV = AsVI()
+ RENU = AsVK8(lonmax=1,)
+ SEQU = AsVI()
+ SUPN = AsVI()
--- /dev/null
+#@ MODIF sd_stoc_morse SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+class sd_stoc_morse(AsBase):
+ nomj = SDNom(fin=19)
+ SMDE = AsVI(lonmax=6)
+ SMHC = AsVI()
+ SMDI = AsVI()
+
+
--- /dev/null
+#@ MODIF sd_stockage SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_stoc_mltf import sd_stoc_mltf
+from SD.sd_stoc_morse import sd_stoc_morse
+from SD.sd_stoc_lciel import sd_stoc_lciel
+
+class sd_stockage(AsBase):
+ nomj = SDNom(fin=14)
+ slcs = Facultatif(sd_stoc_lciel(SDNom(nomj='.SLCS')))
+ mltf = Facultatif(sd_stoc_mltf(SDNom(nomj='.MLTF')))
+ smos = sd_stoc_morse(SDNom(nomj='.SMOS'))
+
+
--- /dev/null
+#@ MODIF sd_surface SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_surface_1d import sd_surface_1d
+
+
+class sd_surface(AsBase):
+#-----------------------------
+ nomj = SDNom(fin=8)
+ NSDS = AsVK24(lonmax=1, )
+ NOMA = AsVK8(lonmax=1, )
+
+
+ # indirection vers sd_surface_1d :
+ def check_surface_i_NSDS(self, checker):
+ lnom = self.NSDS.get()
+ #if not lnom: return
+ sd2=sd_surface_1d(lnom[0]); sd2.check(checker)
+
+
--- /dev/null
+#@ MODIF sd_surface_1d SD DATE 22/10/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_reperage_1d import sd_reperage_1d
+from SD.sd_reperage_omega import sd_reperage_omega
+
+
+class sd_surface_1d(AsBase):
+#--------------------------------
+ nomj = SDNom(fin=13)
+ sgtel = sd_reperage_1d(SDNom(nomj='.SGTEL'))
+ repom = sd_reperage_omega(SDNom(nomj=''))
+ CONEX_ORIG = AsVI(SDNom(nomj='.CONEX.ORIG'))
+ CONEX_EXTR = AsVI(SDNom(nomj='.CONEX.EXTR'))
+ DESC = AsVR(SDNom(debut=13), lonmax=6, )
+
+
--- /dev/null
+#@ MODIF sd_table SD DATE 09/05/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+
+
+class sd_table(sd_titre):
+#-------------------------------------
+ nomj = SDNom(fin=17)
+ TBNP = AsVI(SDNom(debut=19), lonmax=2, )
+ TBBA = AsVK8(SDNom(debut=19), lonmax=1, )
+ TBLP = AsVK24(SDNom(debut=19), )
+
+
+ def exists(self):
+ # retourne "vrai" si la SD semble exister (et donc qu'elle peut etre vérifiée)
+ return self.TBNP.exists
+
+ def nb_column(self):
+ # retourne le nombre de colonnes de la table :
+ shape = self.TBNP.get()
+ return shape[0]
+
+ def get_column(self, i):
+ # retourne la colonne de numéro i
+ nom = self.nomj()[:19]+".%04d"%i
+ return Colonne( nom )
+
+ def get_column_name(self, name):
+ # retourne la colonne de nom name
+ shape = self.TBNP.get()
+ desc = self.TBLP.get()
+ for n in range(shape[0]):
+ nom = desc[4*n]
+ nom2= desc[4*n+2]
+ if nom.strip()==name.strip() :
+ return Colonne(nom2)
+ return None
+
+ def check_table_1(self, checker):
+ if not self.exists() : return
+ shape = self.TBNP.get()
+ desc = self.TBLP.get()
+ for n in range(shape[0]):
+ nom = desc[4*n+2]
+ col = Colonne(nom)
+ col.check(checker)
+ data = col.data.get()
+ if data is not None:
+ if col.data.lonuti != shape[1]:
+ checker.err(self,"Taille inconsitante %d!=%d" %
+ (col.data.lonuti,shape[1]))
+
+class Colonne(AsBase):
+ nomj = SDNom(debut=0, fin=24)
+ data = OJBVect(SDNom(" ",debut=17,fin=19))
+ mask = OJBVect(SDNom("LG",debut=17,fin=19))
--- /dev/null
+#@ MODIF sd_table_container SD DATE 28/07/2009 AUTEUR TORKHANI M.TORKHANI
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2008 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_table import sd_table, Colonne
+from SD.sd_vect_elem import sd_vect_elem
+from SD.sd_matr_elem import sd_matr_elem
+from SD.sd_cham_elem import sd_cham_elem
+from SD.sd_mode_meca import sd_mode_meca
+# --------------------------------------------------------------------
+# sd_table contenant les colonnes nommée "NOM_OBJET","TYPE_OBJET",
+# et "NOM_SD"
+# --------------------------------------------------------------------
+
+
+
+class sd_table_container(sd_table):
+#-------------------------------------
+ nomj = SDNom(fin=19)
+
+ def check_table_container(self, checker):
+
+ # vérification de l'existence de la table
+ if not self.exists() :
+ checker.err(self,"La sd_table_container %s ne semble"
+ +"pas exister" %(nomj))
+
+ # on vérifie la présence des paramètres
+ # 'NOM_OBJET','TYPE_OBJET','NOM_SD'
+ param=['NOM_OBJET','TYPE_OBJET','NOM_SD']
+ shape = self.TBNP.get()
+ assert shape[0]>2 # la table à au moins 3 paramètres
+ for n in param:
+ col=self.get_column_name(n)
+ if col == None:
+ checker.err(self,"Paramètre %s manquant!" %(n))
+
+ # on vérifie que les colonnes ne sont pas vides
+ data = col.data.get()
+ if data is not None:
+ if col.data.lonuti != shape[1]:
+ checker.err(self,"Taille inconsitante %d!=%d" %
+ (col.data.lonuti,shape[1]))
+
+
+ # on vérifie le contenu de la colonne NOM_SD
+ col1=self.get_column_name('TYPE_OBJET')
+ col2=self.get_column_name('NOM_SD')
+ nbli=col1.data.lonuti
+ lnom1=col1.data.get_stripped()
+ lnom2=col2.data.get_stripped()
+ for k in range(nbli):
+ if lnom1[k][:9]=='VECT_ELEM':
+ sd5=sd_vect_elem(lnom2[k])
+ sd5.check(checker)
+ elif lnom1[k][:9]=='MATR_ELEM':
+ sd5=sd_matr_elem(lnom2[k])
+ sd5.check(checker)
+ elif lnom1[k][:9]=='CHAM_ELEM':
+ sd5=sd_cham_elem(lnom2[k])
+ sd5.check(checker)
+ elif lnom1[k][:11]=='MODE_MECA':
+ sd5=sd_mode_meca(lnom2[k])
+ sd5.check(checker)
+ else:
+ assert 0,lnom1[k]
+
--- /dev/null
+#@ MODIF sd_table_fonction SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_table import sd_table, Colonne
+from SD.sd_fonction import sd_fonction
+
+# --------------------------------------------------------------------
+# sd_table dont une colonne nommée "FONCTION[_C]" contient des fonctions
+# --------------------------------------------------------------------
+
+
+
+class sd_table_fonction(sd_table):
+#-------------------------------------
+ nomj = SDNom(fin=17)
+
+
+ def check_table_fonction_i_COL_FONC(self, checker):
+ shape = self.TBNP.get()
+ if shape is None: return
+ desc = self.TBLP.get()
+ for n in range(shape[0]):
+ nomcol=desc[4*n].strip()
+ if not (nomcol == 'FONCTION' or nomcol == 'FONCTION_C') : continue
+ nom = desc[4*n+2]
+ col = Colonne(nom)
+ lnom = col.data.get()
+ if not lnom : return
+ for nom1 in lnom :
+ if not nom1.strip() : continue
+ sd2=sd_fonction(nom1) ; sd2.check(checker)
--- /dev/null
+#@ MODIF sd_titre SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+# -----------------------------------------------------------------------------
+# Description de la structure de données
+class sd_titre(AsBase):
+ TITR = AsVK80(SDNom(debut=19), optional=True)
+
--- /dev/null
+#@ MODIF sd_tran_gene SD DATE 11/05/2009 AUTEUR NISTOR I.NISTOR
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_titre import sd_titre
+from SD.sd_nume_ddl_gene import sd_nume_ddl_gene
+from SD.sd_matr_asse_gene import sd_matr_asse_gene
+from SD.sd_proj_mesu import sd_proj_mesu
+from SD.sd_util import *
+
+
+class sd_tran_gene(sd_titre) :
+#--------------------------------------
+ nomj = SDNom(fin=19)
+
+ # objets commencant en 19 :
+ ACCE = AsVR() # gros objet
+ VITE = AsVR() # gros objet
+ DEPL = AsVR() # gros objet
+
+ INST = AsVR() # gros objet
+ ORDR = AsVI() # gros objet
+ DESC = AsVI(lonmax=5, )
+# REFD = AsVK24(lonmax=6, )
+ REFD = AsVK24(lonmax=7, )
+ PTEM = AsVR()
+
+ # si CHOC :
+ DLOC = Facultatif(AsVR())
+ ICHO = Facultatif(AsVI())
+ INTI = Facultatif(AsVK8())
+ FCHO = Facultatif(AsVR())
+ NCHO = Facultatif(AsVK8())
+ SST = Facultatif(AsVK8())
+ VCHO = Facultatif(AsVR())
+ VINT = Facultatif(AsVR())
+
+ # si nbexcit > 0 :
+ FACC = Facultatif(AsVK8())
+ FDEP = Facultatif(AsVK8())
+ FVIT = Facultatif(AsVK8())
+ IPSD = Facultatif(AsVR())
+
+ # si RELA_EFFO_DEPL :
+ REDN = Facultatif(AsVK24(lonmax=1, ))
+ REDC = Facultatif(AsVI())
+ REDD = Facultatif(AsVR())
+
+ # si utilisation de PROJ_MESU_MODAL :
+ PROJM = Facultatif(sd_proj_mesu(SDNom(debut=8)))
+
+
+
+
+ def u_dime(self):
+ desc=self.DESC.get()
+ nbmode=desc[1] ; assert nbmode > 0
+ nbchoc=desc[2] ; assert nbchoc >= 0
+ nbrede=desc[3] ; assert nbmode >= 0
+ nbsauv=self.ORDR.lonmax ; assert nbsauv > 0
+ if self.FACC.exists :
+ nbexcit=self.FACC.lonmax / 2 ; assert nbexcit >= 0
+ else :
+ nbexcit=0
+ return (nbmode, nbchoc, nbsauv, nbexcit, nbrede)
+
+
+ def check_DESC(self,checker):
+ desc=self.DESC.get()
+ assert desc[0] in (1,2,3) , desc
+
+
+ def check_REFD(self,checker):
+ # AJACOT : j'avais cru comprendre des choses ... mais sdld104a me prouve le contraire !
+ # à revoir ?????
+ return
+ refd=self.REFD.get_stripped()
+ assert refd[0] != '' , refd
+ sd2= sd_matr_asse_gene(refd[0]) ; sd2.check()
+ assert refd[1] != '' , refd
+ sd2= sd_matr_asse_gene(refd[0]) ; sd2.check()
+ if refd[2] != '' :
+ sd2= sd_matr_asse_gene(refd[2]) ; sd2.check()
+ assert refd[3] != '' , refd
+ sd2= sd_nume_ddl_gene(refd[3]) ; sd2.check()
+ assert refd[4] == '' , refd
+ # test de refd[5] trop compliqué : je craque !
+
+
+ def check_ORDR_INST_PTEM(self,checker):
+ nbmode, nbchoc, nbsauv, nbexcit, nbrede = self.u_dime()
+ assert self.ORDR.lonmax == nbsauv
+ assert self.INST.lonmax == nbsauv
+ assert self.PTEM.lonmax in (1, nbsauv)
+ sdu_tous_differents(self.ORDR,checker) # AJACOT_PB : j'aimerais bien "tous_différents"
+ sdu_tous_differents(self.INST,checker) # mais il y a sdld102a => fiche à émettre ?
+
+
+ def check_DEPL_VITE_ACCE(self,checker):
+ nbmode, nbchoc, nbsauv, nbexcit, nbrede = self.u_dime()
+ assert self.DEPL.lonmax == nbsauv*nbmode
+ assert self.VITE.lonmax == nbsauv*nbmode
+ assert self.ACCE.lonmax == nbsauv*nbmode
+
+
+ def check_CHOC(self,checker):
+ nbmode, nbchoc, nbsauv, nbexcit, nbrede = self.u_dime()
+ if nbchoc == 0 : return
+ assert self.DLOC.lonmax == 6*nbsauv*nbchoc
+ assert self.VCHO.lonmax == 3*nbsauv*nbchoc
+ assert self.FCHO.lonmax == 3*nbsauv*nbchoc
+ assert self.INTI.lonmax == nbchoc
+ assert self.ICHO.lonmax == nbsauv*nbchoc
+ assert self.NCHO.lonmax == 2*nbchoc
+ assert self.VINT.lonmax == nbsauv*nbchoc
+ assert self.SST.lonmax == 2*nbchoc
+
+
+ def check_EXCIT(self,checker):
+ nbmode, nbchoc, nbsauv, nbexcit, nbrede = self.u_dime()
+ if nbexcit == 0 : return
+ assert self.FACC.lonmax == 2*nbexcit
+ assert self.FDEP.lonmax == 2*nbexcit
+ assert self.FVIT.lonmax == 2*nbexcit
+ #assert self.IPSD.lonmax == nbexcit*neq # JP : neq != nbmode. Que vaut neq ??
+
+
+ def check_RELA_DEPL(self,checker):
+ nbmode, nbchoc, nbsauv, nbexcit, nbrede = self.u_dime()
+ if nbrede == 0 : return
+ assert self.REDC.lonmax == nbsauv*nbrede
+ assert self.REDD.lonmax == nbsauv*nbrede
+ assert self.REDN.lonmax == nbrede
+
--- /dev/null
+#@ MODIF sd_type_flui_stru SD DATE 09/05/2007 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_cara_elem import sd_cara_elem
+from SD.sd_modele import sd_modele
+from SD.sd_fonction import sd_fonction
+from SD.sd_mater import sd_mater
+from SD.sd_util import *
+
+
+class sd_type_flui_stru(AsBase):
+#===============================================================
+ nomj = SDNom(fin=8)
+ FSIC = AsVI(SDNom(debut=19),lonmax=2,)
+
+ FSGM = Facultatif(AsVK8(SDNom(debut=19)))
+ FSVR = Facultatif(AsVR(SDNom(debut=19)))
+ FSVK = Facultatif(AsVK8(SDNom(debut=19)))
+ FSVI = Facultatif(AsVI(SDNom(debut=19)))
+ FSCR = Facultatif(AsVR(SDNom(debut=19)))
+ FSGR = Facultatif(AsVR(SDNom(debut=19)))
+ UNIT_FAISCEAU = Facultatif(AsVI(lonmax=2,))
+ UNIT_GRAPPES = Facultatif(AsVI(lonmax=2,))
+
+
+ def exists(self):
+ # retourne "vrai" si la SD semble exister (et donc qu'elle peut etre vérifiée)
+ return self.FSIC.exists
+
+
+ def u_veri1(self):
+ #-----------------------
+ # retourne 2 variables utiles pour les routines chech_xxxx
+ # type_faisceau : type de faisceau (configuration)
+ # couplage : indicateur de couplage
+ fsic=self.FSIC.get()
+ type_faisceau=fsic[0]
+ couplage=fsic[1]
+ return type_faisceau, couplage
+
+
+
+ def check_FSIC(self,checker): # objet .FSIC
+ #===============================================================
+ fsic=self.FSIC.get()
+ type_faisceau, couplage= self.u_veri1()
+ assert type_faisceau in (1,2,3,4), (type_faisceau, fsic)
+ assert couplage in (0,1), (couplage,fsic)
+
+
+
+ def check_FSVI(self,checker): # objet .FSVI
+ #===============================================================
+ fsvi=self.FSVI.get()
+ type_faisceau, couplage= self.u_veri1()
+
+ if type_faisceau == 1 : # FAISCEAU_TRANS
+ #-----------------------------------------
+ nbzone=fsvi[1]
+ sdu_compare(self.FSVI,checker,nbzone,'>',0,"nbzone > 0")
+ if couplage :
+ assert len(fsvi)==2+2*nbzone, fsvi
+ assert fsvi[0] in (1,2), fsvi
+ for indic in fsvi[2:2+nbzone] :
+ assert indic > 0 , (nbzone,fsvi,self)
+ for nbpt in fsvi[2+nbzone:2+2*nbzone] :
+ assert nbpt >= 0 , (nbzone,fsvi,self) # =0 possible : sdll136a
+ else :
+ assert len(fsvi)==2
+
+ if type_faisceau == 2 : # GRAPPE
+ #-----------------------------------------
+ sdu_assert(self.FSVI, checker, not fsvi, "type_faisceau == GRAPPE => FSVI ne doit pas exister")
+
+ if type_faisceau == 3 : # FAISCEAU_AXIAL
+ #-----------------------------------------
+ lsimplif=fsvi[0]
+ # lsimplif=1 : faisceau simplifié
+ # lsimplif=0 : faisceau complet
+
+ nbtype=fsvi[4] # nombre de types de grille
+ lgrille=nbtype > 0
+ # lgrille=1 : on utilise des grilles
+ # lgrille=0 : on n'utilise pas de grille
+
+ assert fsvi[0] in (0,1), fsvi
+ assert fsvi[1] in (1,2,3), fsvi
+ assert fsvi[2] in (1,2), fsvi
+
+ if not lsimplif : # faisceau complet
+ if lgrille :
+ assert len(fsvi)==6+nbtype, fsvi
+ assert min(fsvi[3:]) > 0, fsvi
+ else:
+ assert len(fsvi)==5, fsvi
+ assert fsvi[3] >= 0, fsvi
+
+ else : # faisceau simplifié
+ nbzone=fsvi[3]
+ if lgrille :
+ assert len(fsvi)==6+nbtype+nbzone, fsvi
+ assert min(fsvi[3:]) > 0, fsvi
+ else:
+ assert len(fsvi)==6+nbzone, fsvi
+ assert fsvi[3] > 0, fsvi
+
+ if type_faisceau == 4 : # COQUE_COAX
+ #-----------------------------------------
+ assert len(fsvi)==2, fsvi
+ assert fsvi[0] in (0,1), fsvi
+ assert fsvi[1] in (1,2,3), fsvi
+
+
+
+ def check_FSVK(self,checker): # objet .FSVK
+ #===============================================================
+ fsvk=self.FSVK.get()
+ fsvi=self.FSVI.get()
+ type_faisceau, couplage= self.u_veri1()
+
+ if type_faisceau == 1 : # FAISCEAU_TRANS
+ #-----------------------------------------
+ nbzone=fsvi[1]
+ assert len(fsvk)==4+nbzone, fsvk
+ carel=fsvk[0].strip()
+ assert carel != '', fsvk
+ sd2=sd_cara_elem(carel); sd2.check(checker)
+ assert fsvk[1].strip() in ('DX', 'DY', 'DZ'), fsvk
+ for k in range(2,4+nbzone) :
+ sd2=sd_fonction(fsvk[k]); sd2.check(checker)
+
+ elif type_faisceau == 2 : # GRAPPE
+ #-----------------------------------------
+ if couplage :
+ assert len(fsvk)==4,(fsvk,self)
+ assert fsvk[0] != '',(fsvk,self)
+ # on pourrait vérifier que fsvk[1] est un nom de noeud
+ assert fsvk[1] != '',(fsvk,self)
+ sd2=sd_cara_elem(fsvk[2].strip()); sd2.check(checker)
+ sd2=sd_modele(fsvk[3].strip()); sd2.check(checker)
+ else:
+ assert not fsvk,(fsvk,self)
+
+ elif type_faisceau == 3 : # FAISCEAU_AXIAL
+ #-----------------------------------------
+ lsimplif=fsvi[0]
+ if not lsimplif :
+ assert len(fsvk)==3,(fsvk,self)
+ sd2=sd_fonction(fsvk[0].strip()); sd2.check(checker)
+ sd2=sd_fonction(fsvk[1].strip()); sd2.check(checker)
+ sd2=sd_cara_elem(fsvk[2].strip()); sd2.check(checker)
+ else:
+ assert len(fsvk)==2,(fsvk,self)
+ sd2=sd_fonction(fsvk[0].strip()); sd2.check(checker)
+ sd2=sd_fonction(fsvk[1].strip()); sd2.check(checker)
+
+ elif type_faisceau == 4 : # COQUE_COAX
+ #-----------------------------------------
+ assert len(fsvk)==3,(fsvk,self)
+ sd2=sd_cara_elem(fsvk[0].strip()); sd2.check(checker)
+ sd2=sd_mater(fsvk[1].strip()); sd2.check(checker)
+ sd2=sd_mater(fsvk[2].strip()); sd2.check(checker)
+
+
+
+ def check_FSVR(self,checker): # objet .FSVR
+ #===============================================================
+ fsvr=self.FSVR.get()
+ fsvi=self.FSVI.get()
+ type_faisceau, couplage= self.u_veri1()
+
+ if type_faisceau == 1 : # FAISCEAU_TRANS
+ #-----------------------------------------
+ nbzone=fsvi[1]
+ if couplage :
+ assert len(fsvr)==3+2*nbzone,(fsvr,self)
+ else :
+ assert len(fsvr)==1,(fsvr,self)
+ sdu_tous_compris(self.FSVR,checker,vmin=0.,comment="FSVR > 0")
+
+ elif type_faisceau == 2 : # GRAPPE
+ #-----------------------------------------
+ if couplage :
+ assert len(fsvr)==2,(fsvr,self)
+ sdu_tous_compris(self.FSVR,checker,vmin=0.,comment="FSVR > 0")
+ else :
+ assert not fsvr,(fsvr,self)
+
+ elif type_faisceau == 3 : # FAISCEAU_AXIAL
+ #-----------------------------------------
+ lsimplif=fsvi[0]
+ if not lsimplif :
+ if fsvi[2]==1 : # enceinte circulaire
+ assert len(fsvr)==8,(fsvr,self)
+ else: # enceinte rectangulaire
+ assert len(fsvr)==10,(fsvr,self)
+ else :
+ nbzone=fsvi[3]
+ if fsvi[2]==1 : # enceinte circulaire
+ assert len(fsvr)==8+nbzone,(fsvr,self)
+ sdu_tous_compris(self.FSVR,checker,fsvi[8:],vmin=0.,comment="FSVR > 0")
+ else: # enceinte rectangulaire
+ assert len(fsvr)==10+nbzone,(fsvr,self)
+ sdu_tous_compris(self.FSVR,checker,fsvi[10:],vmin=0.,comment="FSVR > 0")
+
+ elif type_faisceau == 4 : # COQUE_COAX
+ #-----------------------------------------
+ assert len(fsvr)==7,(fsvr,self)
+ sdu_tous_compris(self.FSVR,checker,vmin=0.,comment="FSVR > 0")
+
+
+
+ def check_FSGM(self,checker): # objet .FSGM
+ #===============================================================
+ fsgm=self.FSGM.get()
+ fsvi=self.FSVI.get()
+ type_faisceau, couplage= self.u_veri1()
+
+ if type_faisceau in (1,2) :
+ #-----------------------------------------
+ assert not fsgm,(fsvi,self)
+
+ elif type_faisceau == 3 : # FAISCEAU_AXIAL
+ #-----------------------------------------
+ nb1=fsvi[3] # nbgrma ou nbzone
+ if nb1==0 :
+ assert len(fsgm)==1,(fsgm,self)
+ else :
+ assert len(fsgm)==nb1,(fsgm,self)
+ sdu_tous_differents(self.FSGM,checker,comment='FAISCEAU_AXIAL')
+
+ elif type_faisceau == 4 : # COQUE_COAX
+ #-----------------------------------------
+ assert len(fsgm)==2,(fsgm,self)
+ sdu_tous_differents(self.FSGM,checker,comment='COQUE_COAX')
+
+
+
+ def check_FSGR(self,checker): # objet .FSGR
+ #===============================================================
+ fsgr=self.FSGR.get()
+ fsvi=self.FSVI.get()
+ type_faisceau, couplage= self.u_veri1()
+
+ if type_faisceau in (1,2,4) :
+ #-----------------------------------------
+ assert not fsgr,(fsvi,self)
+
+ elif type_faisceau ==3 :
+ #-----------------------------------------
+ nbzone=fsvi[3]
+ nbtype=fsvi[4] # nombre de types de grille
+ if nbtype==0 :
+ assert not fsgr,(fsvi,self)
+ else : # il y a des grilles
+ lsimplif=fsvi[0]
+ if lsimplif :
+ nbgrille=fsvi[6+nbzone]
+ else :
+ nbgrille=fsvi[5]
+ assert len(fsgr)==nbgrille+6*nbtype,(fsgr,self)
+
+
+
+ def check_FSCR(self,checker): # objet .FSCR
+ #===============================================
+ fscr=self.FSCR.get()
+ fsvi=self.FSVI.get()
+ type_faisceau, couplage= self.u_veri1()
+
+ if type_faisceau in (1,2,4) :
+ #-----------------------------------------
+ assert not fscr,(fsgm,self)
+
+ elif type_faisceau ==3 :
+ #-----------------------------------------
+ lsimplif=fsvi[0]
+ if lsimplif :
+ nbtube=fsvi[5]
+ assert len(fscr)==2*nbtube,(fscr,self)
+ else :
+ assert not fscr,(fsvi,self)
+
+
+
+ def check_UNIT_FAISCEAU(self,checker): # objet .UNIT.FAISCEAU
+ #===============================================================
+ unite=self.UNIT_FAISCEAU.get()
+ fsvi=self.FSVI.get()
+ type_faisceau, couplage= self.u_veri1()
+
+ if type_faisceau in (2,3,4) :
+ #-----------------------------------------
+ assert not unite,(fsvi,self)
+
+ elif type_faisceau == 1 :
+ #-----------------------------------------
+ assert len(unite)==2,(unite,self)
+ assert unite[0] > 0 ,(unite,self)
+ assert unite[1] > 0 ,(unite,self)
+
+
+
+ def check_UNIT_GRAPPES(self,checker): # objet .UNIT.GRAPPES
+ #===============================================================
+ unite=self.UNIT_GRAPPES.get()
+ fsvi=self.FSVI.get()
+ type_faisceau, couplage= self.u_veri1()
+
+ if type_faisceau in (1,3,4) :
+ #-----------------------------------------
+ assert not unite,(fsvi,self)
+
+ elif type_faisceau == 2 :
+ #-----------------------------------------
+ if couplage :
+ assert len(unite)==2,(unite,self)
+ assert unite[0] > 0 ,(unite,self)
+ assert unite[1] > 0 ,(unite,self)
+ else :
+ assert not unite, (fsic,self)
--- /dev/null
+#@ MODIF sd_util SD DATE 10/11/2009 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+"""
+ Utilitaires pour la vérification des SD
+"""
+
+# pour utilisation dans eficas
+try:
+ import aster
+except:
+ pass
+
+import copy
+
+
+# 1) Utilitaires pour vérifier certaines propriétés.
+# Ces utilitaires ne provoquent pas d'arret mais écrivent des messages dans un "checker"
+# -----------------------------------------------------------------------------------------
+
+
+# 1.1 Utilitaires pour des scalaires :
+# ------------------------------------
+
+def sdu_assert(ojb, checker, bool,comment=''):
+ # Vérifie que le booléen (bool) est vrai
+ if not bool :
+ checker.err(ojb, "condition non respectée : (%s)" % (comment,))
+
+def sdu_compare(ojb, checker, val1, comp, val2, comment=''):
+ # Vérifie que la relation de comparaison entre val1 et val2 est respectée :
+ # comp= '==' / '!=' / '>=' / '>' / '<=' / '<'
+ comp=comp.strip()
+ ok = 0
+ if comp == "==" :
+ ok = val1 == val2
+ elif comp == "!=" :
+ ok = val1 != val2
+ elif comp == ">=" :
+ ok = val1 >= val2
+ elif comp == "<=" :
+ ok = val1 <= val2
+ elif comp == ">" :
+ ok = val1 > val2
+ elif comp == "<" :
+ ok = val1 < val2
+ else :
+ sdu_assert(ojb, checker, 0, 'sdu_compare: opérateur de comparaison interdit: '+comp)
+
+ if not ok :
+ checker.err(ojb, "condition non respectée : %s %s %s (%s)" % (val1,comp,val2,comment))
+
+
+# 1.2 Utilitaires pour des séquences :
+# ------------------------------------
+
+def sdu_tous_differents(ojb,checker,sequence=None,comment=''):
+ # Vérifie que les éléments de la séquence sont tous différents.
+ # Si l'argument sequence est None, on prend l'ensemble de l'ojb.
+
+ if sequence :
+ seq=sequence
+ else :
+ seq=ojb.get()
+
+ sdu_compare(ojb, checker, len(seq), '==', len(set(seq)), comment='Tous différents: '+comment)
+
+
+def sdu_tous_non_blancs(ojb,checker,sequence=None,comment=''):
+ # Vérifie que les éléments (chaines) de la séquence sont tous "non blancs".
+ # Si l'argument sequence est None, on prend l'ensemble de l'ojb.
+
+ if sequence :
+ seq=sequence
+ else :
+ seq=ojb.get()
+
+ for elem in seq :
+ assert len(elem.strip()) > 0 , (seq,self, 'tous "non blancs" '+comment)
+
+
+def sdu_tous_compris(ojb,checker,sequence=None,vmin=None,vmax=None,comment=''):
+ # Vérifie que toutes les valeurs de la sequence sont comprises entre vmin et vmax
+ # Les bornes vmin et vmax sont autorisées
+ # Si l'argument sequence est None, on prend l'ensemble de l'ojb.
+
+ assert (not vmin is None) or (not vmax is None),'Il faut fournir au moins une des valeurs vmin ou vmax'
+ if sequence :
+ seq=sequence
+ else:
+ seq=ojb.get()
+
+ ier = 0
+ for v in seq :
+ if vmin and v < vmin : ier = 1
+ if vmax and v > vmax : ier = 1
+ if ier == 1 : checker.err( ojb, "L'objet doit contenir des valeurs dans l'intervalle : [%s, %s] " % (vmin,vmax))
+
+
+
+def sdu_monotone(seqini) :
+ #-------------------------------
+ # vérifie qu'une séquence est triée par ordre croissant (ou décroissant)
+ # retourne :
+ # 3 : ni croissant ni décroissant (désordre)
+ # 1 : croissant
+ # -1 : décroissant
+ # 0 : constant
+
+ n=len(seqini)
+ if isinstance(seqini,tuple) :
+ seq=list(seqini)
+ else :
+ seq=seqini
+
+ seq2=copy.deepcopy(seq)
+ seq2.sort()
+ seq3=copy.deepcopy(seq)
+ seq3.sort()
+ seq3.reverse()
+
+ croiss=1
+ decroiss=1
+ for k in range(n) :
+ if seq[k] != seq2[k] :
+ croiss=0
+ if seq[k] != seq3[k] :
+ decroiss=0
+
+ if croiss==1 and decroiss==1 :
+ return 0
+ elif croiss==1 and decroiss==0 :
+ return 1
+ elif croiss==0 and decroiss==1 :
+ return -1
+ elif croiss==0 and decroiss==0 :
+ return 3
+
+
+
+# 2) Utilitaires de questionnement :
+# -----------------------------------------------------------------------------------------
+
+def sdu_nom_gd(numgd) :
+ # retourne le nom de la grandeur de numéro (numgd)
+ assert numgd > 0 and numgd <1000 , numgd
+ ptn=aster.getvectjev('&CATA.GD.NOMGD')
+ return ptn[numgd-1].strip()
+
+def sdu_licmp_gd(numgd) :
+ # retourne la liste des cmps de la grandeur de numéro (numgd)
+ nomgd=sdu_nom_gd(numgd)
+ nocmp=aster.getcolljev('&CATA.GD.NOMCMP')
+ return nocmp[nomgd.ljust(8)]
+
+
+
+# 3) Utilitaires pour la vérification de l'existence des objets :
+# -----------------------------------------------------------------------------------------
+
+def sdu_ensemble(lojb) :
+ # vérifie que les objets JEVEUX de lojb existent simultanément :
+ assert len(lojb) > 1 , lojb
+ lexi=[]
+ for obj1 in lojb :
+ lexi.append(obj1.exists)
+ for x in lexi[1:] :
+ assert x==lexi[0] , (lojb,lexi)
--- /dev/null
+#@ MODIF sd_vect_elem SD DATE 08/06/2009 AUTEUR PELLET J.PELLET
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+from SD.sd_matr_elem import sd_matr_elem
+
+class sd_vect_elem(sd_matr_elem):
+ nomj = SDNom(fin=19)
+ RELC = Facultatif(AsColl(acces='NO', stockage='CONTIG', modelong='CONSTANT', type='I', ))
+
+
+ def check_RELC(self, checker):
+ if not self.RELC.exists : return
+ lchar = self.RELC.get()
+ for nochar in lchar.keys() :
+ for k in lchar[nochar] :
+ assert k in (0,1) , lchar
+
--- /dev/null
+#@ MODIF sd_xfem SD DATE 24/08/2009 AUTEUR GENIAUT S.GENIAUT
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+
+from SD import *
+
+from SD.sd_cham_no import sd_cham_no
+from SD.sd_cham_elem import sd_cham_elem
+from SD.sd_carte import sd_carte
+from SD.sd_util import *
+
+
+
+#-------------------------------
+# I. sd fiss_xfem
+#-------------------------------
+
+class sd_fiss_xfem(AsBase):
+ nomj = SDNom(fin=8)
+
+ INFO = AsVK16(lonmax=2,) # info discontinuite
+
+# I.1) objets relatifs aux level sets
+
+ LNNO = sd_cham_no()
+ LTNO = sd_cham_no()
+ GRLNNO = sd_cham_no()
+ GRLTNO = sd_cham_no()
+ BASLOC = sd_cham_no()
+ FONDFISS = Facultatif(AsVR())
+ BASEFOND = Facultatif(AsVR())
+ FONDMULT = Facultatif(AsVI())
+ CARAFOND = Facultatif(AsVR(lonmax=12,))
+
+# I.2) objets relatifs à l'enrichissement
+
+ GROUP_MA_ENRI = AsVI()
+ GROUP_NO_ENRI = AsVI()
+ STNO = sd_cham_no()
+ STNOR = sd_cham_no()
+
+ MAILFISS_CTIP = Facultatif(AsVI(SDNom(nomj='.MAILFISS .CTIP')))
+ MAILFISS_HEAV = Facultatif(AsVI(SDNom(nomj='.MAILFISS .HEAV')))
+ MAILFISS_HECT = Facultatif(AsVI(SDNom(nomj='.MAILFISS .HECT')))
+ MAILFISS_INDIC = AsVI(SDNom(nomj='.MAILFISS .INDIC'), lonmax=6, )
+ LISNOH = Facultatif(AsVI())
+
+# I.3) objets relatifs à la propagation
+
+ PRO_MES_EL = Facultatif(sd_cham_elem(SDNom(nomj='.PRO.MES_EL')))
+ PRO_NORMAL = Facultatif(sd_cham_elem(SDNom(nomj='.PRO.NORMAL')))
+
+# I.4) objets relatifs au contact
+
+ BASCO = Facultatif(sd_cham_no())
+ LISCO = Facultatif(AsVR(SDNom(nomj='.LISCO')))
+ LISEQ = Facultatif(AsVI(SDNom(nomj='.LISEQ')))
+ LISRL = Facultatif(AsVI(SDNom(nomj='.LISRL')))
+
+
+# 1.5) vérifications d'existence :
+
+ def check_existence(self,checker) :
+ sdu_ensemble((self.FONDFISS, self.FONDMULT))
+ sdu_ensemble((self.LISRL, self.LISCO))
+ sdu_ensemble((self.PRO_MES_EL.CELD, self.PRO_NORMAL.CELD))
+
+
+#-------------------------------
+# II. sd modele
+#-------------------------------
+
+class sd_modele_xfem(AsBase):
+ nomj = SDNom(fin=8)
+
+# II.1) objets relatifs aux sous-éléments
+
+ TOPOSE_PIN = sd_cham_elem(SDNom(nomj='.TOPOSE.PIN'))
+ TOPOSE_CNS = sd_cham_elem(SDNom(nomj='.TOPOSE.CNS'))
+ TOPOSE_HEA = sd_cham_elem(SDNom(nomj='.TOPOSE.HEA'))
+ TOPOSE_LON = sd_cham_elem(SDNom(nomj='.TOPOSE.LON'))
+ TOPOSE_AIN = sd_cham_elem(SDNom(nomj='.TOPOSE.AIN'))
+ TOPOSE_CRI = Facultatif(sd_cham_elem(SDNom(nomj='.TOPOSE.CRI')))
+
+# II.2) objets relatifs aux facettes de contact
+
+ TOPOFAC_PI = sd_cham_elem(SDNom(nomj='.TOPOFAC.PI'))
+ TOPOFAC_AI = sd_cham_elem(SDNom(nomj='.TOPOFAC.AI'))
+ TOPOFAC_CF = sd_cham_elem(SDNom(nomj='.TOPOFAC.CF'))
+ TOPOFAC_LO = sd_cham_elem(SDNom(nomj='.TOPOFAC.LO'))
+ TOPOFAC_BA = sd_cham_elem(SDNom(nomj='.TOPOFAC.BA'))
+
+ TOPOFAC_GM = sd_cham_elem(SDNom(nomj='.TOPOFAC.GM'))
+ TOPOFAC_GE = sd_cham_elem(SDNom(nomj='.TOPOFAC.GE'))
+ TOPOFAC_OE = sd_cham_elem(SDNom(nomj='.TOPOFAC.OE'))
+ TOPOFAC_OM = sd_cham_elem(SDNom(nomj='.TOPOFAC.OM'))
+
+# II.3) objets concaténés relatifs aux level sets
+
+ LNNO = sd_cham_no()
+ LTNO = sd_cham_no()
+ BASLOC = sd_cham_no()
+ STNO = sd_cham_no()
+
+# II.4) autres objets
+
+ XFEM_CONT = AsVI(lonmax=1) # contact ou pas
+ FISS = AsVK8() # noms des fissures
+ NFIS = AsVI(lonmax=1,) # nombre de fissures
+ XMAFIS = sd_carte() # pour chaque maille : nom de la fissure
+
+
+#----------------------------------
+# III. sd charge de contact
+#----------------------------------
+
+class sd_contact_xfem(AsBase):
+#-------------------------------
+ nomj = SDNom(fin=16)
+
+ CARACF = AsVR()
+ ECPDON = AsVI()
+ METHCO = AsVI()
+
+ XFIMAI = AsVK8()
+ XNRELL = AsVK24()
+ XNBASC = AsVK24()
--- /dev/null
+#@ MODIF utilsd SD DATE 10/09/2007 AUTEUR COURTOIS M.COURTOIS
+# -*- coding: iso-8859-1 -*-
+# CONFIGURATION MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2007 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.
+# ======================================================================
+# RESPONSABLE COURTOIS M.COURTOIS
+
+"""
+ Utilitaire sur le catalogue des structures de données.
+"""
+
+__revision__ = "$Id: $"
+
+import sys
+import os
+from glob import glob
+from optparse import OptionParser
+
+# ----- get bibpyt location
+main = sys.argv[0]
+if os.path.islink(main):
+ main = os.path.realpath(main)
+bibpyt = os.path.normpath(os.path.join(
+ os.path.dirname(os.path.abspath(main)), os.pardir))
+sys.path.append(bibpyt)
+
+# -----------------------------------------------------------------------------
+def import_sd(nomsd):
+ """Import une SD.
+ """
+ try:
+ mod = __import__('SD.%s' % nomsd, globals(), locals(), [nomsd])
+ klass = getattr(mod, nomsd)
+ except (ImportError, AttributeError), msg:
+ print msg
+ raise ImportError, "impossible d'importer la SD '%s'" % nomsd
+ return klass
+
+# -----------------------------------------------------------------------------
+def tree(nom, *args):
+ """Retourne l'arbre des sd en arguments
+ """
+ l = []
+ for i, sd in enumerate(args):
+ if len(args) > 1 and i > 0:
+ l.append('-'*80)
+ sd_class = import_sd(sd)
+ tmpobj = sd_class(nomj=nom)
+ l.append(tmpobj.dump())
+ return os.linesep.join(l)
+
+# -----------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
+if __name__ == '__main__':
+ # command arguments parser
+ parser = OptionParser(usage=__doc__)
+ parser.add_option('-t', '--tree', dest='tree',
+ action='store_true', default=False,
+ help="affiche une SD sous forme d'arbre")
+ parser.add_option('--nom', dest='nom',
+ action='store', default='^'*8,
+ help="nom du concept dans les représentations")
+ parser.add_option('-a', '--all', dest='all',
+ action='store_true', default=False,
+ help="construit la liste des SD à partir des fichiers 'sd_*.py' trouvés")
+
+ opts, l_sd = parser.parse_args()
+ if opts.all:
+ l_fich = glob(os.path.join(bibpyt, 'SD', 'sd_*.py'))
+ l_sd = [os.path.splitext(os.path.basename(f))[0] for f in l_fich]
+
+ if len(l_sd) == 0:
+ parser.error('quelle(s) structure(s) de données ?')
+
+ if opts.tree:
+ print tree(opts.nom, *l_sd)
+
-#@ MODIF N_ETAPE Noyau DATE 16/05/2007 AUTEUR COURTOIS M.COURTOIS
+#@ MODIF N_ETAPE Noyau DATE 07/09/2009 AUTEUR COURTOIS M.COURTOIS
# -*- coding: iso-8859-1 -*-
+# RESPONSABLE COURTOIS M.COURTOIS
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
Methode utilisee pour que l etape self se declare etape
courante. Utilise par les macros
"""
- #print "set_current_step ",self.nom
- #traceback.print_stack(limit=3,file=sys.stdout)
cs= CONTEXT.get_current_step()
if self.parent != cs :
raise "L'étape courante %s devrait etre le parent de self : %s" % (cs,self)
Methode utilisee par l'etape self qui remet son etape parent comme
etape courante
"""
- #print "reset_current_step ",self.nom
- #traceback.print_stack(limit=3,file=sys.stdout)
cs= CONTEXT.get_current_step()
if self != cs :
raise "L'étape courante %s devrait etre self : %s" % (cs,self)
if self.sd and self.reuse == None :
self.parent.NommerSdprod(self.sd,self.sd.nom)
+
+ def is_include(self):
+ """Permet savoir si on a affaire à une commande de type INCLUDE/INCLUDE_MATERIAU
+ car le comportement de ces macros est particulier.
+ """
+ return self.nom.startswith('INCLUDE')
+
+ def sd_accessible(self):
+ """Dit si on peut acceder aux "valeurs" (jeveux) de l'ASSD produite par l'étape.
+ """
+ if CONTEXT.debug: print '`- ETAPE sd_accessible :', self.nom
+ return self.parent.sd_accessible()
+
-#@ MODIF N_FONCTION Noyau DATE 18/12/2007 AUTEUR COURTOIS M.COURTOIS
+#@ MODIF N_FONCTION Noyau DATE 10/11/2009 AUTEUR COURTOIS M.COURTOIS
# -*- coding: iso-8859-1 -*-
+# RESPONSABLE COURTOIS M.COURTOIS
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
self.expression=None
def __call__(self,*val):
- if hasattr(self.parent,'contexte_fichier_init'):
- context=self.parent.contexte_fichier_init
- else : context={}
+ context = {}
+ # cas de INCLUDE (ou POURSUITE dans Eficas)
+ context.update(getattr(self.parent, 'contexte_fichier_init', {}))
+ # récupération des constantes locales en cas de MACRO
+ context.update(getattr(self.parent, 'macro_const_context', {}))
i=0
for param in self.nompar :
context[param]=val[i]
"""
from SD.sd_fonction import sd_formule
from Utilitai.Utmess import UTMESS
- if not self.par_lot():
+ if self.accessible():
TypeProl={'E':'EXCLU', 'L':'LINEAIRE', 'C':'CONSTANT', 'I':'INTERPRE' }
sd = sd_formule(self.get_name())
prol = sd.PROL.get()
-#@ MODIF N_JDC Noyau DATE 01/04/2008 AUTEUR COURTOIS M.COURTOIS
+#@ MODIF N_JDC Noyau DATE 07/09/2009 AUTEUR COURTOIS M.COURTOIS
# -*- coding: iso-8859-1 -*-
+# RESPONSABLE COURTOIS M.COURTOIS
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
self.index_etapes[etape] = len(self.etapes) - 1
etape.reparent(self)
etape.reset_jdc(self)
+
+ def sd_accessible(self):
+ """On peut acceder aux "valeurs" (jeveux) des ASSD si le JDC est en PAR_LOT="NON".
+ """
+ if CONTEXT.debug: print ' `- JDC sd_accessible : PAR_LOT =', self.par_lot
+ return self.par_lot == 'NON'
+
-#@ MODIF N_MACRO_ETAPE Noyau DATE 28/11/2007 AUTEUR COURTOIS M.COURTOIS
+#@ MODIF N_MACRO_ETAPE Noyau DATE 10/11/2009 AUTEUR COURTOIS M.COURTOIS
# -*- coding: iso-8859-1 -*-
+# RESPONSABLE COURTOIS M.COURTOIS
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
avec l'argument args.
"""
- self.definition=oper
- self.reuse=reuse
- self.valeur=args
+ self.definition = oper
+ self.reuse = reuse
+ self.valeur = args
self.nettoiargs()
- self.parent=CONTEXT.get_current_step()
+ self.parent = CONTEXT.get_current_step()
self.etape = self
- self.nom=oper.nom
- self.idracine=oper.label
- self.appel=N_utils.callee_where()
- self.mc_globaux={}
- self.g_context={}
+ self.nom = oper.nom
+ self.idracine = oper.label
+ self.appel = N_utils.callee_where()
+ self.mc_globaux = {}
+ self.g_context = {}
# Contexte courant
- self.current_context={}
- self.index_etape_courante=0
- self.etapes=[]
- self.index_etapes={}
- self.sds=[]
+ self.current_context = {}
+ self.macro_const_context = {}
+ self.index_etape_courante = 0
+ self.etapes = []
+ self.index_etapes = {}
+ self.sds = []
# Dans le cas d'une macro écrite en Python, l'attribut Outputs est un
# dictionnaire qui contient les concepts produits de sortie
# (nom : ASSD) déclarés dans la fonction sd_prod
- self.Outputs={}
- self.sd=None
- self.actif=1
- self.sdprods=[]
+ self.Outputs = {}
+ self.sd = None
+ self.actif = 1
+ self.sdprods = []
self.make_register()
- self.UserError="UserError"
+ self.UserError = "UserError"
def make_register(self):
"""
concept.jdc=self.jdc
for e in self.etapes:
e.reparent(self)
+
+ def update_const_context(self, d):
+ """
+ Met à jour le contexte des constantes pour l'évaluation de
+ formules dans la macro.
+ """
+ # Dans le jdc, const_context est mis à jour par exec_compile
+ # Dans la macro, on n'a pas le code à compiler pour récupèrer les
+ # constantes locales à la macro. On demande donc explicitement de
+ # définir les constantes "locales".
+ self.macro_const_context.update(d)
+
+ def sd_accessible(self):
+ """On peut acceder aux "valeurs" (jeveux) des ASSD dans
+ les macro-commandes qui sont localement en PAR_LOT="NON"
+ sauf pour INCLUDE et INCLUDE_MATERIAU.
+ """
+ if CONTEXT.debug: print ' `- MACRO sd_accessible :', self.nom
+ return self.parent.sd_accessible() or not self.nom.startswith('INCLUDE')
+
-#@ MODIF asojb Noyau DATE 07/10/2008 AUTEUR PELLET J.PELLET
+#@ MODIF asojb Noyau DATE 21/09/2009 AUTEUR COURTOIS M.COURTOIS
# -*- coding: iso-8859-1 -*-
+# RESPONSABLE COURTOIS M.COURTOIS
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
# COPYRIGHT (C) 1991 - 2007 EDF R&D WWW.CODE-ASTER.ORG
v( checker )
except :
mess=60*'-'+'\n'
- mess=mess+'Erreur SDVERI_45 (Attention : vérification incomplète)'+'\n'
+ mess=mess+'Erreur SDVERI (Attention : vérification incomplète)'+'\n'
mess=mess.join(traceback.format_tb(sys.exc_traceback))
checker.err(self,mess)
return "<%s(%x,%r)>" % (self.__class__.__name__, id(self), self.nomj() )
def long_repr(self):
- if not hasattr(self, "par_lot") or self.par_lot():
+ if not hasattr(self, "accessible") or not self.accessible():
# hors Aster ou en par_lot='oui'
return self.short_repr()
else:
class AsVI(OJBVect):
_type = "I"
+# -----------------------------------------------------------------------------
+class AsVS(OJBVect):
+ _type = "S"
+
# -----------------------------------------------------------------------------
class AsVR(OJBVect):
_type = "R"