#NEWLINE# def test_converge_diverge_compfd( self ) : #NEWLINE# #INDENT# prob = Problem ( impl = impl ) #NEWLINE# prob . root = ConvergeDivergePar ( ) #NEWLINE# prob . root . ln_solver = PetscKSP ( ) #NEWLINE# prob . root . par1 . comp2 . fd_options [ 'force_fd' ] = True #NEWLINE# prob . root . par2 . comp5 . fd_options [ 'force_fd' ] = True #NEWLINE# prob . setup ( check = False ) #NEWLINE# prob . run ( ) #NEWLINE# assert_rel_error ( self , prob [ 'comp7.y1' ] , ( - 102.7 ) , 1e-06 ) #NEWLINE# indep_list = [ 'p.x' ] #NEWLINE# unknown_list = [ 'comp7.y1' ] #NEWLINE# J = prob . calc_gradient ( indep_list , unknown_list , mode = 'fwd' , return_format = 'dict' ) #NEWLINE# assert_rel_error ( self , J [ 'comp7.y1' ] [ 'p.x' ] [ 0 ] [ 0 ] , ( - 40.75 ) , 1e-06 ) #NEWLINE# J = prob . calc_gradient ( indep_list , unknown_list , mode = 'rev' , return_format = 'dict' ) #NEWLINE# assert_rel_error ( self , J [ 'comp7.y1' ] [ 'p.x' ] [ 0 ] [ 0 ] , ( - 40.75 ) , 1e-06 ) #NEWLINE# J = prob . calc_gradient ( indep_list , unknown_list , mode = 'fd' , return_format = 'dict' ) #NEWLINE# assert_rel_error ( self , J [ 'comp7.y1' ] [ 'p.x' ] [ 0 ] [ 0 ] , ( - 40.75 ) , 1e-06 )