[petsc-users] PETSc DM ex13f90
praveen kumar
praveen1bharadwaj at gmail.com
Tue May 3 07:25:16 CDT 2016
Thanks again, Asmund. You guessed it correct that I have misunderstood.
Things are clear now.
Regards,
Praveen
On Mon, May 2, 2016 at 11:53 PM, Åsmund Ervik <asmund.ervik at ntnu.no> wrote:
>
> >
> >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.
> >
>
> You're welcome.
>
> 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.
>
> 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.).
>
> (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.)
>
> Regards,
> Åsmund
--
B. Praveen Kumar
Research Scholar,
Computational Combustion Lab,
Dept.of Aerospace Engg.
IIT Madras
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160503/2601bf1d/attachment.html>
More information about the petsc-users
mailing list