#NEWLINE# def test_data_pass_bounds_idx( self ) : #NEWLINE# #INDENT# p = Problem ( ) #NEWLINE# p . root = Group ( ) #NEWLINE# p . root . add ( 'lower' , ExecComp ( 'low = 2*a' ) , promotes = [ 'low' , 'a' ] ) #NEWLINE# p . root . add ( 'upper' , ExecComp ( 'high = 2*b' ) , promotes = [ 'high' , 'b' ] ) #NEWLINE# sub = p . root . add ( 'sub' , Group ( ) , promotes = [ 'x' , 'low' , 'high' ] ) #NEWLINE# sub . add ( 'comp' , IndexCompTest ( ) , promotes = [ 'a' , 'x' , 'n' , 'b' , 'c' ] ) #NEWLINE# sub . add ( 'dummy1' , ExecComp ( 'd=low' ) , promotes = [ 'low' ] ) #NEWLINE# sub . add ( 'dummy2' , ExecComp ( 'd=high' ) , promotes = [ 'high' ] ) #NEWLINE# sub . nl_solver = Brent ( ) #NEWLINE# sub . nl_solver . options [ 'state_var' ] = 'x' #NEWLINE# sub . nl_solver . options [ 'state_var_idx' ] = 2 #NEWLINE# sub . nl_solver . options [ 'var_lower_bound' ] = 'low' #NEWLINE# sub . nl_solver . options [ 'var_upper_bound' ] = 'high' #NEWLINE# sub . ln_solver = ScipyGMRES ( ) #NEWLINE# p . setup ( check = False ) #NEWLINE# p [ 'a' ] = ( - 5.0 ) #NEWLINE# p [ 'b' ] = 55.0 #NEWLINE# p . run ( ) #NEWLINE# assert_rel_error ( self , p . root . unknowns [ 'x' ] [ 2 ] , 110 , 0.0001 )