Exemplo n.º 1
0
 def test_assert_no_force_fd(self):
     prob = Problem()
     prob.root = Group()
     prob.root.add('paraboloid', Paraboloid(), promotes=['x', 'y', 'f_xy'])
     prob.root.add('p1', IndepVarComp('x', 2.0),promotes=['x'])
     prob.root.add('p2', IndepVarComp('y', 2.0),promotes=['y'])
     prob.setup()
     assert_no_force_fd(prob.root)
Exemplo n.º 2
0
 def test_assert_no_force_fd(self):
     prob = Problem()
     prob.root = Group()
     prob.root.add('paraboloid', Paraboloid(), promotes=['x', 'y', 'f_xy'])
     prob.root.add('p1', IndepVarComp('x', 2.0),promotes=['x'])
     prob.root.add('p2', IndepVarComp('y', 2.0),promotes=['y'])
     prob.setup(check=False)
     assert_no_force_fd(prob.root)
Exemplo n.º 3
0
 def test_assert_no_force_fd_expect_failure(self):
     prob = Problem()
     prob.root = Group()
     paraboloid = Paraboloid()
     prob.root.add('paraboloid', paraboloid, promotes=['x', 'y', 'f_xy'])
     paraboloid.fd_options['force_fd'] = True
     prob.root.add('p1', IndepVarComp('x', 2.0),promotes=['x'])
     prob.root.add('p2', IndepVarComp('y', 2.0),promotes=['y'])
     prob.setup()
     try:
         assert_no_force_fd(prob.root)
     except AssertionError as exc:
         pass
     else:
         self.fail('Expected AssertionError')
Exemplo n.º 4
0
 def test_assert_no_force_fd_expect_failure(self):
     prob = Problem()
     prob.root = Group()
     paraboloid = Paraboloid()
     prob.root.add('paraboloid', paraboloid, promotes=['x', 'y', 'f_xy'])
     paraboloid.fd_options['force_fd'] = True
     prob.root.add('p1', IndepVarComp('x', 2.0),promotes=['x'])
     prob.root.add('p2', IndepVarComp('y', 2.0),promotes=['y'])
     prob.setup(check=False)
     try:
         assert_no_force_fd(prob.root)
     except AssertionError as exc:
         pass
     else:
         self.fail('Expected AssertionError')