Exemple #1
0
 def _read_rforce(self, data: bytes, n: int) -> int:
     ntotal = 40 * self.factor  # 10*4
     nentries = (len(data) - n) // ntotal
     struc = Struct(mapfmt(self._endian + b'3i 4f ifi', self.size))
     for unused_i in range(nentries):
         edata = data[n:n + ntotal]
         out = struc.unpack(edata)
         if self.is_debug_file:
             self.binary_debug.write('  RFORCE=%s\n' % str(out))
         #(sid, nid, scale_factor) = out
         load = RFORCE.add_op2_data(out)
         self._add_load_object(load)
         n += ntotal
     self.card_count['RFORCE'] = nentries
     return n
Exemple #2
0
 def _read_rforce(self, data, n):
     ntotal = 40  # 10*4
     nentries = (len(data) - n) // ntotal
     struc = Struct(b(self._endian + '3i 4f ifi'))
     for i in range(nentries):
         edata = data[n:n + ntotal]
         out = struc.unpack(edata)
         if self.is_debug_file:
             self.binary_debug.write('  RFORCE=%s\n' % str(out))
         #(sid, nid, scale_factor) = out
         load = RFORCE.add_op2_data(out)
         self._add_load_object(load)
         n += ntotal
     self.card_count['RFORCE'] = nentries
     return n
Exemple #3
0
    def _read_rforce(self, data, n):
        self.log.debug('skipping RFORCE in GEOM3\n')
        if self.is_debug_file:
            self.binary_debug.write('skipping RFORCE in GEOM3\n')

        ntotal =  40  # 10*4
        nentries = (len(data) - n) // ntotal
        struc = Struct(b(self._endian + '3i 4f ifi'))
        for i in range(nentries):
            edata = data[n:n + ntotal]
            out = struc.unpack(edata)
            if self.is_debug_file:
                self.binary_debug.write('  RFORCE=%s\n' % str(out))
            #(sid, nid, scale_factor) = out
            load = RFORCE.add_op2_data(out)
            self._add_load_object(load)
            n += ntotal
        self.card_count['RFORCE'] = nentries
        return n