[petsc-users] PETSc ordering with ref to fig 9 in manual

Matthew Knepley knepley at gmail.com
Fri Jul 31 07:15:23 CDT 2015


On Fri, Jul 31, 2015 at 2:49 AM, TAY wee-beng <zonexo at gmail.com> wrote:

> Hi,
>
> Supposed I create a DM called da_u
>
> call
> DMDACreate3d(MPI_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DMDA_STENCIL_STAR,size_x,size_y,&
>
>
> size_z,PETSC_DECIDE,PETSC_DECIDE,PETSC_DECIDE,1,1,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,PETSC_NULL_INTEGER,da_u,ierr)
>
> call DMCreateGlobalVector(da_u,u_global,ierr)
>
> call DMCreateLocalVector(da_u,u_local,ierr)
>
> I would like to know how PETSc stores the u_local values in the memory. As
> shown in fig9 on a 4 procs, assuming a stencil width of 1 for the ghost
> values, should it be:
>
> 1. 1,2,3....8,9,10,12,14,16,17,18 or
>
> 2. 1,2,3....8,9,16,17,18,10,12,14


The x-direction is numbered first, then y, then z. It is numbered in order
from the first ghost node to the last ghost node, in each dimension.

   Matt


>
> --
> Thank you
>
> Yours sincerely,
>
> TAY wee-beng
>
>


-- 
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/20150731/fcf21dca/attachment-0001.html>


More information about the petsc-users mailing list