Esempio n. 1
0
 def __init__(self, card=None, data=None):
     Element.__init__(self, card, data)
     if card:
         self.eid = card.field(1)
         self.pid = card.field(2)
         self.ga = card.field(3)
         self.gb = card.field(4)
         x1G0 = card.field(5)
         if isinstance(x1G0, int):
             self.g0 = x1G0
             self.x = None
             self.cid = None
         elif isinstance(x1G0, float):
             self.g0 = None
             x1 = x1G0
             x2 = card.field(6)
             x3 = card.field(7)
             self.x = [x1, x2, x3]
             self.cid = card.field(8, 0)
         else:
             #raise RuntimeError('invalid CGAP...x1/g0 = |%s|' %(x1G0))
             self.g0 = None
             self.x = [None, None, None]
             self.cid = None
     else:
         self.eid = data[0]
         self.pid = data[1]
         self.ga = data[2]
         self.gb = data[3]
         self.g0 = data[4]
         x1 = data[5]
         x2 = data[6]
         x3 = data[7]
         self.x = [x1, x2, x3]
         self.cid = data[8]
Esempio n. 2
0
 def __init__(self, card=None, data=None):
     Element.__init__(self, card, data)
     if card:
         self.eid = card.field(1)
         self.pid = card.field(2)
         self.ga = card.field(3)
         self.gb = card.field(4)
         x1G0 = card.field(5)
         if isinstance(x1G0, int):
             self.g0 = x1G0
             self.x = None
             self.cid = None
         elif isinstance(x1G0, float):
             self.g0 = None
             x1 = x1G0
             x2 = card.field(6)
             x3 = card.field(7)
             self.x = [x1, x2, x3]
             self.cid = card.field(8, 0)
         else:
             #raise RuntimeError('invalid CGAP...x1/g0 = |%s|' %(x1G0))
             self.g0 = None
             self.x = [None, None, None]
             self.cid = None
     else:
         self.eid = data[0]
         self.pid = data[1]
         self.ga = data[2]
         self.gb = data[3]
         self.g0 = data[4]
         x1 = data[5]
         x2 = data[6]
         x3 = data[7]
         self.x = [x1, x2, x3]
         self.cid = data[8]
Esempio n. 3
0
 def __init__(self, card=None, data=None):
     Element.__init__(self, card, data)
     self.eid = card.field(1)
     self.pid = card.field(2)
     self.Type = card.field(3)
     self.ida = card.field(4)
     self.idb = card.field(5)
     self.gs = card.field(6)
     self.ga = card.field(7)
     self.gb = card.field(8)
     self.xs = card.field(9)
     self.ys = card.field(10)
     self.zs = card.field(11)
Esempio n. 4
0
 def __init__(self, card=None, data=None):
     Element.__init__(self, card, data)
     self.eid = card.field(1)
     self.pid = card.field(2)
     self.Type = card.field(3)
     self.ida = card.field(4)
     self.idb = card.field(5)
     self.gs = card.field(6)
     self.ga = card.field(7)
     self.gb = card.field(8)
     self.xs = card.field(9)
     self.ys = card.field(10)
     self.zs = card.field(11)
Esempio n. 5
0
 def __init__(self, card=None, data=None, comment=''):
     Element.__init__(self, card, data)
     if comment:
         self._comment = comment
     if card:
         self.eid = integer(card, 1, 'eid')
         self.pid = integer_or_blank(card, 2, 'pid', self.eid)
         self.Type = string(card, 3, 'Type')
         self.ida = integer(card, 4, 'ida')
         self.idb = integer(card, 5, 'idb')
         self.gs = integer_or_blank(card, 6, 'gs')
         self.ga = integer_or_blank(card, 7, 'ga')
         self.gb = integer_or_blank(card, 8, 'gb')
         self.xs = double_or_blank(card, 9, 'xs')
         self.ys = double_or_blank(card, 10, 'ys')
         self.zs = double_or_blank(card, 11, 'zs')
         assert len(card) <= 12, 'len(CFAST card) = %i' % len(card)
     else:
         raise NotImplementedError(data)
