Пример #1
0
    def test_MDF(self):
        prob = SellarMDF()
        set_as_top(prob)
        prob.dis1.z1 = prob.dis2.z1 = 5.0
        prob.dis1.z2 = prob.dis2.z2 = 2.0
        prob.dis1.x1 = 1.0

        prob.run()
        assert_rel_error(self, prob.dis1.z1, 1.977, 0.01)
        assert_rel_error(self, 1.0-prob.dis1.z2, 1.0, 0.01)
        assert_rel_error(self, 1.0-prob.dis1.x1, 1.0, 0.1)
 def test_MDF(self):
     prob = SellarMDF()
     set_as_top(prob)
     prob.dis1.z1 = prob.dis2.z1 = 5.0
     prob.dis1.z2 = prob.dis2.z2 = 2.0
     prob.dis1.x1 = 1.0
 
     prob.run()
     assert_rel_error(self, prob.dis1.z1, 1.977, 0.01)
     assert_rel_error(self, 1.0-prob.dis1.z2, 1.0, 0.01)
     assert_rel_error(self, 1.0-prob.dis1.x1, 1.0, 0.1)