On Tue, May 5, 2015 at 3:34 PM, Bikash Kanungo <[email protected]> wrote:
> 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? > There are at least two ways: 1) Use http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetLocalSubMatrix.html to get a view into the matrix for each submatrix A, B, C, D 2) Use http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateNest.html Thanks, Matt > Thanks, > Bikash > > -- > Bikash S. Kanungo > PhD Student > Computational Materials Physics Group > Mechanical Engineering > University of Michigan > > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
