I have a matrix defined on a mesh as given below.
I want to make it into a larger system by placing my matrix a into a block matrix
My attempt is [code] a = BilinearForm(fes)
a += grad(u)*grad(v)*dx
length = a.mat.height
Z = sp.coo_matrix((length, length))
I = sp.identity(length)
B1a = sp.hstack([a.mat, Z])
B1b = sp.hstack([Z, I])
B1 = sp.vstack([B1a, B1b])[/code]
however this results in the following error message:
blocks[0,:] has incompatible row dimensions. Got blocks[0,1].shape == 358240, expected 1.
How to I get around this error