From: eficas <> Date: Tue, 14 May 2002 17:04:24 +0000 (+0000) Subject: ajout commande dans cata_saturne X-Git-Tag: AY_av_utilites~71 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f0509b8c9722b66087e57fa4601acd6a9faa3106;p=tools%2Feficas.git ajout commande dans cata_saturne --- diff --git a/Minicode/cata_saturne.py b/Minicode/cata_saturne.py index d45445c8..4c742a6a 100755 --- a/Minicode/cata_saturne.py +++ b/Minicode/cata_saturne.py @@ -3,6 +3,8 @@ import Accas from Accas import * +#CONTEXT.debug=1 + import ops JdC = JDC_CATA(code='SATURNE', @@ -1499,3 +1501,51 @@ MACRO2 =MACRO(nom="MACRO2",op= -5 ,docu="U4.61.21-c", fr="Calcul des matrices assemblées (matr_asse_gd) par exemple de rigidité, de masse ", MODELE =SIMP(statut='o',typ=modele), ); + +class concept(ASSD):pass + +def op1_prod(x,**args): + if x == 0:return concept + if x == 1:return concept + raise AsException("type de concept resultat non prevu") + +OP1 = OPER(nom='OP1',op=1,sd_prod=op1_prod,reentrant='f', + a=SIMP(statut='o',typ='I',into=(0,1,2)), + b=SIMP(typ=concept), + ccc=FACT(statut='d',d=SIMP(typ='I'),e=SIMP(typ='I')), + b_1=BLOC(condition="a==0", + x=SIMP(statut='o',typ='I',into=(0,1)), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + b_2=BLOC(condition="a==1", + x=SIMP(statut='o',typ='I',into=(0,1)), + b_2=BLOC(condition="1", + cc=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + ), + ); + + +def op2_prod(self,x,**args): + if x == 0:return concept + if x == 1:return concept + raise AsException("type de concept resultat non prevu") + +OP2 = MACRO(nom='OP2',op=1,sd_prod=op2_prod,reentrant='f', + a=SIMP(statut='o',typ='I',into=(0,1,2)), + b=SIMP(typ=concept), + ccc=FACT(statut='d',d=SIMP(typ='I'),e=SIMP(typ='I')), + b_1=BLOC(condition="a==0", + x=SIMP(statut='o',typ='I',into=(0,1)), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + b_2=BLOC(condition="a==1", + x=SIMP(statut='o',typ='I',into=(0,1)), + b_2=BLOC(condition="1", + cc=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + ), + ); +