<div dir="ltr"><div><div>Thanks again, Asmund. You guessed it correct that I have misunderstood. Things are clear now.<br><br></div>Regards,<br></div>Praveen<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 11:53 PM, Åsmund Ervik <span dir="ltr"><<a href="mailto:asmund.ervik@ntnu.no" target="_blank">asmund.ervik@ntnu.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""> <br>
><br>
>Thanks a lot for such a lucid explanation. The note which you mentioned at the end is very important for me, as my code contains loops going from both 1 to N and 0 to N+1.<br>
><br>
<br>
</span>You're welcome.<br>
<br>
Just to avoid any potential misunderstanding: the note at the end was if you have loops over your "real" (non-ghost) variables going from 0 to N-1, i.e. zero indexing as in C, where the first index of your "real" values is 0, ghost values are at -1 and below and at N and above.<br>
<br>
On the other hand, if you have some loops from 1 to N and some loops from 0 to N+1, it means you have some loops over just the "real" variables (1 to N) and some loops over "real" + ghost variables (0 to N+1). In this case, you do not need to change the code. Just set the stencil width to 1 (or to 2 if your "widest" loop goes from -1 to N+2, etc.).<br>
<br>
(When I say "real", I don't mean as in real vs. complex numbers, but as in the grid point values that are not boundary conditions.)<br>
<br>
Regards,<br>
Åsmund</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div>B. Praveen Kumar<br>Research Scholar,<br></div>Computational Combustion Lab,<br></div><div>Dept.of Aerospace Engg.<br></div>IIT Madras<br></div></div></div></div>
</div>