def readMAT5(self, data): """ MAT5(2203,22,235) - record 6 """ #print "reading MAT5" while len(data) >= 40: # 10*4 data = data[40:] out = unpack('ifffffffff', data[:40]) (mid, k1, k2, k3, k4, k5, k6, cp, rho, hgen) = out self.add_thermal_material(MAT5(None, out), allowOverwrites=True)
def readMAT5(self, data): """ MAT5(2203,22,235) - record 6 """ #print "reading MAT5" while len(data) >= 40: # 10*4 eData = data[:40] data = data[40:] out = unpack(b'ifffffffff', eData) (mid, k1, k2, k3, k4, k5, k6, cp, rho, hgen) = out mat = MAT5(None, out) self.addThermalMaterial(mat, allowOverwrites=True)
def _readMAT5(self, data, n): """ MAT5(2203,22,235) - record 6 """ #print "reading MAT5" s = Struct(b'i9f') nmaterials = (len(data) - n) // 40 for i in xrange(nmaterials): out = s.unpack(data[n:n+40]) (mid, k1, k2, k3, k4, k5, k6, cp, rho, hgen) = out self.add_thermal_material(MAT5(None, out), allowOverwrites=True) n += 40 self.card_count['MAT5'] = nmaterials
def _read_mat5(self, data, n): """ MAT5(2203,22,235) - record 6 """ s = Struct(b(self._endian + 'i9f')) nmaterials = (len(data) - n) // 40 for i in range(nmaterials): out = s.unpack(data[n:n+40]) (mid, k1, k2, k3, k4, k5, k6, cp, rho, hgen) = out mat = MAT5.add_op2_data(out) self._add_thermal_material_object(mat, allow_overwrites=True) n += 40 self.card_count['MAT5'] = nmaterials return n
def _read_mat5(self, data, n): """ MAT5(2203,22,235) - record 6 """ s = Struct(b(self._endian + 'i9f')) nmaterials = (len(data) - n) // 40 for i in range(nmaterials): out = s.unpack(data[n:n+40]) (mid, k1, k2, k3, k4, k5, k6, cp, rho, hgen) = out mat = MAT5.add_op2_data(out) self.add_thermal_material(mat, allow_overwrites=True) n += 40 self.card_count['MAT5'] = nmaterials return n
def _read_mat5(self, data: bytes, n: int) -> int: """ MAT5(2203,22,235) - record 6 """ s = Struct(self._endian + b'i9f') nmaterials = (len(data) - n) // 40 for unused_i in range(nmaterials): out = s.unpack(data[n:n + 40]) #(mid, k1, k2, k3, k4, k5, k6, cp, rho, hgen) = out if self.is_debug_file: self.binary_debug.write(' MAT5=%s\n' % str(out)) mat = MAT5.add_op2_data(out) self._add_thermal_material_object(mat, allow_overwrites=False) n += 40 self.card_count['MAT5'] = nmaterials return n