[petsc-users] function that returns the coordinates in the DMDA group?

Matthew Knepley knepley at gmail.com
Tue Mar 25 12:06:40 CDT 2014


On Tue, Mar 25, 2014 at 12:01 PM, Fischer, Greg A. <
fischega at westinghouse.com> wrote:

>
>
> *From:* Matthew Knepley [mailto:knepley at gmail.com]
> *Sent:* Tuesday, March 25, 2014 12:50 PM
> *To:* Fischer, Greg A.
> *Cc:* petsc-users at mcs.anl.gov
> *Subject:* Re: [petsc-users] function that returns the coordinates in the
> DMDA group?
>
>
>
> On Tue, Mar 25, 2014 at 11:41 AM, Fischer, Greg A. <
> fischega at westinghouse.com> wrote:
>
> Hello,
>
>
>
> The FAQ indicates:
>
>
>
>                 The MPI_Cart_create() first divides the mesh along the z
> direction, then the y, then the x. DMDA divides along the x, then y, then z.
>
>
>
> Is there a PETSc function call that returns the coordinates of the calling
> process in the DMDA group?
>
>
>
> I am not sure I understand exactly what you want. Can you do a small 2D
> example, with 4 or 6 cells?
>
>
>
>
>
> In a 2D DMDA, my understanding is that the process ranks would be arranged
> as:
>
>
>
> 2   3
>
> 0   1
>
>
>
> I would like to be able to call some function and have it return
> coordinates:
>
>
>
> [Rank 0] (x,y)  = (0, 0)
>
> [Rank 1] (x,y)  = (0, 1)
>
> [Rank 2] (x,y)  = (1, 0)
>
> [Rank 3] (x,y)  = (1, 1)
>

We do not have an API method for that. We give you the rank, (m,n,p) for
the number of processors
in each direction, and that it is numbered lexicographically.

  Thanks,

      Matt


> Greg
>
>
>
>   Thanks,
>
>
>
>     Matt
>
>
>
> Thanks,
>
> Greg
>
>
>
>
>
> --
> 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
>



-- 
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/20140325/c2e993b3/attachment.html>


More information about the petsc-users mailing list