#NEWLINE# def solve_nonlinear( self , params , unknowns , resids ) : #NEWLINE# #INDENT# unknowns [ 'outvec' ] [ : ] = 0 #NEWLINE# if MPI : #NEWLINE# #INDENT# outs = self . comm . allgather ( ( params [ 'invec' ] * 2.0 ) ) #NEWLINE# unknowns [ 'outvec' ] [ : 8 ] = outs [ 0 ] #NEWLINE# unknowns [ 'outvec' ] [ 4 : 11 ] += outs [ 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# outs = ( params [ 'invec' ] * 2.0 ) #NEWLINE# unknowns [ 'outvec' ] [ : 8 ] = outs [ : 8 ] #NEWLINE# unknowns [ 'outvec' ] [ 4 : 11 ] += outs [ 4 : 11 ]