<div class="gmail_quote">On Tue, Apr 19, 2011 at 09:00, ilyas ilyas <span dir="ltr">&lt;<a href="mailto:ilyascfd@gmail.com">ilyascfd@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
It does not work properly for all number of processors.</blockquote></div><br><div>The &quot;row&quot; in ex14f.F is a local row, not a global row. The ComputeJacobian in that file manually translates local rows to global rows using the map returned by DAGetGlobalIndices(). Now you should just call MatSetValuesLocal() with the local indices, or even easier,  MatSetValuesStencil().</div>
<div><br></div><div>There is no easy way to determine the global index on your own (it is hundreds of lines of code).</div>