def __init__(self, card=None, icard=0, data=None, comment=''): BaseCard.__init__(self) if comment: self._comment = comment if card: nfields = len(card) - 1 assert nfields % 2 == 0 i = 2 * icard self.sid = integer(card, i + 1, 'sid') self.temperature = double(card, i + 2, 'temp') else: self.sid = data[0] self.temperature = data[1]
def __init__(self, card=None, icard=0, data=None, comment=''): BaseCard.__init__(self) if comment: self._comment = comment if card: nfields = len(card) - 1 assert nfields % 2 == 0 i = 2 * icard print('i =', i) self.sid = integer(card, i + 1, 'sid') self.temperature = double(card, i + 2, 'temp') else: #self.temperatures = {data[0]: data[1]} raise NotImplementedError('TEMPD')
def __init__(self, card=None, data=None, comment=''): """ Defines a 1D dummy element used for plotting. +--------+-----+-----+-----+ | 1 | 2 | 3 | 4 | +--------+-----+-----+-----+ | PLOTEL | EID | G1 | G2 | +--------+-----+-----+-----+ """ BaseCard.__init__(self) if comment: self._comment = comment if card: self.eid = integer(card, 1, 'eid') self.nodes = [ integer(card, 2, 'g1'), integer(card, 3, 'g2'), ] assert len(card) <= 4, 'len(CGAP card) = %i' % len(card) else: self.eid = data[0] self.pid = data[1] self.nodes = [data[2], data[3]]