示例#1
0
    def test_mpc_02(self):
        model = BDF()

        card = ['MPC            1    1002       4      1.    1000       4-.129394',
                '                    1000       5-7.152-3    1000       6-.013655']
        msg8 = ('MPC            1    1002       4      1.    1000       4-.129394\n'
                '                    1000       5-7.152-3    1000       6-.013655\n')
        msg16 =('MPC*                   1            1002               4              1.\n'
                '*                   1000               4        -.129394\n'
                '*                                   1000               5        -.007152\n'
                '*                   1000               6        -.013655\n')


        card = model.add_card(card, 'MPC', is_list=False)
        mpc = MPC(card)
        msg_8_actual = mpc.write_card(size=8)
        msg_16_actual = mpc.write_card(size=16)
        self.check_card(msg8, msg_8_actual)
        self.check_card(msg16, msg_16_actual)
示例#2
0
 def test_mpc_01(self):
     card = ['MPC', 1, 1002, 1, 1., 1000, 1, -3.861003861]
     card = BDFCard(card)
     mpc = MPC(card)
     #print ' %r' % str(mpc)
     #print '%r' % mpc.write_card(size=8)
     #msg = mpc.write_card(size=8, double=False)
     self.assertEqual('MPC            1    1002       1      1.    1000       1  -3.861\n', mpc.write_card(size=8))