#NEWLINE# def apply_nonlinear( self , params , unknowns , resids ) : #NEWLINE# #INDENT# " Don't solve; just calculate the residual." #NEWLINE# x = params [ 'x' ] #NEWLINE# z = unknowns [ 'z' ] #NEWLINE# resids [ 'z' ] = ( ( ( x * z ) + z ) - 4.0 ) #NEWLINE# resids [ 'y' ] = ( ( x + ( 2.0 * z ) ) - unknowns [ 'y' ] )