# Set count for points in checker-boarding cnt_points = 0 # Loop over internal points only for i in range ( 1, n - 1 ): for j in range ( 1, n - 1 ): # Checker-boarding if (( i + j ) % 2)=count%2:
count = 0 while resid_ave > resid_crit : # Set at 0 so we can sum it up later resid_ave = 0. w = 1.7 resid_crit = 1.0e-6 # Arbitrary value at the begining, higher than resid_crit resid_ave = 100.