Built code for setting boundaries, though convergence is not correct yet. Note that zero_row slows the code down a lot.