On Fri, Oct 21, 2011 at 3:23 PM, NAN ZHAO <span dir="ltr">&lt;<a href="mailto:zhaonanavril@gmail.com">zhaonanavril@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Dear all,<div><br></div><div>I am assembling a matrix using ADD_VALUES option, I need to insert certain values to the matrix cause I need to apply some boundary conditions. But I got the error </div><div>[0]PETSC ERROR: Object is in wrong state!</div>

<div>[0]PETSC ERROR: You have already added values; you cannot now insert!</div><div><br></div><div>Is anyone have a solution of this?</div></blockquote><div><br></div><div>Call Assembly between the ADD and INSERT calls.</div>
<div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>Thanks,</div><div>Nan</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>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<br>