Exemplo n.º 1
0
 def __get__(self, obj, klass):
     if obj is None:
         return self
     nomj = obj.nomj()
     if aster.jeveux_exists(nomj):
         return aster.jeveux_getattr(nomj, self.name)[1].strip()
     else:
         return None
Exemplo n.º 2
0
 def changeJeveuxValues(self, nbval, indices, reel, imag, num=1):
     """Modify values of existing data structures"""
     nomj = self.nomj()
     if aster.jeveux_exists(nomj):
         obj_simple = aster.jeveux_getattr(nomj, 'XOUS')[1].strip() == 'S'
         if obj_simple:
             assert num == 1, """For vectors last argument must be set to 1"""
         # aster.putvectjev can be used for vectors (num=1) and collections
         aster.putvectjev(nomj, nbval, indices, reel, imag, num)
Exemplo n.º 3
0
 def get(self):
     nomj = self.nomj()
     if aster.jeveux_exists(nomj):
         obj_simple = aster.jeveux_getattr(nomj, 'XOUS')[1].strip() == 'S'
         if obj_simple:
             return aster.getvectjev(nomj)
         else:
             return aster.getcolljev(nomj)
     else:
         return None