Esempio n. 6
0
 def __init__(self, card=None, data=None, comment=''):
     """
     # .. todo:: not done...
     """
     Element.__init__(self, card, data)
     if comment:
         self._comment = comment
     if card:
         self.eid = integer(card, 1, 'eid')
         self.pid = integer_or_blank(card, 2, 'pid', self.eid)
         self.ga = integer_or_blank(card, 3, 'ga')
         self.gb = integer_or_blank(card, 4, 'gb')
         x1G0 = integer_double_or_blank(card, 5, 'x1_g0')
         if isinstance(x1G0, integer_types):
             self.g0 = x1G0
             self.x = None
             self.cid = None
         elif isinstance(x1G0, float):
             self.g0 = None
             x1 = x1G0
             x2 = double_or_blank(card, 6, 'x2', 0.0)
             x3 = double_or_blank(card, 7, 'x3', 0.0)
             self.x = [x1, x2, x3]
             self.cid = integer_or_blank(card, 8, 'cid', 0)
         else:
             #raise RuntimeError('invalid CGAP...x1/g0 = |%s|' %(x1G0))
             self.g0 = None
             self.x = [None, None, None]
             self.cid = None
         assert len(card) <= 9, 'len(CGAP card) = %i' % len(card)
     else:
         self.eid = data[0]
         self.pid = data[1]
         self.ga = data[2]
         self.gb = data[3]
         self.g0 = data[4]
         x1 = data[5]
         x2 = data[6]
         x3 = data[7]
         self.x = [x1, x2, x3]
         self.cid = data[8]
Esempio n. 7
0
 def __init__(self, card=None, data=None, comment=''):
     Element.__init__(self, card, data)
     if comment:
         self._comment = comment
     if card:
         self.eid = integer(card, 1, 'eid')
         self.pid = integer_or_blank(card, 2, 'pid', self.eid)
         self.ga = integer_or_blank(card, 3, 'ga')
         self.gb = integer_or_blank(card, 4, 'gb')
         x1G0 = integer_double_or_blank(card, 5, 'x1_g0')
         if isinstance(x1G0, int):
             self.g0 = x1G0
             self.x = None
             self.cid = None
         elif isinstance(x1G0, float):
             self.g0 = None
             x1 = x1G0
             x2 = double_or_blank(card, 6, 'x2', 0.0)
             x3 = double_or_blank(card, 7, 'x3', 0.0)
             self.x = [x1, x2, x3]
             self.cid = integer_or_blank(card, 8, 'cid', 0)
         else:
             #raise RuntimeError('invalid CGAP...x1/g0 = |%s|' %(x1G0))
             self.g0 = None
             self.x = [None, None, None]
             self.cid = None
         assert len(card) <= 9, 'len(CGAP card) = %i' % len(card)
     else:
         self.eid = data[0]
         self.pid = data[1]
         self.ga = data[2]
         self.gb = data[3]
         self.g0 = data[4]
         x1 = data[5]
         x2 = data[6]
         x3 = data[7]
         self.x = [x1, x2, x3]
         self.cid = data[8]
Esempio n. 8
0
 def __init__(self, card, data):
     self.cid = None
     Element.__init__(self, card, data)
Esempio n. 9
0
 def __init__(self, card, data):
     Element.__init__(self, card, data)
     self.nodes = [None, None]
Esempio n. 10
0
 def __init__(self, card, data):
     self.cid = None
     Element.__init__(self, card, data)
Esempio n. 11
0
 def __init__(self, card, data):
     Element.__init__(self, card, data)
Esempio n. 12
0
 def __init__(self, card, data):
     Element.__init__(self, card, data)
     self.nodes = [None, None]
Esempio n. 13
0
 def __init__(self, card, data):
     Element.__init__(self, card, data)
Esempio n. 14
0
 def __init__(self, card=None, data=None):
     Element.__init__(self, card, data)
Esempio n. 15
0
 def __init__(self, card=None, data=None):
     Element.__init__(self, card, data)