-#@ MODIF sd_char_contact SD DATE 15/10/2007 AUTEUR GENIAUT S.GENIAUT
+#@ MODIF sd_char_contact SD DATE 22/10/2007 AUTEUR PELLET J.PELLET
# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
from SD import *
from SD.sd_champ import sd_champ
-from SD.sd_xfem import sd_modele_xfem
+from SD.sd_xfem import sd_modele_xfem, sd_contact_xfem
class sd_char_contact(AsBase):
nomj =SDNom(fin=16)
def exists(self):
# retourne True si la SD semble exister.
return self.FORMCO.exists
-
+
def formulation_xfem(self):
- if not self.exists() : return
+ if not self.exists() : return False
iform = self.FORMCO.get()[0]
- return iform == 3
+ return iform == 3
def contact_xfem_actif(self):
- if not self.formulation_xfem() : return
- return self.XNBASC.exists
-
+ if not self.formulation_xfem() : return False
+ return self.XNBASC.exists
+
BAMACO = Facultatif(AsVI())
BANOCO = Facultatif(AsVI())
CARACF = Facultatif(AsVR())
XNRELL = Facultatif(AsVK24())
MODELX = Facultatif(AsVK8(lonmax=1,))
-
+ # 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()
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()
+ 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)
-
+ 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]
+ nom = self.MODELX.get()[0]
sd2 = sd_modele_xfem(nom)
sd2.check(checker)
-
-
+
+
-#@ MODIF sd_char_unilate SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+#@ 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.
+# 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)
- COEFD = AsVR()
- COEFG = AsVR()
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'))
-#@ MODIF sd_compor SD DATE 19/06/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_compor SD DATE 12/11/2007 AUTEUR PELLET J.PELLET
# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
# ======================================================================
from SD import *
+from SD.sd_mater import sd_mater
# Remarque :
#------------
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-8)/3
+ assert nvi==8+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
+
+
-#@ MODIF sd_feti SD DATE 10/07/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_feti SD DATE 23/10/2007 AUTEUR BOITEAU O.BOITEAU
# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
FETA = AsColl(acces='NO', stockage='DISPERSE', modelong='VARIABLE', type='I', )
FETJ = AsVI()
FETI = AsVI()
- FETH = AsVI(lonmax=4, )
+ 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', )
-#@ MODIF sd_listis SD DATE 10/07/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_listis SD DATE 22/10/2007 AUTEUR PELLET J.PELLET
# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
from SD import *
from SD.sd_titre import sd_titre
+from SD.sd_util import *
class sd_listis(sd_titre):
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(nbpa) == 1
assert len(lpas) == 1
assert vale[0] == bint[0]
+ assert nbpa[0] == 0, nbpa
+ assert lpas[0] == 0, lpas
-#@ MODIF sd_macr_elem_stat SD DATE 24/09/2007 AUTEUR DEVESA G.DEVESA
+#@ MODIF sd_macr_elem_stat 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.
+# 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 *
REFM = AsVK8()
LINO = AsVI()
VARM = AsVR(lonmax=2)
- CONX = Facultatif(AsVI())
+ 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)))
# 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())
LICH = Facultatif(AsColl(acces='NO', stockage='CONTIG', modelong='CONSTANT', type='K', ltyp=8))
+ 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
-#@ MODIF sd_mater SD DATE 17/07/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_mater SD DATE 22/10/2007 AUTEUR PELLET J.PELLET
# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
# parfois, THER_NL crée une sd_fonction pour BETA
def check_compor1_i_VALK(self, checker):
nom= self.nomj().strip()
- valk=list(self.VALK.get())
- if not valk : return
if nom[8:16]=='.THER_NL' :
- k=valk.index('BETA ')
- nomfon=valk[2*k+1]
- sd2=sd_fonction(nomfon) ; sd2.check(checker)
+ 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)
class sd_mater(AsBase):
nomc1=self.nomj()[:8]+'.'+nom
comp1 = sd_compor1(nomc1)
- # parfois, comp1 est vide. AJACOT_PB : ssls115g/DEFI_COQU_MULT
+ # parfois, comp1 est vide : ssls115g/DEFI_COQU_MULT
if comp1.VALK.get() : comp1.check(checker)
-#@ MODIF sd_matr_elem SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_matr_elem 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.
+# 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_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=8)
- LISTE_RESU = AsVK24()
- REFE_RESU = AsVK24(lonmax=5, )
+ REFE_RESU = AsVK24(lonmax=5, )
+ LISTE_RESU = Facultatif(AsVK24())
# indirection par LISTE_RESU :
def check_matr_elem_i_LISTE_RESU(self, checker):
- lnom = self.LISTE_RESU.get()
- if not lnom:
- checker.err(self, "sd_champ LISTE_RESU absent")
- return
+ if not self.LISTE_RESU.exists : return
+ lnom = self.LISTE_RESU.get_stripped()
for nom in lnom:
- if not nom.strip():
- continue
- resu1 = sd_resuelem(nom)
- # parfois, le nom est non ' ' et pourtant le sd_resuelem n'existe pas
- # Il faudrait corriger cette anomalie.
- if resu1.NOLI.exists :
- resu1.check(checker)
+ if nom != '' :
+ sd2 = sd_resuelem(nom); sd2.check(checker)
+
+
+ def check_1(self, checker):
+ refe = self.REFE_RESU.get_stripped()
+ assert refe[2] in ('OUI_SOUS_STRUC', 'NON_SOUS_STRUC'), refe
+
+ # existence de LISTE_RESU :
+ if refe[2] == 'NON_SOUS_STRUC':
+ assert self.LISTE_RESU.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)
+
-#@ MODIF sd_melasflu SD DATE 09/05/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_melasflu SD DATE 22/10/2007 AUTEUR PELLET J.PELLET
# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
FACT = AsVR(SDNom(debut=19), )
DESC = AsVK16(SDNom(debut=19), lonmax=1, )
- # Critère présence VCN et VEN ????
+ # si FAISCEAU_TRANS + couplage fluide-structure + BASE_MODALE/AMOR_REDUIT_CONN :
VCN = Facultatif(AsVR())
VEN = Facultatif(AsVR())
- sd_l_table = Facultatif(sd_l_table(SDNom(nomj=''))) # Si faisceau axial
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):
- lnom=self.REMF.get()
- sd2 = sd_type_flui_stru(lnom[0]) ; sd2.check(checker)
- sd2 = sd_resultat_dyn(lnom[1]) ; sd2.check(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):
- desc=self.DESC.get()
- numo=self.NUMO.get()
- fact=self.FACT.get()
- freq=self.FREQ.get()
- masg=self.MASG.get()
- vite=self.VITE.get()
- vcn=self.VCN.get()
- ven=self.VEN.get()
- l_table = sd_l_table(self.nomj) # Si faisceau axial
+ remf=self.REMF.get()
+ desc=self.DESC.get_stripped()
# calcul de itypfl (type d'interaction fluide / structure) :
- typfl = sd_type_flui_stru(self.REMF.get()[0])
- itypfl=typfl.FSIC.get()[0]
+ 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=len(numo)
+ nbmode=self.NUMO.lonmax
+ assert nbmode > 0
# calcul de nbvite (nombre de vitesses) :
- nbvite=len(vite)
+ nbvite=self.VITE.lonmax
+ assert nbvite > 0
# vérification de l'objet .DESC :
#--------------------------------
- sdu_compare(self.DESC,checker,desc[0].strip(),'==','DEPL','DESC[1]=="DEPL"')
+ assert len(desc)==1 , desc
+ assert desc[0] == 'DEPL' , desc
# vérification de l'objet .NUMO :
#--------------------------------
- sdu_tous_compris(self.NUMO,checker,vmin=1)
+ for x in self.NUMO.get() :
+ assert x >= 1 , numo
# vérification de l'objet .FACT :
#--------------------------------
if itypfl==3 : # faisceau axial
- sdu_compare(self.FACT,checker,len(fact),'==',3*nbmode*nbvite,'LONMAX(FACT)==3*nbmode*nbvite')
+ assert self.FACT.lonmax == 3*nbmode*nbvite
else :
- sdu_compare(self.FACT,checker,len(fact),'==',3*nbmode,'LONMAX(FACT)==3*nbmode')
+ assert self.FACT.lonmax == 3*nbmode
# vérification de l'objet .MASG :
#--------------------------------
if itypfl==3 : # faisceau axial
- sdu_compare(self.MASG,checker,len(masg),'==',nbmode*nbvite,'LONMAX(MASG)==nbmode*nbvite')
+ assert self.MASG.lonmax == nbmode*nbvite
else :
- sdu_compare(self.MASG,checker,len(masg),'==',nbmode,'LONMAX(MASG)==nbmode')
+ assert self.MASG.lonmax == nbmode
# vérification de l'objet .FREQ :
#--------------------------------
- sdu_compare(self.FREQ,checker,len(freq),'==',2*nbmode*nbvite,'LONMAX(FREQ)==2*nbmode*nbvite')
+ 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
# vérification de l'objet .VCN :
#--------------------------------
- if vcn :
+ if self.VCN.exists :
fsvi=typfl.FSVI.get()
- nbzex=len(fsvi)
- nbval=1
- for i in range(nbzex) :
- nbval=nbval+fsvi[nbzex+i]
- sdu_compare(self.VCN,checker,len(vcn),'==',nbmode,'LONMAX(VCN)==nbmode*nbval')
+ nbzone=fsvi[1]
+ nbval=0
+ for i in range(nbzone) :
+ nbval=nbval+fsvi[2+nbzone+i]
+ assert self.VCN.lonmax == nbmode*nbval
# vérification de l'objet .VEN :
#--------------------------------
- if ven :
- sdu_compare(self.VEN,checker,len(ven),'==',nbmode,'LONMAX(VEN)==nbmode')
+ if self.VEN.exists :
+ assert self.VEN.lonmax == nbmode
# vérification de la SD table contenant les cham_no :
#----------------------------------------------------
- tcham=sd_table(self.nomj)
- sdu_compare(None,checker,tcham.nb_column(),'==',1,"1 seule colonne dans la table")
+ tcham=self.sd_table
+ assert tcham.nb_column() == 1 , tcham
col1=tcham.get_column_name('NOM_CHAM')
- sdu_assert(None, checker, col1, "Manque colonne NOM_CHAM")
+ assert col1, "Il manque la colonne NOM_CHAM"
data=col1.data.get()
mask=col1.mask.get()
if profchno == '':
profchno=profchn1
else:
- sdu_compare(None,checker,profchn1,'==',profchno,"Tous PROFCHNO identiques")
+ assert profchn1 == profchno ,(profchn1, profchno)
# vérification de la SD l_table :
#--------------------------------
- if itypfl==3 : # faisceau axial
+ 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'
-#@ MODIF sd_mode_cycl SD DATE 10/07/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_mode_cycl SD DATE 23/10/2007 AUTEUR BODEL C.BODEL
# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
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
+ for x in freq : assert x >= 0 , freq
-#@ MODIF sd_resuelem SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_resuelem 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.
+# 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)
DESC = AsVI(SDNom(debut=19), docu='RESL', )
+ def check_1(self, checker):
+ noli = self.NOLI.get_stripped()
+ sd2=sd_ligrel(noli[0]) ; sd2.check(checker)
+ assert noli[1] != '' , noli
+
+ 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
-#@ MODIF sd_resultat SD DATE 17/07/2007 AUTEUR COURTOIS M.COURTOIS
+#@ MODIF sd_resultat SD DATE 22/10/2007 AUTEUR PELLET J.PELLET
# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
return self.ORDR.exists
- # glute XFEM :
- def check_glute_XFEM(self, checker):
- sd2 = sd_char_contact('&&OP0070.DEFIC')
- sd2.check(checker)
-
-
# indirection vers les champs de .TACH :
def check_resultat_i_TACH(self, checker):
tach = self.TACH.get()
-#@ MODIF sd_surface_1d SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+#@ 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.
+# 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 *
nomj = SDNom(fin=13)
sgtel = sd_reperage_1d(SDNom(nomj='.SGTEL'))
repom = sd_reperage_omega(SDNom(nomj=''))
- CONEX_ORIG = AsVI(SDNom(nomj='.CONEX.ORIG'), lonmax=1, )
- CONEX_EXTR = AsVI(SDNom(nomj='.CONEX.EXTR'), lonmax=1, )
+ CONEX_ORIG = AsVI(SDNom(nomj='.CONEX.ORIG'))
+ CONEX_EXTR = AsVI(SDNom(nomj='.CONEX.EXTR'))
DESC = AsVR(SDNom(debut=13), lonmax=6, )
-#@ MODIF sd_util SD DATE 10/07/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_util SD DATE 22/10/2007 AUTEUR PELLET J.PELLET
# -*- coding: iso-8859-1 -*-
# CONFIGURATION MANAGEMENT OF EDF VERSION
# ======================================================================
decroiss=1
for k in range(n) :
if seq[k] != seq2[k] :
- if 0 : print "AJACOT non croissant ",k,seq[k],seq2[k]
croiss=0
if seq[k] != seq3[k] :
- if 0 : print "AJACOT non décroissant ",k,seq[k],seq2[k]
decroiss=0
if croiss==1 and decroiss==1 :
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)
-#@ MODIF sd_vect_elem SD DATE 13/02/2007 AUTEUR PELLET J.PELLET
+#@ MODIF sd_vect_elem 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.
+# 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 *
LISTE_CHAR = Facultatif(AsColl(acces='NO', stockage='CONTIG', modelong='CONSTANT', type='I', ))
+ def check_LISTE_CHAR(self, checker):
+ if not self.LISTE_CHAR.exists : return
+ lchar = self.LISTE_CHAR.get()
+ for nochar in lchar.keys() :
+ for k in lchar[nochar] :
+ assert k in (0,1) , lchar
+
-#@ MODIF sd_xfem SD DATE 15/10/2007 AUTEUR GENIAUT S.GENIAUT
+#@ MODIF sd_xfem 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.
+# 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 *
#-------------------------------
class sd_fiss_xfem(AsBase):
+ nomj = SDNom(fin=8)
# I.1) objets relatifs aux level sets
- nomj = SDNom(fin=8)
-
LNNO = sd_cham_no()
LTNO = sd_cham_no()
GRLNNO = sd_cham_no()
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')))
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
- nomj = SDNom(fin=8)
-
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'))
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
+# II.3) objets concaténés relatifs aux level sets
LNNO = sd_cham_no()
LTNO = sd_cham_no()
# II.4) autres objets
- XFEM_CONT = AsVI(lonmax=1) # contact ou pas
+ 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
class sd_contact_xfem(AsBase):
#-------------------------------
+ nomj = SDNom(fin=16)
- nomj = SDNom(fin=8)
-
- CARACF = AsVR(SDNom(nomj='CONTACT.CARACF'))
- ECPDON = AsVI(SDNom(nomj='CONTACT.ECPDON'))
- METHCO = AsVI(SDNom(nomj='CONTACT.METHCO'))
+ CARACF = AsVR()
+ ECPDON = AsVI()
+ METHCO = AsVI()
- XFIMAI = AsVK8(SDNom(nomj='CONTACT.XFIMAI'))
- XNRELL = AsVK24(SDNom(nomj='CONTACT.XNRELL'))
- XNBASC = AsVK24(SDNom(nomj='CONTACT.XNBASC'))
+ XFIMAI = AsVK8()
+ XNRELL = AsVK24()
+ XNBASC = AsVK24()