<p>1. Assemble twice</p>
<p>2. Do not insert into Dirichlet rows/columns, perhaps by using negative indices. Then you can always ADD.</p>
<div class="gmail_quote">On Oct 21, 2011 10:23 AM, "NAN ZHAO" <<a href="mailto:zhaonanavril@gmail.com">zhaonanavril@gmail.com</a>> wrote:<br type="attribution"><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><div><br></div><div>Thanks,</div><div>Nan</div>
</blockquote></div>