[petsc-users] stencil ordering for a 13 point star stencil
Matthew Knepley
knepley at gmail.com
Thu Sep 25 13:59:06 CDT 2014
On Thu, Sep 25, 2014 at 1:50 PM, Alletto, John M <john.m.alletto at lmco.com>
wrote:
> 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.
>
Are you talking about using MatSetValuesStencil()? If so, there is no
inherent ordering. You
plug in the i,j,k,c values.
Thanks,
Matt
> 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
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140925/1b6092c0/attachment.html>
More information about the petsc-users
mailing list