Neumann (top) and Dirichlet (bottom) Boundary Conditions
a1 + c1 b1 0 0 0 0 0 0 0 0 0 u1 f1
c2 a2 b2 0 0 0 0 0 0 0 0 u2 f2
0 c3 a3 b3 0 0 0 0 0 0 0 u3 f3
0 0 c4 a4 b4 0 0 0 0 0 0 u4 f4
0 0 0 c5 a5 b5 0 0 0 0 0 u5 f5
0 0 0 0 c6 a6 b6 0 0 0 0 u6 = f6
0 0 0 0 0 c7 a7 b7 0 0 0 u7 f7
0 0 0 0 0 0 c8 a8 b8 0 0 u8 f8
0 0 0 0 0 0 0 c9 a9 b9 0 u9 f9
0 0 0 0 0 0 0 0 c10 a10 b10 u10 f10
0 0 0 0 0 0 0 0 0 c11 a11 u11 f11 - b11u12

Periodic Boundary Conditions
a1 b1 0 0 0 0 0 0 0 0 c1 u1 f1
c2 a2 b2 0 0 0 0 0 0 0 0 u2 f2
0 c3 a3 b3 0 0 0 0 0 0 0 u3 f3
0 0 c4 a4 b4 0 0 0 0 0 0 u4 f4
0 0 0 c5 a5 b5 0 0 0 0 0 u5 f5
0 0 0 0 c6 a6 b6 0 0 0 0 u6 = f6
0 0 0 0 0 c7 a7 b7 0 0 0 u7 f7
0 0 0 0 0 0 c8 a8 b8 0 0 u8 f8
0 0 0 0 0 0 0 c9 a9 b9 0 u9 f9
0 0 0 0 0 0 0 0 c10 a10 b10 u10 f10
b11 0 0 0 0 0 0 0 0 c11 a11 u11 f11