I’m solving a weak formulation of a PDE system in an explicit way where I need to set up the matrix A manually which is a blocked one and the A_{2,2} block is another block matrix. However, GMRES and CG solvers don’t admit a nested blocked matrix. I also can’t use matvec() to convert a blockmatrix to basematrix.
Not sure if I understand you correctly. you could just use a numberspace for the first block and build the compound matrix. you can write manually in the 1,1 block after assembling.
Or am I misunderstanding something? Can you post a mwe with what you want to do?
Thanks for your reply. I’m trying to implement a FEM-BEM code, and my A_{1,1},A_{1,2},A_{2,1} blocks are FEM spare matrices and A_{2,2} block is a BEM H-matrix whose subblocks \{A_{2,2}\}_{i,j},i,j=1,2 are standard integral operators. Firstly I defined A_{2,2} as a block matrix, but when I invoke GMRES, it said bad::cast. But I made it though by defining a 4\times 4 huge block matrix…
Thanks a lot!! I’m also confused about the .ToDense() function. It seems it doesn’t return the corresponding dense matrix representation. I also include a demonstrating code snippet in the file. Could you also have a look?