<div dir="ltr"><div dir="ltr">On Tue, Nov 26, 2019 at 8:04 AM Brandon Denton <<a href="mailto:bldenton@buffalo.edu">bldenton@buffalo.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Good Morning,<div dir="auto"><br></div><div dir="auto">Is it possible to expand a matrix in petsc? I current created and loaded a matrix (6 x 5) which holds information required later in my program. I would like to store additional information in the matrix by expanding its size, let's say make it at 10 x 5 matrix. How is this accomplished in petsc. When I try to use MatSetSize() or MatSetValue() my code throws errors. What is the process for accomplishing this?</div></div></blockquote><div><br></div><div>Normally if you change the size, you just make a new object. If you really want to retain the same pointer</div><div>because it is being held by other objects, you can call MatReset() and rebuild the matrix completely, but</div><div>I normally would not do this.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">Thank you in advance for your time.</div><div dir="auto">Brandon</div><div dir="auto"><br></div><div dir="auto"><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>