<div class="gmail_quote">On Thu, Sep 22, 2011 at 17:27, Milan Mitrovic <span dir="ltr"><<a href="mailto:milan.v.mitrovic@gmail.com">milan.v.mitrovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":26x">also... can I change the size of the matrix as well? This can also<br>
change during the simulation? should I destroy and create a new matrix<br>
or just resize it, and how?</div></blockquote></div><br><div>You cannot change the size inside of SNES, but you can change it between time steps. For that, you should use petsc-3.2 or -dev, call SNESReset() when the size needs to change, create the new vectors and matrices of the new size, and set them with SNESSetFunction() and SNESSetJacobian().</div>
<div><br></div><div>Bear in mind that this is new functionality and is not as well tested. An alternative is to destroy the old SNES and create a new one.</div>