<div dir="ltr">Good morning,<div><br></div><div>I am currently having some trouble in the creation of some matrices.</div><div><br></div><div>I am using structured dmda objects to create matrices using the DMCreate() function.</div><div><br></div><div>One of these matrices will be the result of a matrix-matrix product of two of these dm matrices.</div><div><br></div><div>I know that the matrix product will have more nonzero entries or at least a bigger stencil than the original dm matrices, however I accounted for that when I set the DMDA stencil width in the initial creation.</div><div><br></div><div>The problem is that even with that, the resulting matrix-matrix product has a bigger stencil as evidenced by failure in subsequent matrix copy/addition operations using SAME_NONZERO_PATTERN.</div><div><br></div><div>Judging by the difference of the nonzero entries I believe that initial zero entries (the ones I initialized to eventually hold this expaned stencil) on the original dm matrices are being combined to further expand the stencil of the product matrix. </div><div><br></div><div>Is there any way of getting a matrix-matrix product that will keep the same nonzero pattern as the dm matrices?</div><div><br></div><div>I have tried both MatMatMult() and the MatProductCreate() sequence so far, but both produce nonzero patterns that do not match the dm nonzero pattern.</div><div><br></div><div>Thank you,</div><div><br></div><div>-Alfredo</div><div><br></div><div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font face="arial, sans-serif">Alfredo Duarte</font><div><font face="arial, sans-serif">Graduate Research Assistant</font></div><div><font face="arial, sans-serif">The University of Texas at Austin</font></div></div></div></div></div></div></div>