<div dir="ltr">Hello,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 5:15 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, May 8, 2015 at 4:14 PM, Ganesh Vijayakumar <span dir="ltr"><<a href="mailto:ganesh.iitm@gmail.com" target="_blank">ganesh.iitm@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 dir="ltr"><div><div><div>Hello,<br><br></div>  Thanks. Looks like I could set all the possible entries I'll use to zero and selectively overwrite them. <br><br></div>  Can I overwrite any entries without incurring additional cost in memory? I currently use MatSetValue with the option INSERT_VALUES? Does Petsc have an option to OVERWRITE the existing value?<br></div></div></blockquote><div><br></div></span><div>Here INSERT means the same as overwrite. You only incur costs if you have not previously set the element.</div></div></div></div></blockquote><div><br></div><div>Oh. That was my intial thinking too. Thanks.<br><br></div><div>ganesh<br></div><div><br></div></div></div></div></div>