Bikash Kanungo <[email protected]> writes: > Hi, > > I have four global matrices: A (mxm), B (mxn), C (nxm) and D (nxn). All of > these are of type MATMPIAIJ (sparse parallel matrix) created using number > of global rows and columns. I want to construct an (m+n)x(m+n) global > matrix called M which would have A, B, C and D as its sub-matrices in > clockwise fashion starting from A at the upper-left. What can be the best > way to construct M from A, B, C and D sub-matrices?
You can build it with MatNest, but that format is constraining so unless you understand the tradeoffs for different preconditioning techniques applied to your specific problem, you should instead allocate the big matrix, use MatGetLocalSubMatrix() to get references to the logical blocks, and call your functions that assemble each of A,B,C,D. See src/snes/examples/tutorials/ex28.c for an example of this organization.
signature.asc
Description: PGP signature
