[petsc-users] changing DAs matrix and coefficients ordering

Matthew Knepley knepley at gmail.com
Tue Feb 2 09:29:06 CST 2010


Not sure what you are asking. Why not just think of the grid as being
transposed?
Something has to be numbered first. If you had a more sophisticated change,
I
would recommend using an AO to renumber the matrix. This is what happens
when you go from PETSc ordering to Natural ordering.

  Matt

On Tue, Feb 2, 2010 at 9:18 AM, ilyas yilmaz <ilyasy at chalmers.se> wrote:

>
> Hi,
>
> As far as I understand, DAs create matrix structure which is based on
> natural ordering of mesh, ie.,
>
>    (i,j)
> cell(0,0) --> 0th row of DA matrix
> cell(1,0) --> 1st row of DA matrix
> cell(2,0) --> 2nd row of DA matrix and so on
>
> and for coefficients  : (i,j-1) (i-1,j) (i,j) (i+1,j) (i,j+1)
>
> My question is :
> ----------------
> I need such a matrix stucture for my application that
>
>    (i,j)
> cell(0,0) --> 0th row of DA matrix
> cell(0,1) --> 1st row of DA matrix
> cell(0,2) --> 2nd row of DA matrix and so on
>
> and for coefficients  : (i-1,j) (i,j-1) (i,j) (i,j+1) (i+1,j)
>
> How can I tell this DAs?
>
> Note:
> To simplify and to stay away from processor ordering issue,
> I assume that I am running DAs code on 1 cpu.
>
>
> Thank you for providing PETSc library and for your help.
>
> Regards,
> Ilyas
>
>


-- 
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/20100202/5d2f87e9/attachment.htm>


More information about the petsc-users mailing list