Ejemplo n.º 1
0
 def _read_cmass2(self, data, n):
     struct_i4fi = Struct(self._endian + b'if4i')
     nentries = (len(data) - n) // 24
     for i in range(nentries):
         edata = data[n:n + 24]  # 6*4
         out = struct_i4fi.unpack(edata)
         # (eid, mass, g1, g2, c1, c2) = out
         if self.is_debug_file:
             self.binary_debug.write('  CMASS2=%s\n' % str(out))
         element = CMASS2.add_op2_data(out)
         self.add_op2_element(element)
         n += 24
     self.increase_card_count('CMASS2', nentries)
     return n
Ejemplo n.º 2
0
 def _readCMASS2(self, data, n):
     """
     CMASS2(1101,11,66) - the marker for Record 52
     """
     s = Struct(b'if4i')
     nelements = (len(data) - n) // 24
     for i in xrange(nelements):
         eData = data[n:n + 24]  # 6*4
         out = s.unpack(eData)
         #(eid, m, g1, g2, c1, c2) = out
         elem = CMASS2(None, out)
         self.addOp2Element(elem)
         n += 24
     self.card_count['CMASS2'] = nelements
     return n
Ejemplo n.º 3
0
 def readCMASS2(self, data):
     """
     CMASS2(1101,11,66) - the marker for Record 52
     """
     #print "reading CMASS2"
     n = 0
     nEntries = len(data) // 24
     for i in range(nEntries):
         eData = data[n:n + 24]  # 6*4
         out = unpack('ifiiii', eData)
         #(eid,m,g1,g2,c1,c2) = out
         elem = CMASS2(None, out)
         self.addOp2Element(elem)
         n += 24
     data = data[n:]
Ejemplo n.º 4
0
 def _read_cmass2(self, data, n):
     """
     CMASS2(1101,11,66) - the marker for Record 52
     """
     s = Struct(b(self._endian + 'if4i'))
     nelements = (len(data) - n) // 24
     for i in range(nelements):
         edata = data[n:n + 24]  # 6*4
         out = s.unpack(edata)
         if self.is_debug_file:
             self.binary_debug.write('  CMASS2=%s\n' % str(out))
         #(eid, m, g1, g2, c1, c2) = out
         elem = CMASS2.add_op2_data(out)
         self.addOp2Element(elem)
         n += 24
     self.card_count['CMASS2'] = nelements
     return n