[petsc-users] petsc4py DA with dof>1 confusion
Matthew Emmett
memmett at unc.edu
Mon Jul 4 14:19:25 CDT 2011
On Mon, Jul 4, 2011 at 2:52 PM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> No, sorry... It has nothing to do with periodicity... It is actually a
> C/Fortran ordering issue I need to fix...
Ah, I see. Thanks for looking into this so quickly. Let me know if
there is anything I can do on my end to help. I will poke around the
code for petsc4py, but you obviously know it better than I do.
> In Fortran 90, it seems you index a DA Vec array as A[dof,x,y,z]... ,
> However, I think that for Python we should follow a more C-ish
> indexing A[x,y,z,dof]. Or we could do it like PETSc in C, that is
> A[z,y,x,dof] (wich is the transpose of the Fortran way) but it is
> counter-intuitive to C (and likely Python) programmers ...
>
> What do others think about this?
I think A[x,y,z,dof] is probably the most intuitive for Python.
Matt
More information about the petsc-users
mailing list