<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div>I should have also mentioned that the matrix is symmetric.</div><div><br></div><div>Thanks,</div><div>Sean</div><div><br></div><div><br></div><div><br><html>Begin forwarded message:</html><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Sean Dettrick &lt;<a href="mailto:sdettrick@gmail.com">sdettrick@gmail.com</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">May 21, 2008 9:14:41 AM PDT</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>mixed matrix type?</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div>Hi,<br><br>I have a sparse N*N matrix generated from a DA and a 5 point stencil, with a total of approx 5*N non-zero entries. &nbsp;Now I would like to extend this matrix by adding a smaller M*M dense matrix to the bottom right hand side, i.e. so that there is a dense square in the bottom right hand corner of the otherwise sparse matrix. &nbsp;The total number of new non-zero entries, M*M, is comparable to the total number of old entries, 5*N. &nbsp;On top of this, there would be a small number of non-zero entries in the new upper-right and lower-left rectangular portions of the matrix, due to coupling of the two systems. &nbsp;The new total matrix size (including zeroes) would be (N+M)*(N+M).<br><br>Can anybody recommend a Mat type to store the new matrix?<br><br>One possibility I was thinking of was to establish the original sparse Mat with a DA in a sub-communicator (with half the CPUs), and get the ownership range with MatGetOwnershipRange. &nbsp;Then in the petsc_comm_world communicator, the complete matrix could be constructed (by element-wise copying the old one I suppose), and the ownership range could be maintained manually.<br><br>Does this sound like a reasonable strategy?<br><br>I would very much appreciate any suggestions or advice.<br><br>Thanks,<br><br>Sean Dettrick<br></blockquote></div><br></body></html>