<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 2, 2014 at 9:49 AM, 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"><div class="">On Wed, Apr 2, 2014 at 8:23 AM, Xiangdong <span dir="ltr"><<a href="mailto:epscodes@gmail.com" target="_blank">epscodes@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello everyone,<div><br></div><div>I have two quick questions about src/snes/examples/tutorials/ex3.c.</div>

<div><br></div><div>1) In line 150-151, why do we need to call MatSeqAIJSetPreallocation before MatMPIAIJSetPreallocation? I found that without the seqaij call, the program crashed. However, the mat J we want to create is the mpiaij.</div>

</div></blockquote><div><br></div></div><div>One is used in serial, the other in parallel. Really, you can just call</div></div></div></div></blockquote><div><br></div><div>So depending on the number of processors given in the runtime, either seqaij or mpiaij is not executed, thought both lines are complied. Is it correct?</div>
<div><br></div><div>Thank you.</div><div><br></div><div>Xiangdong </div><div> </div><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"><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatXAIJSetPreallocation.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatXAIJSetPreallocation.html</a></div>

<div><br></div><div>   Matt</div><div class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div>2) In line 390-397, it sets the values of the residue function at the boundary. Where do these values come from? In other words, I am not clear about ff[0]=xx[0] and ff[xs+xm-1] = xx[xs+xm-1] - 1.0;</div>
<div><br></div><div>Thank you.</div><span><font color="#888888"><div><br></div><div>Xiangdong</div></font></span></div>
</blockquote></div></div><span class="HOEnZb"><font color="#888888"><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
</font></span></div></div>
</blockquote></div><br></div></div>