<div class="gmail_quote">On Wed, Apr 20, 2011 at 03:50, Debao Shao <span dir="ltr"><<a href="mailto:Debao.Shao@brion.com">Debao.Shao@brion.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=":1ub"> ierr = MatZeroEntries( M ); assert( ierr == 0);<br>
ierr = MatDiagonalSet( M, vec.pv, INSERT_VALUES );<br>
ierr = MatCopy( ms->M, mStorage->M, DIFFERENT_NONZERO_PATTERN );</div></blockquote></div><br><div>Is M somehow related to ms->M or mStorage->M?</div><div><br></div><div>What do you actually want to do?</div>