<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sat, Dec 22, 2018 at 2:26 PM Sajid Ali <<a href="mailto:sajidsyed2021@u.northwestern.edu">sajidsyed2021@u.northwestern.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div><span class="gmail-m_-5389626867098888909gmail-im">></span>   No, A(t) has five diagonals as indicated by the calls to 
MatSetValues() with five entries per row; they correspond to the usual 5
 pt stencil in 2d.

<br></div>This might not be the right place to ask this, but I'm new to PDE's and I expected to find something like the matrix to be used as the one derived in slides 10-12 of this presentation : <a href="https://www.math.ust.hk/~mawang/teaching/math532/mgtut.pdf" target="_blank">https://www.math.ust.hk/~mawang/teaching/math532/mgtut.pdf</a> <br></div></div></blockquote><div><br></div><div>Yes, that is exactly what you get. We also make that matrix in SNES ex5 if you want to see that . Barry is just saying that a different way.</div><div><br></div><div>Also, I do not usually advise FD, but they are easy and memory light. I solve this same problem using finite elements in TS ex45.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"></div><div>Thanks Matt for the advice on the book. I'll have a look at it. <br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>