[petsc-users] stencil ordering for a 13 point star stencil

Alletto, John M john.m.alletto at lmco.com
Thu Sep 25 13:50:00 CDT 2014


All,

In DMDACreate3D I declare a stencil width of 2 for a 13 point star stencil

Later when I fill the stencil, I am assuming the following order... can you tell me if I am correct in the assumption.

My assumption is the each V index maps to the corresponding I,j,k indicies of W

W is the Stencil weighting at that position
v[0] = W (I,j,k-2)
v[1] =W(I,j-2,k)
v[2] =W( i-1,j,k)
v[3] =W( I,j,k-1)
v[4] =W( I,j-1,k)
v[5] =W( i-1,j,k)

v[7] =W( i+1, j, k)
v[8] =W( I,j+1,k)
v[9] =W( I,j,k+1)
v[10] =W (i+2,j,k)
v[11] =W(I,j+2,k)
v[12] =W(I,j,k+2)
v[6] = sum( v[1..5])+ sum(v[6..12])


Thanks
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140925/c722dd46/attachment.html>


More information about the petsc-users mailing list