#NEWLINE# def test_intersect_parabola_line( self ) : #NEWLINE# #INDENT# top = Problem ( ) #NEWLINE# root = top . root = Group ( ) #NEWLINE# root . add ( 'line' , Line ( ) ) #NEWLINE# root . add ( 'parabola' , Parabola ( ) ) #NEWLINE# root . add ( 'bal' , Balance ( ) ) #NEWLINE# root . connect ( 'line.y' , 'bal.y1' ) #NEWLINE# root . connect ( 'parabola.y' , 'bal.y2' ) #NEWLINE# root . connect ( 'bal.x' , 'line.x' ) #NEWLINE# root . connect ( 'bal.x' , 'parabola.x' ) #NEWLINE# root . nl_solver = Newton ( ) #NEWLINE# root . ln_solver = ScipyGMRES ( ) #NEWLINE# top . setup ( check = False ) #NEWLINE# top [ 'bal.x' ] = 7.0 #NEWLINE# top . run ( ) #NEWLINE# assert_rel_error ( self , top [ 'bal.x' ] , 1.430501 , 1e-05 ) #NEWLINE# assert_rel_error ( self , top [ 'line.y' ] , 1.1389998 , 1e-05 ) #NEWLINE# top [ 'bal.x' ] = ( - 7.0 ) #NEWLINE# top . run ( ) #NEWLINE# assert_rel_error ( self , top [ 'bal.x' ] , ( - 2.097168 ) , 1e-05 ) #NEWLINE# assert_rel_error ( self , top [ 'line.y' ] , 8.194335 , 1e-05 )