#NEWLINE# def test_brent_converge_index( self ) : #NEWLINE# #INDENT# p = Problem ( ) #NEWLINE# p . root = Group ( ) #NEWLINE# p . root . add ( 'comp' , IndexCompTest ( ) , promotes = [ 'a' , 'x' , 'n' , 'b' , 'c' ] ) #NEWLINE# p . root . nl_solver = Brent ( ) #NEWLINE# p . root . nl_solver . options [ 'state_var' ] = 'x' #NEWLINE# p . root . nl_solver . options [ 'state_var_idx' ] = 2 #NEWLINE# p . root . ln_solver = ScipyGMRES ( ) #NEWLINE# p . setup ( check = False ) #NEWLINE# p . run ( ) #NEWLINE# assert_rel_error ( self , self . root . unknowns [ 'x' ] [ 2 ] , 2.06720359226 , 0.0001 ) #NEWLINE# assert_rel_error ( self , p . root . resids [ 'x' ] [ 2 ] , 0 , 0.0001 )